Skip to content

Adding Sphinx API documentation

Matthew Bourque edited this page May 31, 2018 · 9 revisions

In pull requests that introduces new modules, it is important to include sphinx documentation as part of the PR. To do this, simply add a .rst file to the jwql/docs/source/ directory named <module_name>.rst. This file should look something like this:

***********
module_name
***********

.. automodule:: jwql.subpackage_name.module_name
    :members:
    :undoc-members:

Additionally, include a pointer to the new .rst file in the jwql/source/index.rst file under the API documentation section, for example:

API documentation
=================

.. toctree::
   :maxdepth: 1
   :caption: Contents:

   permissions.rst
   preview_image.rst
   utils.rst
   tests.rst
   <new_rst_file>.rst

These changes to the repository should be committed and pushed as part of the pull request.