Documentation workflow¶
API pages are generated with autodoc from module docstrings.
Notebook pages are rendered natively by
nbsphinxfrom the already-saved cell outputs in each.ipynb(nbsphinx_execute = 'never'— notebooks are never re-executed during the docs build, since several need GPUs / model downloads / hours of training). This gives notebook pages full Furo theming (fonts, colours, dark mode, sidebar), unlike the raw JupyterLab styling of a plainnbconvertexport.Sphinx needs sources inside
docs/, so abuilder-initedhook indocs/conf.py(sync_notebooks) copies the top-levelnotebooks/directory intodocs/notebooks/before every build. This is a real copy, not a symlink — a symlink breaks nbsphinx’s relative-path computation for extracted output images and silently drops every embedded figure from the build.docs/notebooks/is gitignored and regenerated on each build;notebooks/at the repo root remains the single source of truth.Each
docs/notebook_examples/*.rstlanding page links to its notebooks via:doc:references (e.g.:doc:`</notebooks/io/io_afm1>`) and a hiddentoctree— update both when adding or removing a notebook.Build docs locally with
make htmlinsidedocs/.