Skip to content

Updating Documentation with Sphinx

Jasper edited this page Apr 3, 2022 · 5 revisions

This documentation page is created using a python documentation generator named Sphinx. Sphinx generates documentation for functions of a python program primarily by reading the existing comments in the codes. The generated documentation page along with other necessary resources is stored in the directory docs. In order to keep the page updated, whenever a significant change is made in the pipeline, the comments also need to be updated accordingly. Other than making well-formatted comments (generally, a comment that works well with Sphinx follows the PEP 8 style guide, which can be checked using Pylint), please follow the following steps to update the documentation page on your branch before creating a pull request or making a commit:

  1. If you are not using starmaker, make sure you have Sphinx installed. You can install Sphinx by running pip install -U Sphinx.

  2. Go to the directory named docs in the pipeline

  3. Run make html

You can check if the expected changes are made on the documentation page by viewing index.html in docs/_build/html/.

The steps above are the bare minimum you need to update the documentation page. If a new function is created or some major changes need to be done to the documentation page, you will need to know how to properly use Sphinx. For more information on customizing the documentation page with Sphinx, please refer to: Documentation of Sphinx

A good source for learning the basics of Sphinx: Sphinx Tutorial