shithub: aubio

Download patch

ref: 152bf4fbddab2ee125e73e63d505916f677aa6f8
parent: ed596f7df20df54e45e0a0bd76da6d9cb98ad67f
author: Paul Brossier <piem@piem.org>
date: Tue Oct 30 10:32:51 EDT 2018

[doc] start adding autodoc to sphinx documents

--- a/doc/conf.py
+++ b/doc/conf.py
@@ -29,7 +29,14 @@
 
 # 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']
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -70,6 +70,7 @@
 
    installing
    python_module
+   python
    cli
    develop
    about
--- /dev/null
+++ b/doc/python.rst
@@ -1,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