Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changes/dev/13630.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug with :func:`mne.datasets.somato.data_path` where the archive couldn't be extracted due to an absolute path issue, by `Eric Larson`_.
20 changes: 18 additions & 2 deletions doc/sphinxext/gh_substitutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,24 @@
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.

import docutils
from docutils.nodes import reference
from docutils.parsers.rst.roles import set_classes

# Adapted from sphinx
if docutils.__version_info__[:2] < (0, 22):
from docutils.parsers.rst import roles

def _normalize_options(options):
if options is None:
return {}
n_options = options.copy()
roles.set_classes(n_options)
return n_options

else:
from docutils.parsers.rst.roles import (
normalize_options as _normalize_options,
)


def gh_role(name, rawtext, text, lineno, inliner, options={}, content=[]): # noqa: B006
Expand All @@ -22,7 +38,7 @@ def gh_role(name, rawtext, text, lineno, inliner, options={}, content=[]): # no
slug = "issues/" + text
text = "#" + text
ref = "https://github.com/mne-tools/mne-python/" + slug
set_classes(options)
options = _normalize_options(options)
node = reference(rawtext, text, refuri=ref, **options)
return [node], []

Expand Down
12 changes: 12 additions & 0 deletions doc/sphinxext/mne_doc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,22 @@ def reset_warnings(gallery_conf, fname):
r"open_text is deprecated\. Use files",
# dipy etc.
"The `disp` and `iprint` options of the L-BFGS-B solver",
# statsmodels<->pandas
"is deprecated and will be removed",
):
warnings.filterwarnings( # deal with other modules having bad imports
"ignore", message=f".*{key}.*", category=DeprecationWarning
)
# ignore (PendingDeprecationWarning)
for key in (
# sphinx
"The mapping interface for autodoc options",
# sphinxcontrib-bibtex
"sphinx.environment.BuildEnvironment.app' is deprecated",
):
warnings.filterwarnings( # deal with other modules having bad imports
"ignore", message=f".*{key}.*", category=PendingDeprecationWarning
)
# ignore (UserWarning)
for message in (
# Matplotlib
Expand Down
1 change: 1 addition & 0 deletions doc/sphinxext/related_software.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ meegkit
meggie
mne-ari
mne-bids-pipeline
mne-denoise
mne-faster
mne-features
mne-icalabel
Expand Down
1 change: 1 addition & 0 deletions doc/sphinxext/related_software_nodeps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
cross-domain-saliency-maps
fsleyes
mne-kit-gui
mne-videobrowser
9 changes: 4 additions & 5 deletions examples/inverse/dics_epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
Compute source level time-frequency timecourses using a DICS beamformer
=======================================================================

In this example, a Dynamic Imaging of Coherent Sources (DICS)
:footcite:`GrossEtAl2001` beamformer is used to transform sensor-level
time-frequency objects to the source level. We will look at the event-related
synchronization (ERS) of beta band activity in the :ref:`somato dataset
<somato-dataset>`.
In this example, a Dynamic Imaging of Coherent Sources (DICS) :footcite:`GrossEtAl2001`
beamformer is used to transform sensor-level time-frequency objects to the source level.
We will look at the event-related synchronization (ERS) of beta band activity in the
:ref:`somato dataset <somato-dataset>`.
"""
# Authors: Marijn van Vliet <w.m.vanvliet@gmail.com>
# Alex Rockhill <aprockhill@mailbox.org>
Expand Down
4 changes: 4 additions & 0 deletions mne/datasets/_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
_downloader_params,
_get_path,
_log_time_size,
_pl,
)

_FAKE_VERSION = None # used for monkeypatching while testing versioning
Expand Down Expand Up @@ -253,6 +254,9 @@ def fetch_dataset(
# use our logger level for pooch's logger too
pooch.get_logger().setLevel(logger.getEffectiveLevel())
sz = 0
logger.info(
"Fetching %s file%s for the %s dataset ...", len(names), _pl(names), name
)

for idx in range(len(names)):
# fetch and unpack the data
Expand Down
4 changes: 2 additions & 2 deletions mne/datasets/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@

MNE_DATASETS["somato"] = dict(
archive_name="MNE-somato-data.tar.gz",
hash="md5:32fd2f6c8c7eb0784a1de6435273c48b",
url="https://osf.io/download/tp4sg?version=7",
hash="md5:9a191907b326b9402341ee7a0d1240d8",
url="https://osf.io/download/tp4sg?version=8",
folder_name="MNE-somato-data",
config_key="MNE_DATASETS_SOMATO_PATH",
)
Expand Down
Loading