Skip to content

Commit afde03d

Browse files
authored
Merge pull request #57 from danielballan/how-to-run
Explain how to launch executable tutorials.
2 parents 47abada + 2ff8260 commit afde03d

File tree

4 files changed

+54
-0
lines changed

4 files changed

+54
-0
lines changed

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
extensions = [
1515
"myst_nb",
1616
"sphinx_copybutton",
17+
"sphinx_design",
1718
]
1819

1920
myst_enable_extensions = [

index.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,53 @@
11
# Executable Tutorials Repo setup best practices
22

3+
## How to Run The Code Yourself
4+
5+
`````{tab-set}
6+
````{tab-item} Locally with pixi
7+
8+
Clone the repository and launch JupyterLab.
9+
10+
```sh
11+
git clone https://github.com/scientific-python/executable-tutorials
12+
cd executable-tutorials
13+
14+
pixi run start
15+
```
16+
````
17+
18+
````{tab-item} Locally with pip
19+
20+
Clone the repository, create an enviornment, install the requirements, and
21+
launch JupyterLab.
22+
23+
24+
```sh
25+
git clone https://github.com/scientific-python/executable-tutorials
26+
cd executable-tutorials
27+
28+
python -m venv .venv
29+
source .venv/bin/activate
30+
31+
pip install -r requirements.txt
32+
jupyter lab
33+
```
34+
````
35+
36+
````{tab-item} In Cloud with Binder
37+
38+
[Open on Binder][].
39+
40+
````
41+
42+
````{tab-item} JupyterLite (experimental)
43+
44+
[Open with JupyterLite][].
45+
46+
````
47+
`````
48+
49+
Or, instead of _running_ the code, you may view the code and results by
50+
following the links below.
351

452
## Example Tutorials
553

@@ -26,3 +74,6 @@ caption: Contributing
2674
contributing
2775
maintainer-guide
2876
```
77+
78+
[Open on Binder]: https://mybinder.org/v2/gh/scientific-python/executable-tutorials/main?urlpath=tree/tutorials/
79+
[Open with JupyterLite]: https://scientific-python.github.io/executable-tutorials/jupyterlite/lab/index.html

pixi.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ myst-nb = ">=1.1"
4646
jupytext = ">=1.16"
4747
sphinx-book-theme = ">=1.1"
4848
sphinx-copybutton = ">=0.5"
49+
sphinx-design = "*"
4950
pytest-custom_exit_code = "*"
5051

5152
[feature.py312.dependencies]

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
sphinx
33
myst-nb
44
sphinx-book-theme
5+
sphinx-design
56
ipympl
67
sphinx-copybutton
78
# For tutorials

0 commit comments

Comments
 (0)