Skip to content

Commit fb49a2f

Browse files
committed
feat: add python dummy notebook and justfile to run it
1 parent aa00503 commit fb49a2f

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

src/generic/tools/nix/flake.nix.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
inputs.nixpkgs.follows = "nixpkgs";
4242
};
4343
{% elif project_language == "python" -%}
44+
# The Python packages for all versions.
4445
nixpkgs-python = {
4546
url = "github:cachix/nixpkgs-python";
4647
inputs.nixpkgs.follows = "nixpkgs";

src/python/justfile.jinja

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ test *args:
1515
# Run an executable.
1616
run *args:
1717
uv run cli "$@"
18+
19+
# Run the Jupyter notebook.
20+
notebook *args:
21+
uv run python -m notebook "$@"
1822
{%- endraw %}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "238b20df-b5e0-43e9-ade4-06a0c69bff6b",
6+
"metadata": {},
7+
"source": [
8+
"# Welcome\n",
9+
"\n",
10+
"This is your demo notebook for all your python prototyping needs."
11+
]
12+
},
13+
{
14+
"cell_type": "code",
15+
"execution_count": 1,
16+
"id": "ca8f7fdf-a5d3-4589-ba9c-5ddac5f5e61c",
17+
"metadata": {},
18+
"outputs": [
19+
{
20+
"name": "stdout",
21+
"output_type": "stream",
22+
"text": [
23+
"1.826086956521739\n"
24+
]
25+
}
26+
],
27+
"source": [
28+
"print(42/23)"
29+
]
30+
}
31+
],
32+
"metadata": {
33+
"kernelspec": {
34+
"display_name": "Python 3 (ipykernel)",
35+
"language": "python",
36+
"name": "python3"
37+
},
38+
"language_info": {
39+
"codemirror_mode": {
40+
"name": "ipython",
41+
"version": 3
42+
},
43+
"file_extension": ".py",
44+
"mimetype": "text/x-python",
45+
"name": "python",
46+
"nbconvert_exporter": "python",
47+
"pygments_lexer": "ipython3",
48+
"version": "3.13.1"
49+
}
50+
},
51+
"nbformat": 4,
52+
"nbformat_minor": 5
53+
}

0 commit comments

Comments
 (0)