Generating Documentation¶
If you’ve added a new feature, or if you want to contribute to the documentation directly, you will need to install Sphinx automates the process of creating documentation pages:
Via pip:
pip install sphinx sphinx_autodoc_typehints sphinx_copybutton sphinxcontrib.programoutput myst_parser furo
On linux:
apt-get install python3-sphinx
On windows, you can install it via conda (or manually):
conda install sphinx
After the dependency is taken care of:
Generate basic documentation files for the package (probably already present in the repo so just skip):
sphinx-quickstart docs/
From the main folder, navigate to the
documentation
folder usingcd documentation
.If you’ve changed documentation of the Python code in the
core
folder, run autodoc so these changes are compiled by Sphinx:sphinx-apidoc -f -o source/ ../core/<modules>
If a new module is created, make sure to add it to the conf.py file in the extensions list.
Clean previous build files with
make clean
.Build the HTML doc pages
make html
.Copy the new contents to docs folder for github pages
make linuxgit
ormake github
.Commit your changes and open a PR as described above.