Skip to content

Commit

Permalink
Use intersphinx registry to avoid out of date links.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Jun 3, 2024
1 parent acad4ec commit 5a8a32a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

import numpydoc

from intersphinx_registry import get_intersphinx_mapping

# for example.py
sys.path.insert(0, os.path.abspath("."))
# project root
Expand Down Expand Up @@ -137,8 +139,5 @@
# -- 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/devdocs/", None),
"sklearn": ("https://scikit-learn.org/stable/", None),
}

intersphinx_mapping = get_intersphinx_mapping(["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 5a8a32a

Please sign in to comment.