Skip to content

Commit

Permalink
RtD run apidoc
Browse files Browse the repository at this point in the history
  • Loading branch information
txemavs committed Mar 28, 2018
1 parent 2ff3969 commit a13adee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
import time
import datetime
import subprocess

project = u'Adata'
copyright = u'2018, Txema Vicente'
Expand Down Expand Up @@ -49,3 +50,12 @@
html_show_sourcelink = False
htmlhelp_basename = 'adatadoc'

def run_apidoc(_):
module=".."
cur_dir = os.path.abspath(os.path.dirname(__file__))
output_path = os.path.join(cur_dir, 'api')
cmd_path = 'sphinx-apidoc'
subprocess.check_call([cmd_path, '-e', '-o', output_path, module, '--force', '--separate'])

def setup(app):
app.connect('builder-inited', run_apidoc)
2 changes: 1 addition & 1 deletion src/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Modules
.. toctree::
:maxdepth: 2

All modules <api/modules>
api/modules


Related Documentation
Expand Down

0 comments on commit a13adee

Please sign in to comment.