You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-11Lines changed: 16 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,35 +4,40 @@ The documentation follows the [Diataxis approach](https://diataxis.fr/).
4
4
5
5
## Building the Docs
6
6
7
-
1. Create a virtual environment and activate it.
8
-
2. Install the requirements with `pip install -r docs-requirements.txt`.
9
-
3. Create a new branch. The main branch is protected so you can't push to it directly.
10
-
4. Build the docs locally with `./build-docs.sh`. The new version is available in `docs/build/html/index.html`.
11
-
5. When the local version looks good, push your changes and make a pull request. Pushes to main will build and deploy the new version.
7
+
1. Clone the repository
8
+
2. Create a virtual environment and activate it.
9
+
3. Install the requirements with `pip install -r requirements.txt -r docs/requirements.txt`.
10
+
4. Create a new branch. The main branch is protected so you can't push to it directly.
11
+
5. Build the docs locally with `./build-docs.sh`. The new version is available in `docs/build/html/index.html`.
12
+
6. When the local version looks good, push your changes and make a pull request. Pushes to main will build and deploy the new version.
12
13
13
14
For the notebooks it is necessary to have the required pyAML packages installed in the environment.
14
-
If you add a new dependency remember to also add it in the requirements.txt or it will not be built correctly.
15
+
If you add a new dependency remember to also add it in the `docs/requirements.txt` or it will not be built correctly.
15
16
16
-
## Where to Place Content
17
+
## Developing Content
17
18
18
19
Content should be placed in these categories:
19
20
20
21
#### [Tutorials](https://diataxis.fr/tutorials/)
21
22
22
23
A tutorial is a practical activity where learning is done by doing something meaningful towards an achievable goal.
23
-
The purpose is not to get something done but to help to learn.
24
+
The purpose is not to get something done but to help to learn. It should be structured as a lesson. The recommended format is to use a Jupyter notebook.
24
25
25
-
It should be structured as a lesson. The recommended format is to use a Jupyter notebook.
26
+
The tutorials are rendered using `sphinx-gallery`. They need to be written as a `.py` file using `rst` and not directly as Jupyter notebooks. You can use `jupytext` to make the workflow easier.
Jupytext can be used in the terminal but if you are using an IDE there are extensions available which makes it easier. In VS Code install `Jupytext for Notebooks (congyiwu)`. You should then be able to right click on a `.py` file and choose `Open as a Jupyter Notebook`. You can run and modify the notebook as normal and the changes should happen in the `.py` automatically. Just remember that `sphinx-gallery` requires `rst` while notebooks use `markdown` so comments might not be rendered exactly the same.
29
+
30
+
To create a new tutorial you can start to write it as a notebook and then use the functionality to convert to `.py`. If you have written comments as markdown you need to manually convert them to `rst`.
0 commit comments