Skip to content

Commit 573c521

Browse files
committed
Added links to other component docs
1 parent b312180 commit 573c521

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,6 @@ dmypy.json
136136
# conda build results
137137
conda_build/
138138
conda_packages/
139+
140+
# dynamically generated docs
141+
docs/source/component_docs.rst

docs/source/conf.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@
7979
'matplotlib': ('https://matplotlib.org/', None),
8080
'h5py': ('http://docs.h5py.org/en/stable/', None),
8181
'pydaqmx': ('https://pythonhosted.org/PyDAQmx/', None),
82-
# from https://github.com/MSLNZ/msl-qt/blob/master/docs/create_pyqt_objects.py
83-
# under MIT License
8482
'qt': (
8583
'',
8684
'pyqt5-modified-objects.inv',
87-
)
85+
) # from https://github.com/MSLNZ/msl-qt/blob/master/docs/create_pyqt_objects.py
86+
# under MIT License
8887
# TODO
8988
# desktop-app
9089
# spinapi/pynivision/etc
@@ -105,7 +104,9 @@
105104
labscript_suite_programs.remove(project)
106105

107106
# whether to use stable or latest version
108-
labscript_suite_doc_version = 'stable' # 'stable' or 'latest'
107+
labscript_suite_doc_version = os.environ.get('READTHEDOCS_VERSION', 'latest')
108+
if labscript_suite_doc_version not in ['stable', 'latest']:
109+
labscript_suite_doc_version = 'stable'
109110

110111
# add intersphinx references for each component
111112
for ls_prog in labscript_suite_programs:
@@ -137,6 +138,7 @@
137138
todo_include_todos = False
138139
else:
139140
todo_include_todos = True
141+
140142
# -- Options for HTML output -------------------------------------------------
141143

142144
# The theme to use for HTML and HTML Help pages. See the documentation for
@@ -177,3 +179,22 @@ def setup(app):
177179
app.add_config_value('m2r_disable_inline_math', False, 'env')
178180
app.add_directive('mdinclude', MdInclude)
179181
app.add_stylesheet('custom.css')
182+
183+
with open(
184+
os.path.join(os.path.dirname(os.path.realpath(__file__)), 'component_docs.rst'),
185+
'w',
186+
) as f:
187+
f.write("labscript suite components\n")
188+
f.write("==========================\n")
189+
f.write(" \n")
190+
f.write(".. toctree::\n")
191+
f.write(" :maxdepth: 2\n")
192+
f.write(" \n")
193+
if project != "the labscript suite":
194+
f.write(
195+
" labscript suite (metapackage)<{}>\n".format(
196+
intersphinx_mapping['labscript-suite'][0]
197+
)
198+
)
199+
for ls_prog in labscript_suite_programs:
200+
f.write(" {} <{}>\n".format(ls_prog, intersphinx_mapping[ls_prog][0]))

docs/source/index.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ This documentation is primarily for developers who might want to use this common
1313
:maxdepth: 2
1414

1515
api_reference/index
16-
16+
component_docs
17+
Home Page <http://labscriptsuite.org>
18+
Source Code <https://github.com/labscript-suite/labscript-suite>
19+
BitBucket Archive <http://bitbucket-archive.labscriptsuite.org/#!/labscript_suite/labscript_utils>

0 commit comments

Comments
 (0)