|
1 | 1 | # Executable Tutorials
|
2 | 2 |
|
3 |
| -A repository demonstrating one way to manage and distribute interactive tutorials. |
4 |
| -See the [Guide to Contributing](https://scentific-python.org/executable-tutorials/contributing.html) |
5 |
| -for a good overview of what this is like to use. |
| 3 | +## Use Cases |
6 | 4 |
|
7 |
| -## Demo Links |
| 5 | +Many organizations maintain collections of tutorials addressing realistic |
| 6 | +problems in a science domain, with runnable code examples written and |
| 7 | +kept current by experts in the tools. They are useful as: |
8 | 8 |
|
9 |
| -- **[Tutorials](https://github.com/scientific-python/executable-tutorials/tree/main/tutorials)** are written in MyST Markdown. |
10 |
| -- Tutorials can be easily edited as notebooks in JupyterLab. |
11 |
| -- Executed tutorials are **[published](https://scientific-python.github.io/exeuctable-tutorials/)** on a GitHub Pages site. |
12 |
| -- **[Jupyter Lite (beta)](https://scientific-python.github.io/executable-tutorials/jupyterlite/lab/index.html)** (works only on the basic executable example so far, missing dependencies for others) |
13 |
| -- **[Binder](https://mybinder.org/v2/gh/scientific-python/executable-tutorials/notebooks)** |
| 9 | +- A trove of working snippets to copy and paste |
| 10 | +- A maintained resource for self-guided learning |
| 11 | +- A ready-to-use curriculum for hands-on workshops |
| 12 | +- A suite of science domain-specific "integration tests" for the showcased libraries |
14 | 13 |
|
15 |
| -### Notes on the notebook file format |
| 14 | +## Key Features |
16 | 15 |
|
17 |
| -We do use MyST Markdown format for the notebooks, please visit [the upstream documentation](https://mystmd.org/guide/md-vs-ipynb) to learn more about the reasoning behind the choice. |
18 |
| -However, we add it here that you can easily have the same user experience in JupyterLab if these two dependencies are installed: |
19 |
| - - [jupytext library](https://pypi.org/project/jupytext/) |
20 |
| - - [jupyterlab-myst JupyterLab extension](https://pypi.org/project/jupyterlab-myst/) |
| 16 | +This repository demonstrates one way to configure a collection of tutorials, |
| 17 | +covering some core features: |
21 | 18 |
|
| 19 | +- Source is in [MyST Markdown][] which is easy for humans to edit and review. |
| 20 | +- The executed examples—code and results—are published as a |
| 21 | + [static site][static site example]. |
| 22 | +- The examples can be opened as Jupyter notebooks to run and edit: |
| 23 | + - In a user's local environment |
| 24 | + - In the cloud using [Binder][binder example] |
| 25 | + - (Experimental) In the user's browser via a [Jupyter Lite app][jupyterlite example] |
| 26 | +- The examples can be tested using `pytest`, both locally and on CI. |
22 | 27 |
|
23 |
| -## Goals |
| 28 | +## Try It Out |
24 | 29 |
|
25 |
| -- Make content easy to explore and try in a variety of modes: |
26 |
| - - interactive and non-interactive |
27 |
| - - local and cloud-based |
28 |
| - - Jupyter and not-Jupyter |
29 |
| -- Document an accessible development workflow, so that non-experts can contribute. |
30 |
| -- Keep the infrastructure as simple as possible. |
| 30 | +- Read the [published examples][static site example]. |
31 | 31 |
|
32 |
| -## To Do |
| 32 | +- Open it on [Binder][binder example] to run the examples in the cloud. |
33 | 33 |
|
34 |
| -- Test execution _of changed tutorials only_ in CI on PR. |
35 |
| -- Set up devcontainer. |
36 |
| -- Add example with additional dependencies. |
| 34 | +- Download and run the examples locally. |
37 | 35 |
|
38 |
| -## Prior Art |
| 36 | + ```sh |
| 37 | + git clone https://github.com/scientific-python/executable-tutorials |
| 38 | + ``` |
39 | 39 |
|
40 |
| -Examples that this is drawing from: |
| 40 | + For users of [pixi][]: |
41 | 41 |
|
42 |
| -- https://github.com/Caltech-IPAC/irsa-tutorials |
43 |
| -- https://github.com/MotherDuck-Open-Source/sql-tutorial |
| 42 | + ```sh |
| 43 | + pixi run start |
| 44 | + ``` |
| 45 | + |
| 46 | + Alternatively, install the requirements with pip and start JupyterLab. |
| 47 | + |
| 48 | + ```sh |
| 49 | + pip install -r requirements.txt |
| 50 | + jupyter lab |
| 51 | + ``` |
| 52 | + |
| 53 | +## Make Your Own |
| 54 | + |
| 55 | +See the [Guide for Maintainers][] to create your own collection of tutorials. |
| 56 | + |
| 57 | +[Myst Markdown]: https://mystmd.org/guide/typography |
| 58 | +[static site example]: https://scientific-python.github.io/exeuctable-tutorials/ |
| 59 | +[binder example]: https://mybinder.org/v2/gh/scientific-python/executable-tutorials/main |
| 60 | +[jupyterlite example]: https://scientific-python.github.io/executable-tutorials/jupyterlite/lab/index.html |
| 61 | +[pixi]: https://pixi.sh/ |
| 62 | +[Guide for Maintainers]: https://scientific-python.github.io/executable-tutorials/maintainer-guide.html |
0 commit comments