Contributing to the Docs#
We welcome all documentation contributions, from fixing small typos to adding comprehensive tutorials. This guide will help you get started.
Prerequisites#
Before contributing, please read our contributing guide to understand our workflow.
To test the changes you make to the docs, install the package with Poetry (development mode) which includes the Jupyter book package. This will allow you to build the documentation locally via the command prompt so long as the python environment activated.
Types of Documentation Contributions#
1. Fixing typos and small changes#
Navigate to the relevant file in the
docs/
directoryMake your changes
From the top level of the repo, build the docs locally to verify your changes (drop the
--all
flag to build only the changed files):jupyter-book build docs --all
Open the generated file
docs/_build/html/index.html
in your browser to preview.
2. Adding tutorials#
Create a new Jupyter notebook in
docs/tutorials/
Include:
Clear introduction and objectives
Step-by-step instructions
Code examples
Add your tutorial to the table of contents:
Open
_toc.yml
in the docs/ directoryAdd an entry for your new tutorial
Build and verify the docs as described above
3. Updating API documentation#
The API documentation is generated from source code docstrings. There are two scenarios:
Modifying existing API docs#
Simply update the docstring in the source code and rebuild:
jupyter-book build docs --all
Adding new API docs#
Create a new
.rst
file indocs/community/reference/
Add the file to
_toc.yml
Ensure your source code has comprehensive docstrings
Build the documentation