From 84b8ba63c0ced7795c06858db7dbc91b642d5789 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 May 2024 10:21:14 -0400 Subject: [PATCH 1/7] MAINT: Use intersphinx_registry [skip azp] [skip actions] --- doc/conf.py | 29 ++++++++++++++++------------- pyproject.toml | 1 + tools/circleci_dependencies.sh | 2 +- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 3759d6fe335..15b3c904a27 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,34 @@ # -- 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), + # Pending https://github.com/larsoner/intersphinx_registry/pull/5 "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), + "seaborn": ("https://seaborn.pydata.org/", None), + "patsy": ("https://patsy.readthedocs.io/en/latest", None), + "pyvista": ("https://docs.pyvista.org/version/stable", None), + "dipy": ("https://docs.dipy.org/stable", None), "nilearn": ("http://nilearn.github.io/stable", None), + # More niche so didn't upstream "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 patsy python scipy seaborn statsmodels +""".strip().split() + ), + ) +) # NumPyDoc configuration ----------------------------------------------------- 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"] diff --git a/tools/circleci_dependencies.sh b/tools/circleci_dependencies.sh index 83021758186..90d409964f4 100755 --- a/tools/circleci_dependencies.sh +++ b/tools/circleci_dependencies.sh @@ -1,4 +1,4 @@ #!/bin/bash -ef python -m pip install --upgrade "pip!=20.3.0" build -python -m pip install --upgrade --progress-bar off --only-binary "numpy,scipy,matplotlib,pandas,statsmodels" git+https://github.com/sphinx-gallery/sphinx-gallery.git -ve .[full,test,doc] +python -m pip install --upgrade --progress-bar off --only-binary "numpy,scipy,matplotlib,pandas,statsmodels" git+https://github.com/sphinx-gallery/sphinx-gallery.git git+https://github.com/Carreau/intersphinx_registry.git -ve .[full,test,doc] From 91017cb1849b309d47f4a315c1ac2355864bb491 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 May 2024 10:37:54 -0400 Subject: [PATCH 2/7] FIX: Which [skip azp] [skip actions] --- doc/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 15b3c904a27..4cdcb053a5b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -154,7 +154,7 @@ # -- Intersphinx configuration ----------------------------------------------- intersphinx_mapping = { - # Pending https://github.com/larsoner/intersphinx_registry/pull/5 + # Pending https://github.com/Carreau/intersphinx_registry/pull/5 "sklearn": ("https://scikit-learn.org/stable", None), "numba": ("https://numba.readthedocs.io/en/latest", None), "joblib": ("https://joblib.readthedocs.io/en/latest", None), @@ -177,7 +177,7 @@ get_intersphinx_mapping( only=set( """ -imageio matplotlib numpy pandas patsy python scipy seaborn statsmodels +imageio matplotlib numpy pandas python scipy statsmodels """.strip().split() ), ) From 343f803a798ed18367b8ccac66e7032f4f160921 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 3 May 2024 11:03:21 -0400 Subject: [PATCH 3/7] Update conf.py [skip azp] [skip actions] --- doc/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/conf.py b/doc/conf.py index 4cdcb053a5b..30207d81a0b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -164,6 +164,7 @@ "pyvista": ("https://docs.pyvista.org/version/stable", None), "dipy": ("https://docs.dipy.org/stable", None), "nilearn": ("http://nilearn.github.io/stable", None), + "pyqtgraph": ("https://pyqtgraph.readthedocs.io/en/latest/", None), # More niche so didn't upstream "nitime": ("https://nipy.org/nitime/", None), "mne_bids": ("https://mne.tools/mne-bids/stable", None), From 7df94741952d7b0341a7e62bb0e17c49580e81cb Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 14 May 2024 14:13:45 -0400 Subject: [PATCH 4/7] FIX: No inter --- mne/viz/_brain/_brain.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 ---------- From bee97b1074cd4921d3f925851e18c59b1c1c9672 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 14 May 2024 15:29:21 -0400 Subject: [PATCH 5/7] FIX: Doc --- doc/conf.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 30207d81a0b..e04b4185a26 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -154,18 +154,7 @@ # -- Intersphinx configuration ----------------------------------------------- intersphinx_mapping = { - # Pending https://github.com/Carreau/intersphinx_registry/pull/5 - "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), - "seaborn": ("https://seaborn.pydata.org/", None), - "patsy": ("https://patsy.readthedocs.io/en/latest", None), - "pyvista": ("https://docs.pyvista.org/version/stable", None), - "dipy": ("https://docs.dipy.org/stable", None), - "nilearn": ("http://nilearn.github.io/stable", None), - "pyqtgraph": ("https://pyqtgraph.readthedocs.io/en/latest/", None), - # More niche so didn't upstream + # More niche so didn't upstream to intersphinx_registry "nitime": ("https://nipy.org/nitime/", None), "mne_bids": ("https://mne.tools/mne-bids/stable", None), "mne-connectivity": ("https://mne.tools/mne-connectivity/stable", None), From cf6382cf252b5e52d8a0619b661c4dd2686bf8d5 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 14 May 2024 15:31:48 -0400 Subject: [PATCH 6/7] FIX: Missed --- doc/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index e04b4185a26..99e7a2326bd 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -167,7 +167,8 @@ get_intersphinx_mapping( only=set( """ -imageio matplotlib numpy pandas python scipy statsmodels +imageio matplotlib numpy pandas python scipy statsmodels sklearn numba joblib nibabel +seaborn patsy pyvista dipy nilearn pyqtgraph """.strip().split() ), ) From 589fd67a8ac84c7b702d2f1f331927cdeb820a75 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 14 May 2024 15:32:57 -0400 Subject: [PATCH 7/7] FIX: Revert --- tools/circleci_dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/circleci_dependencies.sh b/tools/circleci_dependencies.sh index 90d409964f4..83021758186 100755 --- a/tools/circleci_dependencies.sh +++ b/tools/circleci_dependencies.sh @@ -1,4 +1,4 @@ #!/bin/bash -ef python -m pip install --upgrade "pip!=20.3.0" build -python -m pip install --upgrade --progress-bar off --only-binary "numpy,scipy,matplotlib,pandas,statsmodels" git+https://github.com/sphinx-gallery/sphinx-gallery.git git+https://github.com/Carreau/intersphinx_registry.git -ve .[full,test,doc] +python -m pip install --upgrade --progress-bar off --only-binary "numpy,scipy,matplotlib,pandas,statsmodels" git+https://github.com/sphinx-gallery/sphinx-gallery.git -ve .[full,test,doc]