Skip to content

Commit 5b5d4d6

Browse files
ksundendanielballan
authored andcommitted
WIP: enable jupyterlite pixi tasks
1 parent d8cca2b commit 5b5d4d6

File tree

3 files changed

+66
-9
lines changed

3 files changed

+66
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ target/
9595
# Jupyter Notebook
9696
.ipynb_checkpoints
9797

98+
# Jupyterlite Database
99+
.jupyterlite.doit.db
100+
98101
# IPython
99102
profile_default/
100103
ipython_config.py

environment.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: xeus-kernels
2+
channels:
3+
- https://repo.mamba.pm/emscripten-forge
4+
- conda-forge
5+
dependencies:
6+
- xeus-python
7+
- xeus-lua
8+
- xeus-nelson
9+
- numpy
10+
- matplotlib
11+
- pillow
12+
- ipywidgets
13+
- ipympl

pixi.toml

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ authors = [
55
"Ross Barnowski <rossbar@caltech.edu>",
66
"Kyle Sunden <git@ksunden.space>",
77
]
8-
channels = ["conda-forge"]
8+
channels = ["https://repo.mamba.pm/emscripten-forge", "conda-forge"]
99
description = "Add a short description here"
1010
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"]
1212
version = "0.1.0"
1313

1414
[tasks]
@@ -34,11 +34,11 @@ scripts = ["bash .binder/postBuild"]
3434
[dependencies]
3535
python = ">=3.11"
3636
matplotlib-base = ">=3.9"
37-
ipympl = ">=0.9"
38-
jupyterlab = ">=4.2"
39-
jupyterlab-myst = ">=2.4"
37+
#jupyterlab = ">=4.2"
38+
#jupyterlab-myst = ">=2.4"
4039
pytest = ">=8.3.5,<9"
41-
nbval = ">=0.11.0,<0.12"
40+
#nbval = ">=0.11.0,<0.12"
41+
#jupytext = ">=1.17.1,<2"
4242

4343
[pypi-dependencies]
4444
sphinx = ">=8.0.2"
@@ -48,20 +48,61 @@ sphinx-book-theme = ">=1.1"
4848
sphinx-copybutton = ">=0.5"
4949
sphinx-design = "*"
5050
pytest-custom_exit_code = "*"
51+
#sphinx = ">=8.0.2"
52+
#myst-nb = ">=1.1"
53+
#jupytext = ">=1.16"
54+
#sphinx-book-theme = ">=1.1"
55+
#sphinx-copybutton = ">=0.5"
56+
57+
[feature.py312]
58+
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
5159

5260
[feature.py312.dependencies]
5361
python = "3.12.*"
5462

63+
[feature.py313]
64+
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
65+
5566
[feature.py313.dependencies]
5667
python = "3.13.*"
5768

58-
[feature.jupyterlite.dependencies]
69+
[feature.jupyterlite-runtime]
70+
channels = ["https://repo.mamba.pm/emscripten-forge", "conda-forge"]
71+
platforms = ["emscripten-wasm32"]
72+
73+
[feature.jupyterlite-runtime.dependencies]
74+
xeus-python = "*"
75+
python = "*"
76+
matplotlib = "*"
77+
ipympl = "*"
78+
jupytext = "*"
79+
80+
[feature.jupyterlite-host]
81+
channels = ["conda-forge"]
82+
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
83+
84+
[feature.jupyterlite-host.dependencies]
5985
jupyterlab = "~=4.2.4"
6086
jupyterlite-core = "==0.4.0"
61-
jupyterlite-pyodide-kernel = "==0.4.1"
87+
jupyterlite-xeus = "*"
6288
notebook = "~=7.2.1"
89+
jupyterlab-myst = ">=2.4"
90+
91+
[feature.jupyterlite-host.tasks]
92+
setup_wasm = {cmd = "pixi install -e jupyterlite-runtime", inputs = ["pixi.lock"]}
93+
94+
[feature.jupyterlite-host.tasks.build_wasm]
95+
cmd = "jupyter lite build --XeusAddon.prefix=.pixi/envs/jupyterlite-runtime --contents tutorials --output-dir build/html/jupyterlite --settings-overrides=jupyterlab_config.json --log-level DEBUG"
96+
depends-on = ["setup_wasm"]
97+
outputs = ["build/html/jupyterlite/"]
98+
inputs = ["pixi.lock", "tutorials/"]
99+
100+
[feature.jupyterlite-host.tasks.start_wasm]
101+
cmd = "python -m http.server 8000 -d build/html/jupyterlite/"
102+
depends-on = ["build_wasm"]
63103

64104
[environments]
65105
py312 = ["py312"]
66106
py313 = ["py313"]
67-
jupyterlite = ["jupyterlite"]
107+
jupyterlite-runtime = ["jupyterlite-runtime"]
108+
jupyterlite-host = ["jupyterlite-host"]

0 commit comments

Comments
 (0)