From 80f843afa2cb13805f55201783c435f34c7cd662 Mon Sep 17 00:00:00 2001 From: James Robinson Date: Fri, 30 Aug 2024 09:06:49 +0100 Subject: [PATCH] Update README.md adding guidelines for adding example notebooks to read the docs --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 29b8bee..1006e25 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,13 @@ Notes: the Python Project Template documentation on [Sphinx and Python Notebooks](https://lincc-ppt.readthedocs.io/en/latest/practices/sphinx.html#python-notebooks) +## Dev Guide - Adding notebooks to Read The Docs + +- Copy notebook into `docs/notebooks` (N.B. the notebook must have at least one section header and be using the "Python 3 (ipykernel)" kernel, not some conda env kernel that may only be installed locally) +- Update the toctree in the file `docs/notebooks.rst` +- Ensure necessary requirements are declared in `pyproject.toml` and `docs/requirements.txt`. Also, make sure that the notebook being added to the docs is using the python3 (ipykernel) kernel, not some conda env kernel that may only be installed locally +- To update the docs locally, from the `docs` dir run: `python -m sphinx -T -E -b html -d _build/doctrees -D language=en . ../_readthedocs/html` + ## Dev Guide - Updating pyproject.toml If you are adding code that requires a new dependency, this needs to be included in pyproject.toml under the `[project]' section: