diff --git a/doc/conf.py b/doc/conf.py index b1b2e63d..519fb795 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -12,6 +12,8 @@ import sys from datetime import date +from intersphinx_registry import get_intersphinx_mapping + import numpydoc # for example.py @@ -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"]) diff --git a/pyproject.toml b/pyproject.toml index e882da19..5ee947a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ doc = [ 'matplotlib>=3.5', 'pydata-sphinx-theme>=0.13.3', 'sphinx>=7', + 'intersphinx_registry', ] test = [ 'pytest', diff --git a/requirements/doc.txt b/requirements/doc.txt index f3d9b058..950966b6 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -4,3 +4,4 @@ numpy>=1.22 matplotlib>=3.5 pydata-sphinx-theme>=0.13.3 sphinx>=7 +intersphinx_registry