Need one set of scripts / configuration using Sphinx to generate pretty documentation in an automatable manner for:
- standard .rst files that will be human written for tutorials, best practices etc.
- python source code
- click - for CLI
- Change one or more modules in this package to mimic some click related documentation
- Include click-sphinx to generate documentation for click stuff
This repo contains a Python package demonstrating the new
automatic package recursion functionality
in sphinx.ext.autosummary
version 3.1 (see the :recursive:
option towards the bottom).
The goal of this demo is to:
- Point Sphinx at the top of the source code tree, and have it automatically find all the modules in the package, however deeply nested.
- For each module, list the attributes, functions, classes and exceptions in that module in summary tables.
- For each entry in a summary table, create a hyperlink to a new page containing the documentation for that attribute, function, class or exception.
- For each class, document (my choice of) inheritence, public members, inherited members, and special members such as
__call__
.
The resulting built API documentation is available to view on ReadTheDocs.
Or you can clone the repo and build and view the API documentation locally:
-
Assuming a Python 3.x environment, install dependencies:
pip install -r docs/requirements.txt
-
Change to the
docs
directory:cd docs
-
Build the documentation:
make html
-
Run a web server:
python -m http.server
-
View documentation locally by opening in a browser: