From dbbfc27196f0f701865fa75f2289e3269688dbf9 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 26 Dec 2018 21:47:09 -0800 Subject: [PATCH] Update conf.py Experiment --- docs/source/conf.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 90fe77a..8f7f5be 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -175,3 +175,34 @@ epub_exclude_files = ['search.html'] # -- Extension configuration ------------------------------------------------- + +autodoc_member_order = 'bysource' +autodoc_default_flags = ['show-inheritance'] + +def run_apidoc(_): + """This method is required by the setup method below.""" + import os + dirname = os.path.dirname(__file__) + ignore_paths = [os.path.join(dirname, '../../aaf2/model'),] + # https://github.com/sphinx-doc/sphinx/blob/master/sphinx/ext/apidoc.py + argv = [ + '--force', + '--no-toc', + '--separate', + '--module-first', + '--output-dir', + os.path.join(dirname, 'api'), + os.path.join(dirname, '../../aaf2'), + ] + ignore_paths + + from sphinx.ext import apidoc + apidoc.main(argv) + + +def setup(app): + """This method is a hook into the Sphinx builder system and injects the + apidoc module into it so it runs autodoc before running build. + If you mess with this, you may not see any effect in a local build, this + was added to get api documentation building on the ReadTheDocs server. + """ + app.connect('builder-inited', run_apidoc)