/Sphinx-Autosummary-Recursion

Demonstrating the new automatic package recursion facility in sphinx.ext.autosummary version 3.1

Primary LanguagePython

Requirements:

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

Action items:

  • Change one or more modules in this package to mimic some click related documentation
  • Include click-sphinx to generate documentation for click stuff

Sphinx-Autosummary-Recursion

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:

  1. Assuming a Python 3.x environment, install dependencies:

    pip install -r docs/requirements.txt

  2. Change to the docs directory:

    cd docs

  3. Build the documentation:

    make html

  4. Run a web server:

    python -m http.server

  5. View documentation locally by opening in a browser:

    http://localhost:8000/build/html/