diff --git a/docs/contributing.md b/docs/contributing.md index a5c092df..df76ad3f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -316,39 +316,31 @@ The documentation is written in Markdown) and built using [Sphinx](https://www.sphinx-doc.org/en/master/). The documentation source files can be found in the {code}`docs/` directory. -On top of the API documentation, we provide a set of tutorials and examples that -demonstrate how to use the library. These are written in Markdown using -[myst-nb](https://myst-nb.readthedocs.io/en/latest/), which allows executing -Python code blocks in the documentation. The code blocks are executed during the -documentation build process, and the output is included in the documentation. -This allows us to provide up-to-date examples and tutorials that are guaranteed -to work with the latest version of the library. +Tutorials use [MyST-NB](https://myst-nb.readthedocs.io/) Markdown notebooks. +Only `{code-cell}` blocks in notebook pages execute; ordinary code fences are +illustrative. Keep required setup visible, show useful output, and assert the +behavior that each example demonstrates. Use local simulation for executable +examples; leave credentials and remote-device deployment as configuration +recipes. -You can build the documentation using the {code}`nox` session {code}`docs`. +Use the documentation session to install Python dependencies, build the package +and generated references, and render the examples: ```console -nox -s docs +uvx nox --non-interactive -s docs ``` -This will install all dependencies for building the documentation in an isolated -environment, build the Python package, and then build the documentation. It will -then host the documentation on a local web server for you to view. +Install the project's native build requirements first. C++ API generation needs +Doxygen; DD visualizations also need the Graphviz `dot` executable. The session +manages Python packages, not these system tools. -:::{note} - -If you do not want to use {code}`nox`, you can also build the documentation -directly using {code}`sphinx-build`. This requires that you have the project and -its documentation dependencies installed in your virtual environment (e.g., by -running {code}`uv sync`). +Omit `--non-interactive` to serve the documentation while editing. To check +external links, run: ```console -sphinx-build -b html docs/ docs/_build +uvx nox --non-interactive -s docs -- -b linkcheck ``` -The docs can then be found in the {code}`docs/_build` directory. - -::: - ## Tips for Development If something goes wrong, the CI pipeline will notify you. Here are some tips for