Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into dig
Browse files Browse the repository at this point in the history
* upstream/main:
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13110)
  ENH: add interpolate_to method (mne-tools#13044)
  add overwrite and verbose params to info.save (mne-tools#13107)
  Add support for n-dimensional arrays in `_tfr_from_mt` (mne-tools#13104)
  Skip first "New Segment" BrainVision marker (mne-tools#13100)
  MAINT: Use statsmodels pre and fix CircleCI (mne-tools#13106)
  Take units (m or mm) into account when showing fieldmaps on top of brains (mne-tools#13101)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13099)
  MAINT: Update code credit (mne-tools#13093)
  Fix EEGLAB import (nodatchans) (mne-tools#13097)
  MAINT: Fix CircleCI [circle deploy] (mne-tools#13089)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#13088)
  Fix signature of some more _close() methods [circle deploy] (mne-tools#13087)
  Fix _close() on MNEAnnotationsFigure and MNESelectionFigure [circle deploy] (mne-tools#13086)
  BUG: Fix bug with Mesa 3D detection (mne-tools#13082)
  • Loading branch information
larsoner committed Feb 11, 2025
2 parents c0f5d74 + cf5ef5f commit 542d51f
Show file tree
Hide file tree
Showing 73 changed files with 2,426 additions and 222 deletions.
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Eduard Ort <[email protected]> examplename <[email protected]>
Ellen Lau <[email protected]> ellenlau <[email protected]>
Emily Stephen <[email protected]> Emily P. Stephen <[email protected]>
Emily Stephen <[email protected]> emilyps14 <[email protected]>
Emma Bailey <[email protected]> emma-bailey <[email protected]>
Enrico Varano <[email protected]> enricovara <[email protected]>
Enzo Altamiranda <[email protected]> enzo <[email protected]>
Eric Larson <[email protected]> Eric Larson <[email protected]>
Expand Down Expand Up @@ -315,6 +316,7 @@ Sara Sommariva <[email protected]> sarasommariva <[email protected]>
Sebastien Treguer <[email protected]> DataFox <[email protected]>
Sena Er <[email protected]> Sena <[email protected]>
Senwen Deng <[email protected]> Senwen DENG <[email protected]>
Shristi Baral <[email protected]> Shristi Baral <[email protected]>
Silvia Cotroneo <[email protected]> sfc-neuro <[email protected]>
Simon Kern <[email protected]> Simon Kern <[email protected]>
Simon Kern <[email protected]> skjerns <[email protected]>
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
# Ruff mne
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
rev: v0.9.6
hooks:
- id: ruff
name: ruff lint mne
Expand All @@ -23,7 +23,7 @@ repos:

# Codespell
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell
additional_dependencies:
Expand Down Expand Up @@ -82,7 +82,7 @@ repos:

# zizmor
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.2.2
rev: v1.3.1
hooks:
- id: zizmor

Expand Down
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ stages:
DISPLAY: ':99'
OPENBLAS_NUM_THREADS: '1'
MNE_TEST_ALLOW_SKIP: '^.*(PySide6 causes segfaults).*$'
MNE_BROWSER_PRECOMPUTE: 'false'
steps:
- bash: |
set -e
Expand Down
1 change: 1 addition & 0 deletions doc/changes/devel/13044.newfeature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add :meth:`mne.Evoked.interpolate_to` to allow interpolating EEG data to other montages, by :newcontrib:`Antoine Collas`.
1 change: 1 addition & 0 deletions doc/changes/devel/13082.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug with automated Mesa 3D detection for proper 3D option setting on systems with software rendering, by `Eric Larson`_.
1 change: 1 addition & 0 deletions doc/changes/devel/13097.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug when loading certain EEGLAB files that do not contain a ``nodatchans`` field, by `Clemens Brunner`_.
1 change: 1 addition & 0 deletions doc/changes/devel/13100.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Do not convert the first "New Segment" marker in a BrainVision file to an annotation, as it only contains the recording date (which is already available in ``info["meas_date"]``), by `Clemens Brunner`_.
1 change: 1 addition & 0 deletions doc/changes/devel/13101.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Take units (m or mm) into account when drawing :func:`~mne.viz.plot_evoked_field` on top of :class:`~mne.viz.Brain`, by `Marijn van Vliet`_.
1 change: 1 addition & 0 deletions doc/changes/devel/13107.newfeature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The :meth:`mne.Info.save` method now has an ``overwrite`` and a ``verbose`` parameter, by `Stefan Appelhoff`_.
3 changes: 2 additions & 1 deletion doc/changes/names.inc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
.. _Anna Padee: https://github.com/apadee/
.. _Annalisa Pascarella: https://www.iac.cnr.it/personale/annalisa-pascarella
.. _Anne-Sophie Dubarry: https://github.com/annesodub
.. _Antoine Collas: https://www.antoinecollas.fr
.. _Antoine Gauthier: https://github.com/Okamille
.. _Antti Rantala: https://github.com/Odingod
.. _Apoorva Karekal: https://github.com/apoorva6262
Expand Down Expand Up @@ -256,7 +257,7 @@
.. _Romain Derollepot: https://github.com/rderollepot
.. _Romain Trachel: https://fr.linkedin.com/in/trachelr
.. _Roman Goj: https://romanmne.blogspot.co.uk
.. _Ross Maddox: https://www.urmc.rochester.edu/labs/maddox-lab.aspx
.. _Ross Maddox: https://medicine.umich.edu/dept/khri/ross-maddox-phd
.. _Rotem Falach: https://github.com/Falach
.. _Roy Eric Wieske: https://github.com/Randomidous
.. _Sammi Chekroud: https://github.com/schekroud
Expand Down
6 changes: 5 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines):
linkcheck_ignore = [ # will be compiled to regex
# 403 Client Error: Forbidden
"https://doi.org/10.1002/", # onlinelibrary.wiley.com/doi/10.1002/hbm
"https://doi.org/10.1016/", # neuroimage
"https://doi.org/10.1021/", # pubs.acs.org/doi/abs
"https://doi.org/10.1073/", # pnas.org
"https://doi.org/10.1093/", # academic.oup.com/sleep/
Expand All @@ -667,10 +668,11 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines):
r"https://scholar.google.com/scholar\?cites=12188330066413208874&as_ylo=2014",
r"https://scholar.google.com/scholar\?cites=1521584321377182930&as_ylo=2013",
"https://www.research.chop.edu/imaging",
"http://prdownloads.sourceforge.net/optipng/optipng-0.7.8-win64.zip?download",
"http://prdownloads.sourceforge.net/optipng",
"https://sourceforge.net/projects/aespa/files/",
"https://sourceforge.net/projects/ezwinports/files/",
"https://www.mathworks.com/products/compiler/matlab-runtime.html",
"https://medicine.umich.edu/dept/khri/ross-maddox-phd",
# 500 server error
"https://openwetware.org/wiki/Beauchamp:FreeSurfer",
# 503 Server error
Expand All @@ -694,6 +696,8 @@ def fix_sklearn_inherited_docstrings(app, what, name, obj, options, lines):
"http://ilabs.washington.edu",
"https://psychophysiology.cpmc.columbia.edu",
"https://erc.easme-web.eu",
# Not rendered by linkcheck builder
r"ides\.html",
]
linkcheck_anchors = False # saves a bit of time
linkcheck_timeout = 15 # some can be quite slow
Expand Down
8 changes: 8 additions & 0 deletions doc/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -2514,3 +2514,11 @@ @article{OyamaEtAl2015
year = {2015},
pages = {24--36},
}

@inproceedings{MellotEtAl2024,
title = {Physics-informed and Unsupervised Riemannian Domain Adaptation for Machine Learning on Heterogeneous EEG Datasets},
author = {Mellot, Apolline and Collas, Antoine and Chevallier, Sylvain and Engemann, Denis and Gramfort, Alexandre},
booktitle = {Proceedings of the 32nd European Signal Processing Conference (EUSIPCO)},
year = {2024},
address = {Lyon, France}
}
32 changes: 16 additions & 16 deletions doc/sphinxext/credit_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@

# Allowed singletons
single_names = "btkcodedev buildqa sviter Akshay".split()
# Surnames where we have more than one distinct contributor:
name_counts = dict(
Bailey=2,
Das=2,
Drew=2,
Li=2,
Peterson=2,
Wong=2,
Zhang=2,
)
# Exceptions, e.g., abbrevitaions in first/last name or all-caps
exceptions = [
"T. Wang",
Expand Down Expand Up @@ -217,16 +227,6 @@ def generate_credit_rst(app=None, *, verbose=False):
)

# Check for duplicate names based on last name, and also singleton names.
# Below are surnames where we have more than one distinct contributor:
name_counts = dict(
Das=2,
Drew=2,
Li=2,
Peterson=2,
Wong=2,
Zhang=2,
)
# Below are allowed singleton names
last_map = defaultdict(lambda: set())
bad_names = set()
for these_stats in stats.values():
Expand All @@ -245,10 +245,11 @@ def generate_credit_rst(app=None, *, verbose=False):
if len(names) > name_counts.get(last, 1):
bad_names.append(f"Duplicates: {sorted(names)}")
if bad_names:
raise RuntimeError(
"Unexpected possible duplicates or bad names found:\n"
+ "\n".join(bad_names)
what = (
"Unexpected possible duplicates or bad names found, "
f"consider modifying {'/'.join(Path(__file__).parts[-3:])}:\n"
)
raise RuntimeError(what + "\n".join(bad_names))

unknown_emails = set(
email
Expand All @@ -258,9 +259,8 @@ def generate_credit_rst(app=None, *, verbose=False):
and "dependabot[bot]" not in email
and "github-actions[bot]" not in email
)
assert len(unknown_emails) == 0, "Unknown emails\n" + "\n".join(
sorted(unknown_emails)
)
what = "Unknown emails, consider adding to .mailmap:\n"
assert len(unknown_emails) == 0, what + "\n".join(sorted(unknown_emails))

logger.info("Biggest included commits/PRs:")
commits = dict(
Expand Down
67 changes: 67 additions & 0 deletions doc/sphinxext/prs/12071.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"merge_commit_sha": "aca49655b10fc17679142e07c5d46659be1099da",
"authors": [
{
"n": "Marijn van Vliet",
"e": "[email protected]"
},
{
"n": "pre-commit-ci[bot]",
"e": "66853113+pre-commit-ci[bot]@users.noreply.github.com"
},
{
"n": "Daniel McCloy",
"e": "[email protected]"
}
],
"changes": {
"doc/changes/devel/12071.newfeature.rst": {
"a": 1,
"d": 0
},
"mne/epochs.py": {
"a": 2,
"d": 0
},
"mne/evoked.py": {
"a": 2,
"d": 0
},
"mne/viz/_figure.py": {
"a": 3,
"d": 3
},
"mne/viz/_mpl_figure.py": {
"a": 1,
"d": 1
},
"mne/viz/evoked.py": {
"a": 12,
"d": 1
},
"mne/viz/tests/test_raw.py": {
"a": 14,
"d": 25
},
"mne/viz/tests/test_topo.py": {
"a": 35,
"d": 1
},
"mne/viz/tests/test_utils.py": {
"a": 69,
"d": 0
},
"mne/viz/topo.py": {
"a": 81,
"d": 15
},
"mne/viz/ui_events.py": {
"a": 20,
"d": 0
},
"mne/viz/utils.py": {
"a": 108,
"d": 63
}
}
}
35 changes: 35 additions & 0 deletions doc/sphinxext/prs/12656.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"merge_commit_sha": "3c6a054093d305a98757a97398e5e34988a3aced",
"authors": [
{
"n": "Qian Chu",
"e": null
}
],
"changes": {
"doc/changes/devel/12656.bugfix.rst": {
"a": 1,
"d": 0
},
"mne/export/_brainvision.py": {
"a": 7,
"d": 0
},
"mne/export/_edf.py": {
"a": 4,
"d": 1
},
"mne/export/_eeglab.py": {
"a": 11,
"d": 5
},
"mne/export/_export.py": {
"a": 7,
"d": 1
},
"mne/export/tests/test_export.py": {
"a": 82,
"d": 7
}
}
}
43 changes: 43 additions & 0 deletions doc/sphinxext/prs/12828.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"merge_commit_sha": "176f64ff061136cf5628d76535a8d7e2e164d399",
"authors": [
{
"n": "Shristi Baral",
"e": null
},
{
"n": "shristi",
"e": "[email protected]"
},
{
"n": "Eric Larson",
"e": "[email protected]"
},
{
"n": "Daniel McCloy",
"e": "[email protected]"
}
],
"changes": {
"doc/changes/devel/12828.bugfix.rst": {
"a": 1,
"d": 0
},
"doc/changes/names.inc": {
"a": 1,
"d": 0
},
"mne/source_estimate.py": {
"a": 7,
"d": 0
},
"mne/utils/docs.py": {
"a": 6,
"d": 0
},
"mne/viz/_3d.py": {
"a": 13,
"d": 3
}
}
}
51 changes: 51 additions & 0 deletions doc/sphinxext/prs/12910.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"merge_commit_sha": "1d2635f84a55785c3531cfe4027eda3820a7fb31",
"authors": [
{
"n": "Thomas S. Binns",
"e": "[email protected]"
},
{
"n": "Daniel McCloy",
"e": "[email protected]"
},
{
"n": "Eric Larson",
"e": "[email protected]"
}
],
"changes": {
"doc/changes/devel/12910.newfeature.rst": {
"a": 1,
"d": 0
},
"mne/time_frequency/multitaper.py": {
"a": 10,
"d": 0
},
"mne/time_frequency/tests/test_tfr.py": {
"a": 195,
"d": 26
},
"mne/time_frequency/tfr.py": {
"a": 249,
"d": 113
},
"mne/utils/docs.py": {
"a": 12,
"d": 0
},
"mne/utils/numerics.py": {
"a": 3,
"d": 0
},
"mne/viz/tests/test_topomap.py": {
"a": 24,
"d": 1
},
"mne/viz/topomap.py": {
"a": 13,
"d": 1
}
}
}
Loading

0 comments on commit 542d51f

Please sign in to comment.