@@ -5,13 +5,16 @@ authors = [
5
5
" Ross Barnowski <rossbar@caltech.edu>" ,
6
6
" Kyle Sunden <git@ksunden.space>" ,
7
7
]
8
- channels = [" conda-forge" ]
8
+ channels = [" https://repo.mamba.pm/emscripten-forge " , " conda-forge" ]
9
9
description = " Add a short description here"
10
10
name = " executable-tutorials"
11
- platforms = [" linux-64" , " osx-64" , " osx-arm64" , " win-64" ]
11
+ platforms = [" linux-64" , " osx-64" , " osx-arm64" , " win-64" , " emscripten-wasm32 " ]
12
12
version = " 0.1.0"
13
13
14
- [tasks ]
14
+ [feature .base ]
15
+ platforms = [" linux-64" , " osx-64" , " osx-arm64" , " win-64" ]
16
+
17
+ [feature .base .tasks ]
15
18
build = { cmd = [
16
19
" sphinx-build" ,
17
20
" ." , # source directory
@@ -25,22 +28,23 @@ clean = "rm -rf _build/*"
25
28
start = " jupyter lab --FileContentsManager.preferred_dir tutorials"
26
29
test = " bash ./test.sh"
27
30
28
- [activation ]
31
+ [feature . base . activation ]
29
32
# Workaround overrides JupyterLab configuration (at the environment level) to
30
33
# make double-clicking on a Jupytext Markdown file open that file as a
31
34
# notebook. This is important for the development workflow for contributors.
32
- scripts = [" bash .binder/postBuild " ]
35
+ scripts = [" activate.sh " ]
33
36
34
- [dependencies ]
37
+ [feature . base . dependencies ]
35
38
python = " >=3.11"
36
39
matplotlib-base = " >=3.9"
37
- ipympl = " >=0.9"
38
40
jupyterlab = " >=4.2"
39
41
jupyterlab-myst = " >=2.4"
40
42
pytest = " >=8.3.5,<9"
41
43
nbval = " >=0.11.0,<0.12"
44
+ jupytext = " >=1.17.1,<2"
45
+ ipympl = " >=0.9"
42
46
43
- [pypi-dependencies ]
47
+ [feature . base . pypi-dependencies ]
44
48
sphinx = " >=8.0.2"
45
49
myst-nb = " >=1.1"
46
50
jupytext = " >=1.16"
@@ -49,19 +53,59 @@ sphinx-copybutton = ">=0.5"
49
53
sphinx-design = " *"
50
54
pytest-custom_exit_code = " *"
51
55
56
+ [feature .py312 ]
57
+ platforms = [" linux-64" , " osx-64" , " osx-arm64" , " win-64" ]
58
+
52
59
[feature .py312 .dependencies ]
53
60
python = " 3.12.*"
54
61
62
+ [feature .py313 ]
63
+ platforms = [" linux-64" , " osx-64" , " osx-arm64" , " win-64" ]
64
+
55
65
[feature .py313 .dependencies ]
56
66
python = " 3.13.*"
57
67
58
- [feature .jupyterlite .dependencies ]
68
+ [feature .jupyterlite-runtime ]
69
+ channels = [" https://repo.mamba.pm/emscripten-forge" , " conda-forge" ]
70
+ platforms = [" emscripten-wasm32" ]
71
+
72
+ [feature .jupyterlite-runtime .dependencies ]
73
+ xeus-python = " *"
74
+ python = " >=3.11"
75
+ matplotlib = " >=3.9"
76
+ ipympl = " >=0.9"
77
+ jupytext = " >=1.16"
78
+
79
+ [feature .jupyterlite-host ]
80
+ channels = [" conda-forge" ]
81
+ platforms = [" linux-64" , " osx-64" , " osx-arm64" , " win-64" ]
82
+
83
+ [feature .jupyterlite-host .dependencies ]
59
84
jupyterlab = " ~=4.2.4"
60
85
jupyterlite-core = " ==0.4.0"
61
- jupyterlite-pyodide-kernel = " ==0.4.1 "
86
+ jupyterlite-xeus = " * "
62
87
notebook = " ~=7.2.1"
88
+ jupyterlab-myst = " >=2.4"
89
+ jupytext = " >=1.16"
90
+ ipympl = " >=0.9"
91
+
92
+ [feature .jupyterlite-host .tasks ]
93
+ setup_wasm = {cmd = " pixi install -e jupyterlite-runtime" , inputs = [" pixi.lock" ]}
94
+ convert_ipynbs = {cmd = " bash convert_all_jupyterlite.sh" , inputs = [" tutorials/" ], outputs = [" _build/ipynbs" ]}
95
+
96
+ [feature .jupyterlite-host .tasks .build_wasm ]
97
+ cmd = " jupyter lite build --XeusAddon.prefix=.pixi/envs/jupyterlite-runtime --contents _build/ipynbs/tutorials --output-dir _build/html/jupyterlite --settings-overrides=.binder/overrides.json --log-level DEBUG"
98
+ depends-on = [" setup_wasm" , " convert_ipynbs" ]
99
+ outputs = [" _build/html/jupyterlite/" ]
100
+ inputs = [" pixi.lock" , " tutorials/" ]
101
+
102
+ [feature .jupyterlite-host .tasks .start_wasm ]
103
+ cmd = " python -m http.server 8000 -d _build/html/jupyterlite/"
104
+ depends-on = [" build_wasm" ]
63
105
64
106
[environments ]
65
- py312 = [" py312" ]
66
- py313 = [" py313" ]
67
- jupyterlite = [" jupyterlite" ]
107
+ default = [" base" ]
108
+ py312 = [" base" , " py312" ]
109
+ py313 = [" base" , " py313" ]
110
+ jupyterlite-runtime = [" jupyterlite-runtime" ]
111
+ jupyterlite-host = [" jupyterlite-host" ]
0 commit comments