From: Paul Brossier Date: Tue, 30 Oct 2018 13:32:51 +0000 (+0100) Subject: [doc] start adding autodoc to sphinx documents X-Git-Tag: 0.4.8~90^2~15 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=152bf4fbddab2ee125e73e63d505916f677aa6f8;p=aubio.git [doc] start adding autodoc to sphinx documents --- diff --git a/doc/conf.py b/doc/conf.py index 4b5a58fa..7d491b05 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -29,7 +29,14 @@ from this_version import get_aubio_version # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.viewcode', 'sphinx.ext.autodoc'] +extensions = ['sphinx.ext.viewcode', 'sphinx.ext.autodoc', + 'sphinx.ext.napoleon', 'sphinx.ext.intersphinx'] + +autodoc_member_order = 'groupwise' + +intersphinx_mapping = { + 'numpy': ('https://docs.scipy.org/doc/numpy/', None), + } # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/doc/index.rst b/doc/index.rst index 4fc80de8..5581f73b 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -70,6 +70,7 @@ Content installing python_module + python cli develop about diff --git a/doc/python.rst b/doc/python.rst new file mode 100644 index 00000000..89d607a7 --- /dev/null +++ b/doc/python.rst @@ -0,0 +1,27 @@ +.. make sure our default-domain is python here +.. default-domain:: py + +.. set current module +.. currentmodule:: aubio + +.. + we follow numpy type docstrings, see: + https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard + +Python documentation +==================== + + +.. midiconv.py + +.. autofunction:: note2midi + +.. autofunction:: midi2note + +.. autofunction:: freq2note + +.. autofunction:: note2freq + +.. slicing.py + +.. autofunction:: slice_source_at_stamps