This is a Sphinx extension to automatically generate API pages for whole modules. It was originally developed for the Astropy project but is now available as a standalone package since it can be used for any other package. The documentation can be found on ReadTheDocs.
I forked this repo for use with my proplot project and added the following features:
- Skip over class methods that are public, but do not have their own
__doc__
attributes. This prevents inheriting and displaying documentation from external projects, namely matplotlib. - Include
__getitem__
,__getattr__
,__setitem__
, and__setattr__
in the list of builtin methods that are not ignored by the documentation generator. I use these to document some dictionary/list subclasses. - Give class methods and attributes their own stub pages, instead of putting all class methods and attributes on a single page. This also required adding the new files to
env.found_docs
and reordering the event hooks inautomodsumm.py
so thatsphinx_automodapi
is called beforeautosummary
. This wayautosummary
sees the new class pages and can build the appropriate stubs.
To run the tests, you can either do:
pytest sphinx_automodapi
or if you have tox installed:
tox -e test