Skip to main content

An extension for sphinx to allow automatic documentation of `variants` functions.

Project description

https://travis-ci.org/python-variants/sphinx_autodoc_variants.svg?branch=master

An extension for sphinx to allow automatic documentation of variants functions.

Overview

The default sphinx.ext.autodoc module does not handle function groups with variants created by the variants module correctly. This extension registers an automatic documenter that detects variant functions and methods and enables documentation of both the primary and variant functions.

To use this with your project that uses variants, first install this extension with pip (or, preferably, add this to the documentation dependencies):

pip install sphinx_autodoc_variants

With this installed, add 'sphinx_autodoc_variants' to the extensions variable of your conf.py, e.g.:

extensions = ['sphinx.ext.autodoc',
              'sphinx.ext.viewcode',
              'sphinx_autodoc_variants']

This will enable proper documentation of variants functions under .. automodule or other autodoc directives.

If you want to explicitly document a variants function group, use .. autoprimary_function for functions and .. autoprimary_method for methods.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx_autodoc_variants-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

sphinx_autodoc_variants-0.1.0-py2.py3-none-any.whl (4.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sphinx_autodoc_variants-0.1.0.tar.gz.

File metadata

File hashes

Hashes for sphinx_autodoc_variants-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc156b4e7dce70cda5b2322dc53a0b37e54292a28e1ffe521e62869e908b089f
MD5 87eeb2e16dfcf57120d7452275451cf8
BLAKE2b-256 1bd2925bda48553e3e8419b529d9c8dc8598ff2de6c1ae9296a317d43c056441

See more details on using hashes here.

File details

Details for the file sphinx_autodoc_variants-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_autodoc_variants-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ebe80d21bfd4fffd2474615f987b2774154edd244e1a56ca2e223b61173a02b3
MD5 46eacb3a68e9f5f228a8e346944f401c
BLAKE2b-256 7ef9d2f11964ed49434e4f3971b819fd7cf11ad6a997620cf71328698b775147

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page