Skip to content

Commit c73ff39

Browse files
authored
Merge pull request #912 from Carreau/instersphinx-registry
Use intersphinx_registry
2 parents 72c730d + 60f28cc commit c73ff39

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# pin jinja2 due to broken deprecation used in nbconvert
22
autodoc-traits
3+
intersphinx-registry
34
jinja2==3.0.*
45
matplotlib
56
myst-nb

docs/source/conf.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
1919
# sys.path.insert(0, os.path.abspath('.'))
2020
# We load the ipython release info into a dict by explicit execution
21+
from intersphinx_registry import get_intersphinx_mapping
22+
2123
iprelease = {}
2224
exec(
2325
compile(
@@ -358,13 +360,15 @@
358360

359361

360362
# Example configuration for intersphinx: refer to the Python standard library.
361-
intersphinx_mapping = {
362-
'python': ('https://docs.python.org/3/', None),
363-
'ipython': ('https://ipython.readthedocs.io/en/stable/', None),
364-
'pymongo': ('https://pymongo.readthedocs.io/en/stable/', None),
365-
'distributed': ('https://distributed.readthedocs.io/en/stable/', None),
366-
'jupyterclient': ('https://jupyter-client.readthedocs.io/en/stable/', None),
367-
}
363+
intersphinx_mapping = get_intersphinx_mapping(
364+
packages={
365+
'python',
366+
'ipython',
367+
'pymongo',
368+
'distributed',
369+
'jupyterclient',
370+
}
371+
)
368372

369373
import os
370374

0 commit comments

Comments
 (0)