Thanks to visit codestin.com
Credit goes to github.com

Skip to content

proplot-dev/sphinx-automodapi

Repository files navigation

Azure Status Coverage Status PyPI

About

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.

Proplot modifications

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 in automodsumm.py so that sphinx_automodapi is called before autosummary. This way autosummary sees the new class pages and can build the appropriate stubs.

Running tests

To run the tests, you can either do:

pytest sphinx_automodapi

or if you have tox installed:

tox -e test

About

Sphinx extension for generating API documentation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%