diff --git a/doc/conf.py b/doc/conf.py index 43627e087..b50117b63 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -156,4 +156,17 @@ ] +# -- Options for autodoc -------------------------------------------------- +autodoc_member_order = 'bysource' +autodoc_mock_imports = ['onewire', 'txaio'] + +def run_apidoc(app): + from sphinx.apidoc import main + module = os.path.abspath(os.path.join(app.srcdir, '..', 'labgrid')) + output = os.path.abspath(os.path.join(app.srcdir, 'modules')) + cmd = ['sphinx-apidoc', module, '-M', '-H', 'Modules', '-o', output] + main(cmd) + +def setup(app): + app.connect('builder-inited', run_apidoc) diff --git a/doc/index.rst b/doc/index.rst index 1459b71ca..e217be006 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -12,6 +12,7 @@ Welcome to labgrid's documentation! development components design_decisions + modules/modules :maxdepth: 2 :caption: Contents: