Skip to content

Commit 3cb855f

Browse files
authored
Add intersphinx mappings (#1977)
* Add intersphinx mappings * Fix reference to nitclk.SessionReference
1 parent bd5d9a7 commit 3cb855f

File tree

14 files changed

+113
-16
lines changed

14 files changed

+113
-16
lines changed

build/templates/class.rst.mako

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ ${helper.get_rst_header_snippet('NI-TClk Support', '=')}
131131

132132
This is used to get and set NI-TClk attributes on the session.
133133

134-
.. seealso:: See :py:attr:`nitclk.SessionReference` for a complete list of attributes.
134+
.. seealso:: See :py:class:`nitclk.SessionReference` for a complete list of attributes.
135135

136136

137137
% endif

build/templates/conf.py.mako

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ version = config['module_version']
99
api_name = f"{config['driver_name']} Python API"
1010
api_name_no_spaces_or_hyphens = api_name.replace(" ", "").replace("-", "")
1111
api_name_no_spaces_or_hyphens_lower = api_name_no_spaces_or_hyphens.lower()
12+
13+
all_modules = {'nidcpower', 'nidigital', 'nidmm', 'nifgen', 'nimodinst', 'niscope', 'niswitch', 'nise', 'nitclk'}
14+
module_name = config['module_name']
15+
external_modules = all_modules - {module_name}
1216
%>\
1317
#!/usr/bin/env python3
1418
# -*- coding: utf-8 -*-
@@ -195,6 +199,9 @@ texinfo_documents = [
195199
]
196200

197201
# Example configuration for intersphinx: refer to the Python standard library.
198-
## TODO(ni-jfitzger): Add mappings for nimi-python APIs that reference other nimi-python APIs.
199-
## We can probably just list all of the mappings (other than maybe the current module, I think)
200-
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
202+
intersphinx_mapping = {
203+
'python': ('https://docs.python.org/3', None),
204+
% for module in sorted(external_modules):
205+
'${module}': ('https://${module}.readthedocs.io/en/latest/', None),
206+
% endfor
207+
}

docs/nidcpower/conf.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,14 @@ def setup(app):
183183
]
184184

185185
# Example configuration for intersphinx: refer to the Python standard library.
186-
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
186+
intersphinx_mapping = {
187+
'python': ('https://docs.python.org/3', None),
188+
'nidigital': ('https://nidigital.readthedocs.io/en/latest/', None),
189+
'nidmm': ('https://nidmm.readthedocs.io/en/latest/', None),
190+
'nifgen': ('https://nifgen.readthedocs.io/en/latest/', None),
191+
'nimodinst': ('https://nimodinst.readthedocs.io/en/latest/', None),
192+
'niscope': ('https://niscope.readthedocs.io/en/latest/', None),
193+
'nise': ('https://nise.readthedocs.io/en/latest/', None),
194+
'niswitch': ('https://niswitch.readthedocs.io/en/latest/', None),
195+
'nitclk': ('https://nitclk.readthedocs.io/en/latest/', None),
196+
}

docs/nidigital/class.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5705,7 +5705,7 @@ NI-TClk Support
57055705
57065706
This is used to get and set NI-TClk attributes on the session.
57075707

5708-
.. seealso:: See :py:attr:`nitclk.SessionReference` for a complete list of attributes.
5708+
.. seealso:: See :py:class:`nitclk.SessionReference` for a complete list of attributes.
57095709

57105710

57115711
.. contents:: Session

docs/nidigital/conf.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,14 @@ def setup(app):
183183
]
184184

185185
# Example configuration for intersphinx: refer to the Python standard library.
186-
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
186+
intersphinx_mapping = {
187+
'python': ('https://docs.python.org/3', None),
188+
'nidcpower': ('https://nidcpower.readthedocs.io/en/latest/', None),
189+
'nidmm': ('https://nidmm.readthedocs.io/en/latest/', None),
190+
'nifgen': ('https://nifgen.readthedocs.io/en/latest/', None),
191+
'nimodinst': ('https://nimodinst.readthedocs.io/en/latest/', None),
192+
'niscope': ('https://niscope.readthedocs.io/en/latest/', None),
193+
'nise': ('https://nise.readthedocs.io/en/latest/', None),
194+
'niswitch': ('https://niswitch.readthedocs.io/en/latest/', None),
195+
'nitclk': ('https://nitclk.readthedocs.io/en/latest/', None),
196+
}

docs/nidmm/conf.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,14 @@ def setup(app):
183183
]
184184

185185
# Example configuration for intersphinx: refer to the Python standard library.
186-
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
186+
intersphinx_mapping = {
187+
'python': ('https://docs.python.org/3', None),
188+
'nidcpower': ('https://nidcpower.readthedocs.io/en/latest/', None),
189+
'nidigital': ('https://nidigital.readthedocs.io/en/latest/', None),
190+
'nifgen': ('https://nifgen.readthedocs.io/en/latest/', None),
191+
'nimodinst': ('https://nimodinst.readthedocs.io/en/latest/', None),
192+
'niscope': ('https://niscope.readthedocs.io/en/latest/', None),
193+
'nise': ('https://nise.readthedocs.io/en/latest/', None),
194+
'niswitch': ('https://niswitch.readthedocs.io/en/latest/', None),
195+
'nitclk': ('https://nitclk.readthedocs.io/en/latest/', None),
196+
}

docs/nifgen/class.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6005,7 +6005,7 @@ NI-TClk Support
60056005
60066006
This is used to get and set NI-TClk attributes on the session.
60076007

6008-
.. seealso:: See :py:attr:`nitclk.SessionReference` for a complete list of attributes.
6008+
.. seealso:: See :py:class:`nitclk.SessionReference` for a complete list of attributes.
60096009

60106010

60116011
.. contents:: Session

docs/nifgen/conf.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,14 @@ def setup(app):
183183
]
184184

185185
# Example configuration for intersphinx: refer to the Python standard library.
186-
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
186+
intersphinx_mapping = {
187+
'python': ('https://docs.python.org/3', None),
188+
'nidcpower': ('https://nidcpower.readthedocs.io/en/latest/', None),
189+
'nidigital': ('https://nidigital.readthedocs.io/en/latest/', None),
190+
'nidmm': ('https://nidmm.readthedocs.io/en/latest/', None),
191+
'nimodinst': ('https://nimodinst.readthedocs.io/en/latest/', None),
192+
'niscope': ('https://niscope.readthedocs.io/en/latest/', None),
193+
'nise': ('https://nise.readthedocs.io/en/latest/', None),
194+
'niswitch': ('https://niswitch.readthedocs.io/en/latest/', None),
195+
'nitclk': ('https://nitclk.readthedocs.io/en/latest/', None),
196+
}

docs/nimodinst/conf.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,14 @@ def setup(app):
183183
]
184184

185185
# Example configuration for intersphinx: refer to the Python standard library.
186-
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
186+
intersphinx_mapping = {
187+
'python': ('https://docs.python.org/3', None),
188+
'nidcpower': ('https://nidcpower.readthedocs.io/en/latest/', None),
189+
'nidigital': ('https://nidigital.readthedocs.io/en/latest/', None),
190+
'nidmm': ('https://nidmm.readthedocs.io/en/latest/', None),
191+
'nifgen': ('https://nifgen.readthedocs.io/en/latest/', None),
192+
'niscope': ('https://niscope.readthedocs.io/en/latest/', None),
193+
'nise': ('https://nise.readthedocs.io/en/latest/', None),
194+
'niswitch': ('https://niswitch.readthedocs.io/en/latest/', None),
195+
'nitclk': ('https://nitclk.readthedocs.io/en/latest/', None),
196+
}

docs/niscope/class.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7477,7 +7477,7 @@ NI-TClk Support
74777477
74787478
This is used to get and set NI-TClk attributes on the session.
74797479
7480-
.. seealso:: See :py:attr:`nitclk.SessionReference` for a complete list of attributes.
7480+
.. seealso:: See :py:class:`nitclk.SessionReference` for a complete list of attributes.
74817481
74827482
74837483
.. contents:: Session

0 commit comments

Comments
 (0)