Skip to content

Adding New Documentation Pages

Bill Hamilton edited this page Jun 22, 2022 · 2 revisions

A new documentation page is required for new modules, classes, and/or functions.

On your branch, you can test the docs build locally, and when it is submitted as a pull request, Read the Docs will build and preview your documentation.

Steps to add documentation pages

  1. Create a new rst file in the docs folder for your class.

    For an example of the Sphinx auto generation functionality, see docs/hybrid/flicker.rst for autoclass and automodule.

    Getting the comments to render properly depends on correct formatting. Refer to Sphinx RTD Tutorial on Writing Docstrings

  2. Add the file to the index.rst (or another table of contents, if applicable)

  3. Install your development version of HOPP: pip install --editable .

  4. Install the Read the Docs theme: pip install sphinx-rtd-theme

  5. Build locally: cd docs; make html. See if there are any errors or warnings, which will cause the ReadTheDocs build to fail the check for the pull request. The documentation will be in docs/_build/html/index.html