From 38da777fcae326b19ea86d71edcf3c3be03b6521 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Thu, 7 Jul 2022 13:23:35 -0400 Subject: [PATCH 1/2] WIP: Clean up Forward and SourceSpaces [skip azp] [skip actions] --- .../autosummary/class_no_inherited_members.rst | 13 +++++++++++++ doc/conf.py | 4 ++++ doc/forward.rst | 5 +++++ requirements_doc.txt | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 doc/_templates/autosummary/class_no_inherited_members.rst diff --git a/doc/_templates/autosummary/class_no_inherited_members.rst b/doc/_templates/autosummary/class_no_inherited_members.rst new file mode 100644 index 00000000000..05dd226dd6a --- /dev/null +++ b/doc/_templates/autosummary/class_no_inherited_members.rst @@ -0,0 +1,13 @@ +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +.. autoclass:: {{ objname }} + :special-members: __contains__,__getitem__,__iter__,__len__,__add__,__sub__,__mul__,__div__,__neg__ + :members: + :no-inherited-members: + +.. _sphx_glr_backreferences_{{ fullname }}: + +.. minigallery:: {{ fullname }} + :add-heading: diff --git a/doc/conf.py b/doc/conf.py index d703d4da57d..c3fe505137f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -171,6 +171,10 @@ # Define what extra methods numpydoc will document docscrape.ClassDoc.extra_public_methods = mne.utils._doc_special_members numpydoc_class_members_toctree = False +numpydoc_show_inherited_class_members = { + 'mne.SourceSpaces': False, + 'mne.Forward': False, +} numpydoc_attributes_as_param_list = True numpydoc_xref_param_type = True numpydoc_xref_aliases = { diff --git a/doc/forward.rst b/doc/forward.rst index 5cf2165bd5a..7e554195aa6 100644 --- a/doc/forward.rst +++ b/doc/forward.rst @@ -6,9 +6,14 @@ Forward Modeling .. autosummary:: :toctree: generated/ + :template: autosummary/class_no_inherited_members.rst Forward SourceSpaces + +.. autosummary:: + :toctree: generated/ + add_source_space_distances apply_forward apply_forward_raw diff --git a/requirements_doc.txt b/requirements_doc.txt index 4d4b1c2bd1b..22709cc1f10 100644 --- a/requirements_doc.txt +++ b/requirements_doc.txt @@ -1,6 +1,6 @@ # requirements for building docs sphinx!=4.1.0 -https://github.com/numpy/numpydoc/archive/main.zip +https://github.com/larsoner/numpydoc/archive/inherited.zip https://github.com/pydata/pydata-sphinx-theme/archive/cf8b113a496eb458587c0778a423e40c7c1aa22d.zip https://github.com/sphinx-gallery/sphinx-gallery/archive/master.zip sphinxcontrib-bibtex>=2.1.2 From 1710f19a251ad6964e22064c7bd6ec8a419023d0 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 13 Jul 2022 10:42:54 -0400 Subject: [PATCH 2/2] MAINT: Bump to main [skip azp] [skip actions] --- requirements_doc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_doc.txt b/requirements_doc.txt index 22709cc1f10..4d4b1c2bd1b 100644 --- a/requirements_doc.txt +++ b/requirements_doc.txt @@ -1,6 +1,6 @@ # requirements for building docs sphinx!=4.1.0 -https://github.com/larsoner/numpydoc/archive/inherited.zip +https://github.com/numpy/numpydoc/archive/main.zip https://github.com/pydata/pydata-sphinx-theme/archive/cf8b113a496eb458587c0778a423e40c7c1aa22d.zip https://github.com/sphinx-gallery/sphinx-gallery/archive/master.zip sphinxcontrib-bibtex>=2.1.2