Skip to content

Commit 58530b9

Browse files
Carreaularsoner
andauthored
Use intersphinx registry to avoid out of date links. (#563)
* Use intersphinx registry to avoid out of date links. * Update doc/conf.py --------- Co-authored-by: Eric Larson <[email protected]>
1 parent b7c6688 commit 58530b9

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

doc/conf.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import sys
1313
from datetime import date
1414

15+
from intersphinx_registry import get_intersphinx_mapping
16+
1517
import numpydoc
1618

1719
# for example.py
@@ -136,9 +138,6 @@
136138

137139
# -- Intersphinx setup ----------------------------------------------------
138140

139-
# Example configuration for intersphinx: refer to the Python standard library.
140-
intersphinx_mapping = {
141-
"python": ("https://docs.python.org/3/", None),
142-
"numpy": ("https://numpy.org/doc/stable/", None),
143-
"sklearn": ("https://scikit-learn.org/stable/", None),
144-
}
141+
# Example configuration for intersphinx: refer to several Python libraries.
142+
143+
intersphinx_mapping = get_intersphinx_mapping(packages=["python", "numpy", "sklearn"])

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ doc = [
5353
'matplotlib>=3.5',
5454
'pydata-sphinx-theme>=0.13.3',
5555
'sphinx>=7',
56+
'intersphinx_registry',
5657
]
5758
test = [
5859
'pytest',

requirements/doc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ numpy>=1.22
44
matplotlib>=3.5
55
pydata-sphinx-theme>=0.13.3
66
sphinx>=7
7+
intersphinx_registry

0 commit comments

Comments
 (0)