From 9f85d007f00b4d3d3d13ef0f84c1d52eeb9dbba3 Mon Sep 17 00:00:00 2001 From: Guen Prawiroatmodjo Date: Fri, 27 Jun 2025 18:22:57 -0700 Subject: [PATCH 1/2] add thebe live code --- conf.py | 4 +++- pixi.toml | 1 + requirements.txt | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 4523b3e..b726d8e 100644 --- a/conf.py +++ b/conf.py @@ -15,6 +15,7 @@ "myst_nb", "sphinx_copybutton", "sphinx_design", + "sphinx_thebe", ] myst_enable_extensions = [ @@ -55,6 +56,7 @@ "use_issues_button": True, "use_edit_page_button": True, "launch_buttons": { - "binderhub_url": "https://mybinder.org" + "binderhub_url": "https://mybinder.org", + "thebe": True, }, } diff --git a/pixi.toml b/pixi.toml index c7afd6d..379de7b 100644 --- a/pixi.toml +++ b/pixi.toml @@ -43,6 +43,7 @@ pytest = ">=8.3.5,<9" nbval = ">=0.11.0,<0.12" jupytext = ">=1.17.1,<2" ipympl = ">=0.9" +sphinx-thebe = ">=0.3.1" [feature.base.pypi-dependencies] sphinx = ">=8.0.2" diff --git a/requirements.txt b/requirements.txt index ebee7bf..47cd6b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ sphinx myst-nb sphinx-book-theme sphinx-design +sphinx-thebe ipympl sphinx-copybutton # For tutorials From 91af27b9f45284bd6bd5bd160de3bfac94bff6b6 Mon Sep 17 00:00:00 2001 From: Guen Prawiroatmodjo Date: Sat, 28 Jun 2025 10:02:53 -0700 Subject: [PATCH 2/2] add a pixi command to run an http server --- pixi.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pixi.toml b/pixi.toml index 379de7b..ca42421 100644 --- a/pixi.toml +++ b/pixi.toml @@ -27,6 +27,7 @@ build = { cmd = [ clean = "rm -rf _build/*" start = "jupyter lab --FileContentsManager.preferred_dir tutorials" test = "bash ./test.sh" +serve = "python -m http.server 8000 -d _build/html" [feature.base.activation] # Workaround overrides JupyterLab configuration (at the environment level) to