Skip to content
This repository was archived by the owner on Jan 15, 2019. It is now read-only.

Commit 481b85e

Browse files
committed
Workaround for RTD auto-generated docs
I realized I had never actually tested the work around listed here: readthedocs/readthedocs.org#1139 I'm going to try that and see how it goes...
1 parent de976a3 commit 481b85e

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

docs/readme.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Documentation setup
2+
3+
## Dependencies
4+
Sphinx documentation generation is done via Make. You will need sphinx and sphinx_rtd_theme installed:
5+
pip install sphinx sphinx_rtd_theme
6+
7+
## Build Process
8+
make html

docs/source/conf.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,3 +287,20 @@
287287
#texinfo_no_detailmenu = False
288288

289289
autodoc_member_order = 'bysource'
290+
291+
292+
def run_apidoc(_):
293+
modules = ['cssefclient',
294+
'cssefserver',
295+
'cssefserver.account']
296+
for module in modules:
297+
cur_dir = os.path.abspath(os.path.dirname(__file__))
298+
output_path = os.path.join(cur_dir, module, 'doc')
299+
cmd_path = 'sphinx-apidoc'
300+
if hasattr(sys, 'real_prefix'): # Check to see if we are in a virtualenv
301+
# If we are, assemble the path manually
302+
cmd_path = os.path.abspath(os.path.join(sys.prefix, 'bin', 'sphinx-apidoc'))
303+
subprocess.check_call([cmd_path, '-e', '-o', output_path, module, '--force'])
304+
305+
def setup(app):
306+
app.connect('builder-inited', run_apidoc)

0 commit comments

Comments
 (0)