From 0b2fdcff32c6209c8428c6c9f55c73eb8623d38c Mon Sep 17 00:00:00 2001 From: Dan Allan Date: Wed, 14 May 2025 14:55:39 -0700 Subject: [PATCH 1/3] Explain how to launch executable tutorials. --- conf.py | 1 + index.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ pixi.toml | 1 + 3 files changed, 53 insertions(+) diff --git a/conf.py b/conf.py index bcb13b2..4523b3e 100644 --- a/conf.py +++ b/conf.py @@ -14,6 +14,7 @@ extensions = [ "myst_nb", "sphinx_copybutton", + "sphinx_design", ] myst_enable_extensions = [ diff --git a/index.md b/index.md index 3c7e636..7d022a3 100644 --- a/index.md +++ b/index.md @@ -1,5 +1,53 @@ # Executable Tutorials Repo setup best practices +## How to Run The Code Yourself + +`````{tab-set} +````{tab-item} Locally with pixi + +Clone the repository and launch JupyterLab. + +```sh +git clone https://github.com/scientific-python/executable-tutorials +cd executable-tutorials + +pixi run start +``` +```` + +````{tab-item} Locally with pip + +Clone the repository, create an enviornment, install the requirements, and +launch JupyterLab. + + +```sh +git clone https://github.com/scientific-python/executable-tutorials +cd executable-tutorials + +python -m venv venv +source venv/bin/activate + +pip install -r requirements.txt +jupyter lab +``` +```` + +````{tab-item} In Cloud with Binder + +[Open on Binder][]. + +```` + +````{tab-item} JupyterLite (experimental) + +[Open with JupyterLite][]. + +```` +````` + +Or, instead of _running_ the code, you may view the code and results by +following the links below. ## Example Tutorials @@ -26,3 +74,6 @@ caption: Contributing contributing maintainer-guide ``` + +[Open on Binder]: https://mybinder.org/v2/gh/scientific-python/executable-tutorials/main?urlpath=tree/tutorials/ +[Open with JupyterLite]: https://scientific-python.github.io/executable-tutorials/jupyterlite/lab/index.html diff --git a/pixi.toml b/pixi.toml index 56148de..b294270 100644 --- a/pixi.toml +++ b/pixi.toml @@ -46,6 +46,7 @@ myst-nb = ">=1.1" jupytext = ">=1.16" sphinx-book-theme = ">=1.1" sphinx-copybutton = ">=0.5" +sphinx-design = "*" pytest-custom_exit_code = "*" [feature.py312.dependencies] From b2a72cac7312d127a21b3c2f72f690f79ad5beca Mon Sep 17 00:00:00 2001 From: Dan Allan Date: Wed, 14 May 2025 15:02:02 -0700 Subject: [PATCH 2/3] Add sphinx-design to requirementst.txt as well --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 6c58584..ebee7bf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ sphinx myst-nb sphinx-book-theme +sphinx-design ipympl sphinx-copybutton # For tutorials From 2ff826072ebb1f614fc88333d30259e54d95cb08 Mon Sep 17 00:00:00 2001 From: Dan Allan Date: Wed, 14 May 2025 16:40:50 -0700 Subject: [PATCH 3/3] Add dot --- index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.md b/index.md index 7d022a3..cd34eab 100644 --- a/index.md +++ b/index.md @@ -25,8 +25,8 @@ launch JupyterLab. git clone https://github.com/scientific-python/executable-tutorials cd executable-tutorials -python -m venv venv -source venv/bin/activate +python -m venv .venv +source .venv/bin/activate pip install -r requirements.txt jupyter lab