Skip to content

Commit

Permalink
doc: enable apidoc generation
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
  • Loading branch information
jluebbe committed Mar 20, 2017
1 parent 8f6f770 commit d847710
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Welcome to labgrid's documentation!
development
components
design_decisions
modules/modules
:maxdepth: 2
:caption: Contents:

Expand Down

0 comments on commit d847710

Please sign in to comment.