Update conf.py

Experiment
This commit is contained in:
Jamie Hardt
2018-12-26 21:47:09 -08:00
parent f0c257f15f
commit dbbfc27196

View File

@@ -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)