Skip to content

Commit

Permalink
Use intersphinx registry to avoid out of date links. (numpy#563)
Browse files Browse the repository at this point in the history
* Use intersphinx registry to avoid out of date links.

* Update doc/conf.py

---------

Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
  • Loading branch information
Carreau and larsoner authored Jun 3, 2024
1 parent b7c6688 commit 58530b9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
11 changes: 5 additions & 6 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import sys
from datetime import date

from intersphinx_registry import get_intersphinx_mapping

import numpydoc

# for example.py
Expand Down Expand Up @@ -136,9 +138,6 @@

# -- Intersphinx setup ----------------------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"sklearn": ("https://scikit-learn.org/stable/", None),
}
# Example configuration for intersphinx: refer to several Python libraries.

intersphinx_mapping = get_intersphinx_mapping(packages=["python", "numpy", "sklearn"])
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ doc = [
'matplotlib>=3.5',
'pydata-sphinx-theme>=0.13.3',
'sphinx>=7',
'intersphinx_registry',
]
test = [
'pytest',
Expand Down
1 change: 1 addition & 0 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ numpy>=1.22
matplotlib>=3.5
pydata-sphinx-theme>=0.13.3
sphinx>=7
intersphinx_registry

0 comments on commit 58530b9

Please sign in to comment.