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:

  1. Generate basic documentation files for the package (probably already present in the repo so just skip):

    sphinx-quickstart docs/
    
  2. From the main folder, navigate to the documentation folder using cd documentation.

  3. 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>
    
  4. If a new module is created, make sure to add it to the conf.py file in the extensions list.

  5. Clean previous build files with make clean.

  6. Build the HTML doc pages make html.

  7. Copy the new contents to docs folder for github pages make linuxgit or make github.

  8. Commit your changes and open a PR as described above.