I am working on a documentation for a Python library for isogeometric analysis.
My team decided to use Sphinx and was very pleased with the initial draft, but soon we noticed that maintaining the documentation is more tedious than expected.
In particular, hard coding all method and class names of a module for the ..autosummary:: directive quickly causes problems if one is not careful.
An example .rst file of one of the submodules looks like this:
module.submodule
================
.. automodule:: package.module.submodule
.. rubric:: Overview
.. currentmodule:: package.module.submodule
.. autosummary::
method1
method2
class1
class2
class3
.. rubric:: Class inheritance
.. inheritance-diagram:: package.module.submodule
.. rubric:: Details
.. automodule:: package.module.submodule
:members:
:undoc-members:
:exclude-members:
:show-inheritance:
The initial .. automodule:: directive includes the docstring of the submodule at the top of the page.
The following .. autosummary:: directive includes a list of all methods and classes declared in the submodule.
.. inheritance-diagram:: includes an inheritance diagram (of course).
And finally, unfortunately including a duplicate module docstring, we included a detailed list of everything inside the module using .. automodule:: once again.
The issue is that we have to explicitly mention all method and class names in the .. autosummary:: part. A :members: option, compare with .. automodule::, does not exist.
Is there a way to automate this process that I have overlooked while browsing stackoverflow?