This version of the documentation is NOT an official release. You are looking at ‘latest’, which is in active and ongoing development. You can change versions on the bottom left of the screen.
User-level documentation workflow¶
What you need to know¶
We use Sphinx to generate documentation and Read the Docs to publish it. Sphinx uses reStructuredText as the base format for the documentation. To learn more about the syntax, check out this quick reference.
The NEST simulator documentation lives alongside its code. It is
contained in the
doc/userdoc directory within the NEST source
code repository on GitHub.
We work with GitHub as a web-based hosting service for Git. Git allows us to keep our versions under control, with each release of NEST having its own documentation.
This workflow aims for the concept of user-correctable documentation.
This workflow shows you how to create user-level documentation for NEST. For the developer documentation, please refer to our Developer documentation workflow.
Changing the documentation¶
If you notice any errors or weaknesses in the documentation, please submit an Issue in our GitHub repository.
Setting up your environment¶
We recommend that you set up a full NEST developer environment using Conda (for details on Conda, see Tips for installing NEST with conda):
conda env create -f <nest_source_dir>/extras/conda-nest-simulator-dev.yml conda activate nest-simulator-dev
If you later on want to deactivate or delete the build environment:
conda deactivate conda remove --name nest-simulator-dev --all
If you want to install only a minimal set of packages for building the documentation and avoid using Conda, you can use pip:
pip3 install -r <nest_source_dir>/extras/nest-simulator-doc-requirements.txt
Generating documentation with Sphinx¶
Now that you activated your environment, you can generate HTML files using Sphinx.
You can build and preview the documentation locally by running the following commands.
1. Go to the build directory of NEST (i.e., the
directory where you ran
Generate HTML files
Preview files. They are located in
To install the documentation under
<nest_install_dir> along with
the rest of NEST, the
make html command can be followed by
If you want to view the files after installation, you can run
Editing and creating pages¶
To edit existing reStructuredText files or to create new ones, follow the steps below:
You can edit and/or add
.rstfiles in the
doc/userdocdirectory using your editor of choice.
If you create a new page, open
doc/userdocdirectory and add the file name under
.. toctree::. This will ensure it appears on the NEST simulator documentation’s table of contents.
If you rename or move a file, please make sure you update all the corresponding cross-references.
Save your changes.
Re-render documentation as described above.
You can find our full documentation style guide here.
Previewing on Read the Docs (optional)¶
Proceed as follows to preview your version of the documentation on Read the Docs.
Check that unwanted directories are listed in
_build _static _templates
Add, commit and push your changes to GitHub.
Go to Read the Docs. Sign up for an account if you don’t have one.
Import the project.
Enter the details of your project in the
repofield and hit
Build your documentation.
This allows you to preview your work on your Read the Docs account. In order to see the changes on the official NEST simulator documentation, please submit a pull request.
Creating pull request¶
Once your documentation work is finished, you can create a
pull request <../contribute/development_workflow to the
branch of the NEST Source Code Repository. Your pull request will be reviewed
by the NEST Documentation Team!