Skip to content

Commit b3eef9a

Browse files
committed
Add missing cell to notebooks for Colab
1 parent d6ed164 commit b3eef9a

21 files changed

Lines changed: 406 additions & 374 deletions

.github/copilot-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@
104104

105105
- Jupyter notebooks (`docs/docs/tutorials/*.ipynb`) are **generated
106106
artifacts** — never edit them by hand. Edit only the corresponding
107-
`*.py` script, then run `pixi run notebook-convert` followed by
108-
`pixi run notebook-prepare` to regenerate the notebook.
107+
`*.py` script, then run `pixi run notebook-prepare` to regenerate the
108+
notebook.
109109

110110
## Changes
111111

docs/architecture/architecture.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -771,9 +771,8 @@ All examples below are drawn from the actual tutorials (`tutorials/`).
771771

772772
> **Notebook workflow:** Jupyter notebooks (`*.ipynb`) in
773773
> `docs/docs/tutorials/` are generated artifacts. Edit only the
774-
> corresponding `*.py` script, then run `pixi run notebook-convert`
775-
> followed by `pixi run notebook-prepare` to regenerate the notebook.
776-
> Never edit `*.ipynb` files by hand.
774+
> corresponding `*.py` script, then run `pixi run notebook-prepare` to
775+
> regenerate the notebook. Never edit `*.ipynb` files by hand.
777776
778777
### 8.1 Project Setup
779778

docs/docs/tutorials/ed-1.ipynb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "8dbf8e63",
7+
"metadata": {
8+
"tags": [
9+
"hide-in-docs"
10+
]
11+
},
12+
"outputs": [],
13+
"source": [
14+
"# Check whether easydiffraction is installed; install it if needed.\n",
15+
"# Required for remote environments such as Google Colab.\n",
16+
"import importlib.util\n",
17+
"\n",
18+
"if importlib.util.find_spec('easydiffraction') is None:\n",
19+
" %pip install easydiffraction"
20+
]
21+
},
322
{
423
"cell_type": "markdown",
524
"id": "0",

docs/docs/tutorials/ed-10.ipynb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "f42176f2",
7+
"metadata": {
8+
"tags": [
9+
"hide-in-docs"
10+
]
11+
},
12+
"outputs": [],
13+
"source": [
14+
"# Check whether easydiffraction is installed; install it if needed.\n",
15+
"# Required for remote environments such as Google Colab.\n",
16+
"import importlib.util\n",
17+
"\n",
18+
"if importlib.util.find_spec('easydiffraction') is None:\n",
19+
" %pip install easydiffraction"
20+
]
21+
},
322
{
423
"cell_type": "markdown",
524
"id": "0",

docs/docs/tutorials/ed-11.ipynb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "b38dbf4f",
7+
"metadata": {
8+
"tags": [
9+
"hide-in-docs"
10+
]
11+
},
12+
"outputs": [],
13+
"source": [
14+
"# Check whether easydiffraction is installed; install it if needed.\n",
15+
"# Required for remote environments such as Google Colab.\n",
16+
"import importlib.util\n",
17+
"\n",
18+
"if importlib.util.find_spec('easydiffraction') is None:\n",
19+
" %pip install easydiffraction"
20+
]
21+
},
322
{
423
"cell_type": "markdown",
524
"id": "0",

docs/docs/tutorials/ed-12.ipynb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "effff825",
7+
"metadata": {
8+
"tags": [
9+
"hide-in-docs"
10+
]
11+
},
12+
"outputs": [],
13+
"source": [
14+
"# Check whether easydiffraction is installed; install it if needed.\n",
15+
"# Required for remote environments such as Google Colab.\n",
16+
"import importlib.util\n",
17+
"\n",
18+
"if importlib.util.find_spec('easydiffraction') is None:\n",
19+
" %pip install easydiffraction"
20+
]
21+
},
322
{
423
"cell_type": "markdown",
524
"id": "0",

0 commit comments

Comments
 (0)