diff --git a/doc/conf.py b/doc/conf.py index 3759d6fe335..99e7a2326bd 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -17,6 +17,7 @@ import matplotlib import pyvista import sphinx +from intersphinx_registry import get_intersphinx_mapping from numpydoc import docscrape from sphinx.config import is_serializable from sphinx.domains.changeset import versionlabels @@ -153,32 +154,25 @@ # -- Intersphinx configuration ----------------------------------------------- intersphinx_mapping = { - "python": ("https://docs.python.org/3", None), - "numpy": ("https://numpy.org/doc/stable", None), - "scipy": ("https://docs.scipy.org/doc/scipy", None), - "matplotlib": ("https://matplotlib.org/stable", None), - "sklearn": ("https://scikit-learn.org/stable", None), - "numba": ("https://numba.readthedocs.io/en/latest", None), - "joblib": ("https://joblib.readthedocs.io/en/latest", None), - "nibabel": ("https://nipy.org/nibabel", None), - "nilearn": ("http://nilearn.github.io/stable", None), + # More niche so didn't upstream to intersphinx_registry "nitime": ("https://nipy.org/nitime/", None), - "surfer": ("https://pysurfer.github.io/", None), "mne_bids": ("https://mne.tools/mne-bids/stable", None), "mne-connectivity": ("https://mne.tools/mne-connectivity/stable", None), "mne-gui-addons": ("https://mne.tools/mne-gui-addons", None), - "pandas": ("https://pandas.pydata.org/pandas-docs/stable", None), - "seaborn": ("https://seaborn.pydata.org/", None), - "statsmodels": ("https://www.statsmodels.org/dev", None), - "patsy": ("https://patsy.readthedocs.io/en/latest", None), - "pyvista": ("https://docs.pyvista.org/version/stable", None), - "imageio": ("https://imageio.readthedocs.io/en/latest", None), "picard": ("https://pierreablin.github.io/picard/", None), "eeglabio": ("https://eeglabio.readthedocs.io/en/latest", None), - "dipy": ("https://docs.dipy.org/stable", None), "pybv": ("https://pybv.readthedocs.io/en/latest/", None), - "pyqtgraph": ("https://pyqtgraph.readthedocs.io/en/latest/", None), } +intersphinx_mapping.update( + get_intersphinx_mapping( + only=set( + """ +imageio matplotlib numpy pandas python scipy statsmodels sklearn numba joblib nibabel +seaborn patsy pyvista dipy nilearn pyqtgraph +""".strip().split() + ), + ) +) # NumPyDoc configuration ----------------------------------------------------- diff --git a/mne/viz/_brain/_brain.py b/mne/viz/_brain/_brain.py index 95ae75dc8d8..8691bffcfb8 100644 --- a/mne/viz/_brain/_brain.py +++ b/mne/viz/_brain/_brain.py @@ -1768,16 +1768,14 @@ def add_data( ): """Display data from a numpy array on the surface or volume. - This provides a similar interface to - :meth:`surfer.Brain.add_overlay`, but it displays + This provides a similar interface to PySurfer, but it displays it with a single colormap. It offers more flexibility over the colormap, and provides a way to display four-dimensional data (i.e., a timecourse) or five-dimensional data (i.e., a vector-valued timecourse). .. note:: ``fmin`` sets the low end of the colormap, and is separate - from thresh (this is a different convention from - :meth:`surfer.Brain.add_overlay`). + from thresh (this is a different convention from PySurfer). Parameters ---------- diff --git a/pyproject.toml b/pyproject.toml index 00bfa549de1..78615dc5568 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -165,6 +165,7 @@ doc = [ "pyzmq!=24.0.0", "ipython!=8.7.0", "selenium", + "intersphinx_registry", ] dev = ["mne[test,doc]", "rcssmin"]