Giter Club home page Giter Club logo

sphinx-autosummary-recursion's Introduction

Sphinx-Autosummary-Recursion

The primary goal of this repo is to demonstrate the new automatic package detection facility for Python API documentation available in Sphinx 3.1+. See this StackOverflow answer for context.

A secondary goal is to showcase the integration of Jupyter Notebooks with Sphinx.

The resulting Sphinx-built HTML doc set is available to view on ReadTheDocs.

Automatically creating API documentation

From Sphinx 3.1, sphinx.ext.autosummary has a :recursive: option that iterates over a Python package automatically, so you no longer have to hard code all your module names, or integrate a 3rd party extension to provide this functionality. Scroll down this Sphinx documentation for more information.

This repo demonstrates how to:

  1. Point Sphinx at the top of a Python source code tree, and have it automatically find all the modules in the package, however deeply nested.

  2. For each module, list the attributes, functions, classes and exceptions in that module in summary tables.

  3. For each entry in a summary table, create a hyperlink to a new page displaying the extracted docstrings for that attribute, function, class or exception.

  4. For each class, document (my choice of) inheritance, public members, inherited members, and special members such as __call__. Other choices are available.

For more information, start with docs/README.

Integrating Jupyter Notebooks with Sphinx

Jupyter Notebooks blend live code, text and visualizations. It’s often useful to integrate them alongside API documentation to provide tutorial-style material.

For more information, start with docs/notebooks/README.

Switching between different HTML themes

Since it’s hosted on Readthedocs, the default theme (stylesheet) for the HTML doc set is sphinx-rtd-theme. There's a small alteration to this theme’s CSS to make the page width slightly wider; see docs/_static/readthedocs-custom.css.

Other themes are available; settings to switch over to the popular pydata-sphinx-theme are commented out in docs/conf.py.

sphinx-autosummary-recursion's People

Contributors

jamesaleedham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.