Skip to content

Commit 7e18b52

Browse files
authored
Merge branch 'main' into issue-13767
2 parents 016cc89 + 6a0ffdf commit 7e18b52

268 files changed

Lines changed: 5417 additions & 1075 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
<!--
22
3-
Thanks for contributing a pull request! Please make sure you have read the
4-
[contribution guidelines](https://mne.tools/dev/development/contributing.html)
3+
Thanks for contributing a pull request! Please make sure you have read
4+
[CONTRIBUTING.md](https://github.com/mne-tools/mne-python/blob/main/CONTRIBUTING.md)
5+
and the [detailed contribution guidelines](https://mne.tools/dev/development/contributing.html)
56
before submitting.
67
8+
If you used AI to help prepare this pull request, please pay special attention to
9+
our **Policy on AI Assistance in Contributions** in
10+
[CONTRIBUTING.md](https://github.com/mne-tools/mne-python/blob/main/CONTRIBUTING.md).
11+
Here are some examples of what we expect for "tool, manner, and scope" disclosure:
12+
13+
- "I implemented the code changes myself, and Claude Sonnet 4.6 wrote the test."
14+
- "I prompted Gemini 3.1 Pro to get a first draft implementation, then refined it
15+
manually until I was satisfied."
16+
- "I wrote the code and asked Kimi K2.5 to write the docstring for me."
17+
- "I fed GPT 5.4 the paper where the algorithm is described, and asked it to implement
18+
it for me. Then I had it write an example script using the `sample` dataset, and I
19+
wrote the narrative text of the tutorial myself."
20+
721
Please be aware that we are a loose team of volunteers so patience is
822
necessary. Assistance handling other issues is very welcome. We value
923
all user contributions, no matter how minor they are. If we are slow to

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
- run: pip install --upgrade towncrier pygithub gitpython numpy
2222
- run: python ./.github/actions/rename_towncrier/rename_towncrier.py
2323
- run: python ./tools/dev/ensure_headers.py
24-
- uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8
24+
- uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v4
47+
uses: github/codeql-action/init@v4.35.3
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below)
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v4
61+
uses: github/codeql-action/autobuild@v4.35.3
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -71,4 +71,4 @@ jobs:
7171
# ./location_of_script_within_repo/buildscript.sh
7272

7373
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v4
74+
uses: github/codeql-action/analyze@v4.35.3

.github/workflows/spec_zero.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,17 @@ jobs:
4141
timeout-minutes: 10
4242
with:
4343
detached: true
44-
- uses: astral-sh/setup-uv@v7
44+
- uses: astral-sh/setup-uv@v8.1.0
4545
with:
4646
version: ">=0.9"
4747
activate-environment: true
4848
python-version: 3.12
49-
- run: uv pip install packaging requests tomlkit
50-
- run: python ./tools/dev/spec_zero_update_versions.py
49+
- name: Install dependencies
50+
run: uv pip install -e . packaging requests tomlkit
51+
- name: Update tracked dependencies
52+
run: python ./tools/dev/spec_zero_update_versions.py
53+
- name: Sync updated dependencies to README
54+
run: python tools/sync_dependencies.py
5155
- name: Create lockfile for old CI
5256
# uv pip compile requires setting the python version explicitly in the command :(
5357
run: |
@@ -72,9 +76,11 @@ jobs:
7276
git config --global user.email "50266005+mne-bot@users.noreply.github.com"
7377
git config --global user.name "mne[bot]"
7478
git checkout -b spec_zero
75-
git add doc/changes/dev/dependency.rst # one new file, others changed
79+
if [ -f doc/changes/dev/dependency.rst ]; then
80+
git add doc/changes/dev/dependency.rst # one new file, others changed
81+
fi
7682
git commit -am "mne[bot]: Update dependency specifiers"
7783
git push origin spec_zero
78-
PR_NUM=$(gh pr create --base main --head spec_zero --title "MAINT: Update dependency specifiers" --body "Created by spec_zero [GitHub action](https://github.com/mne-tools/mne-python/actions/runs/${{ github.run_id }}). <br> <br> *It is very likely that \`tools/environment_old.yml\` needs to be updated.* <br> <br> *Adjustments may need to be made to shims in \`mne/fixes.py\` and elswhere in this or another PR. \`git grep TODO VERSION\` is a good starting point for finding potential updates.*")
84+
PR_NUM=$(gh pr create --base main --head spec_zero --title "MAINT: Update dependency specifiers" --body "Created by spec_zero [GitHub action](https://github.com/mne-tools/mne-python/actions/runs/${{ github.run_id }}). <br> <br> *Adjustments may need to be made to shims in \`mne/fixes.py\` and elswhere in this or another PR. \`make -C tools/dev dep\` is a good starting point for finding potential updates.*")
7985
echo "Opened https://github.com/mne-tools/mne-python/pull/${PR_NUM}" >> $GITHUB_STEP_SUMMARY
8086
if: steps.status.outputs.dirty == 'true'

.github/workflows/tests.yml

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
persist-credentials: false
3131
- uses: actions/setup-python@v6
3232
with:
33-
python-version: '3.13'
33+
python-version: '3.14'
3434
- uses: pre-commit/action@v3.0.1
3535
- run: pip install mypy numpy scipy vulture
3636
- run: mypy
@@ -76,15 +76,12 @@ jobs:
7676
- os: ubuntu-latest
7777
python: '3.13'
7878
kind: conda
79-
- os: macos-latest # arm64 (Apple Silicon): Sequoia
80-
python: '3.13'
81-
kind: mamba
82-
- os: macos-15-intel # intel: Sequoia
79+
- os: macos-latest # arm64
80+
python: '3.14'
81+
kind: pip
82+
- os: macos-15-intel # Intel
8383
python: '3.13'
84-
kind: mamba
85-
- os: windows-latest
86-
python: '3.11'
87-
kind: mamba
84+
kind: pip
8885
- os: ubuntu-latest
8986
python: '3.12'
9087
kind: minimal
@@ -122,47 +119,34 @@ jobs:
122119
- uses: actions/setup-python@v6
123120
with:
124121
python-version: ${{ matrix.python }}
125-
if: startswith(matrix.kind, 'pip')
122+
if: startswith(matrix.kind, 'pip') || matrix.kind == 'minimal'
123+
id: setup-python
124+
# Workaround macOS path behavior with login shells (which puts system Python first)
125+
- run: echo "export PATH=\"$(dirname ${{ steps.setup-python.outputs.python-path }}):$PATH\"" | tee -a ~/.bash_profile # zizmor: ignore[template-injection]
126+
if: startswith(matrix.kind, 'pip') && startswith(matrix.os, 'macos')
126127
# Python (if conda)
127-
- name: Fixes for conda
128-
run: |
129-
# For some reason on Linux we get crashes
130-
if [[ "$RUNNER_OS" == "Linux" ]]; then
131-
sed -i "/numba/d" environment.yml
132-
fi
133-
# And on Windows and macOS PySide6.9.0 segfaults
134-
if [[ "$RUNNER_OS" == "macOS" ]]; then
135-
sed -i "" "s/ - PySide6 .*/ - PySide6 =6.9.2/g" environment.yml
136-
sed -i "" "s/ - vtk .*/ - vtk =9.5.1/g" environment.yml
137-
138-
else
139-
sed -i "s/ - PySide6 .*/ - PySide6 =6.9.2/g" environment.yml
140-
sed -i "s/ - vtk .*/ - vtk =9.5.1/g" environment.yml
141-
if [[ "$RUNNER_OS" == "Windows" ]]; then
142-
echo "MNE_IS_OSMESA=true" | tee -a $GITHUB_ENV
143-
fi
144-
fi
145-
if: matrix.kind == 'conda' || matrix.kind == 'mamba'
146-
- uses: mamba-org/setup-micromamba@v2
128+
- uses: mamba-org/setup-micromamba@v3
147129
with:
148130
environment-file: ${{ env.CONDA_ENV }}
149131
environment-name: mne
150-
log-level: ${{ runner.debug == '1' && 'debug' || 'info' }}
132+
log-level: 'info'
151133
create-args: >-
152134
python=${{ env.PYTHON_VERSION }}
153135
-v
154-
if: matrix.kind == 'conda' || matrix.kind == 'mamba'
136+
if: matrix.kind == 'conda'
155137
timeout-minutes: 20
156138
# Python (if old)
157-
- uses: astral-sh/setup-uv@v7
139+
- uses: astral-sh/setup-uv@v8.1.0
158140
with:
159141
version: ">=0.9"
160142
activate-environment: true
161143
cache-dependency-glob: |
162144
**/pylock.ci-old.toml
163145
python-version: ${{ matrix.python }}
164146
if: matrix.kind == 'old'
147+
- run: bash ./tools/github_actions_verify_python.sh "${{ matrix.python }}"
165148
- run: bash ./tools/github_actions_dependencies.sh
149+
timeout-minutes: 10
166150
- run: python ./tools/github_actions_check_old_env.py
167151
if: matrix.kind == 'old'
168152
# Minimal commands on Linux (macOS stalls)
@@ -182,7 +166,7 @@ jobs:
182166
path: ~/mne_data
183167
- run: bash ./tools/github_actions_download.sh
184168
- run: bash ./tools/github_actions_test.sh # for some reason on macOS we need to run "bash X" in order for a failed test run to show up
185-
- uses: codecov/codecov-action@v5
169+
- uses: codecov/codecov-action@v6
186170
with:
187171
token: ${{ secrets.CODECOV_TOKEN }}
188172
if: success() || failure()

.mailmap

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Adam Li <adam2392@gmail.com> Adam Li <adam2392@Adams-MBP-2.home>
22
Adam Li <adam2392@gmail.com> Adam Li <adam2392@new-host-2.home>
3+
Akhilesh S. Yadav <126486217+YadavAkhileshh@users.noreply.github.com> Akhilesh <126486217+YadavAkhileshh@users.noreply.github.com>
34
Alan Leggitt <leggitta3@gmail.com> leggitta <leggitta3@gmail.com>
45
Alessandro Tonin <alessandro.tonin@wysscenter.ch> Lychfindel <58313635+Lychfindel@users.noreply.github.com>
56
Alex Lepauvre <alex.lepauvre@ae.mpg.de> Alex lepauvre <alex.lepauvre@ae.mpg.de>
@@ -48,6 +49,7 @@ Christian Brodbeck <christianmbrodbeck@gmail.com> christianmbrodbeck <christianm
4849
Christian Mista <cmista@ingenieria.uner.edu.ar> cmista <79416030+cmista@users.noreply.github.com>
4950
Christina Zhao <zhaotc@uw.edu> ChristinaZhao <zhaotc@uw.edu>
5051
Christoph Dinh <chdinh@nmr.mgh.harvard.edu> Christoph Dinh <christoph.dinh@tu-ilmenau.de>
52+
Christoph Huber-Huber <christoph@huber-huber.at> CHH <christoph@huber-huber.at>
5153
Christopher J. Bailey <bailey.cj@gmail.com> Chris Bailey <bailey.cj@gmail.com>
5254
Claire Braboszcz <claire@guakamole.org> claire-braboszcz <claire@guakamole.org>
5355
Clemens Brunner <clemens.brunner@gmail.com>
@@ -108,6 +110,7 @@ Evgenii Kalenkovich <e.kalenkovich@gmail.com> kalenkovich <e.kalenkovich@gmail.c
108110
Evgeny Goldstein <84768107+evgenygoldstein@users.noreply.github.com> evgenygoldstein <84768107+evgenygoldstein@users.noreply.github.com>
109111
Ezequiel Mikulan <e.mikulan@gmail.com> ezemikulan <39155887+ezemikulan@users.noreply.github.com>
110112
Fahimeh Mamashli <33672431+fmamashli@users.noreply.github.com> fmamashli <33672431+fmamashli@users.noreply.github.com>
113+
Famous Raj Bhat <famousrajbhatt@gmail.com> Horizon_Architect_07 <famousrajbhatt@gmail.com>
111114
Fede Raimondo <federaimondo@gmail.com> Fede <slashack@gmail.com>
112115
Fede Raimondo <federaimondo@gmail.com> Fede Raimondo <federaimondo@gmail.com>
113116
Fede Raimondo <federaimondo@gmail.com> Fede Raimondo <fraimondo@dc.uba.ar>
@@ -130,6 +133,7 @@ Guillaume Dumas <deep@introspection.eu> deep-introspection <deep@introspection.e
130133
Guillaume Dumas <deep@introspection.eu> Guillaume Dumas <deep-introspection@users.noreply.github.com>
131134
Hakimeh Aslsardroud <hakimeh.aslsardroud@localhost>
132135
Hamid Maymandi <46011104+HamidMandi@users.noreply.github.com> Hamid <46011104+HamidMandi@users.noreply.github.com>
136+
Hansuja Budhiraja <hansujaigdtuwcseai@gmail.com> Hansuja <hansujaigdtuwcseai@gmail.com>
133137
Hasrat Ali Arzoo <hasrat407@gmail.com> hasrat17 <56307533+hasrat17@users.noreply.github.com>
134138
Hongjiang Ye <rubyyhj@gmail.com> YE Hongjiang <hongjiang.ye@outlook.com>
135139
Hongjiang Ye <rubyyhj@gmail.com> YE Hongjiang <rubyyhj@gmail.com>
@@ -247,6 +251,7 @@ Matti Hämäläinen <msh@nmr.mgh.harvard.edu> Matti Hämäläinen <msh@parsley.n
247251
Matti Hämäläinen <msh@nmr.mgh.harvard.edu> mshamalainen <msh@nmr.mgh.harvard.edu>
248252
Matti Toivonen <105695400+mattitoi@users.noreply.github.com> mattitoi <105695400+mattitoi@users.noreply.github.com>
249253
Maureen Shader <55732126+mshader@users.noreply.github.com> mshader <55732126+mshader@users.noreply.github.com>
254+
Melih Yayli <51379391+yaylim@users.noreply.github.com> yaylim <51379391+yaylim@users.noreply.github.com>
250255
Melih Yayli <melihyayli@hotmail.com>
251256
Michiru Kaneda <rcmdnk@gmail.com> rcmdnk <rcmdnk@gmail.com>
252257
Mikołaj Magnuski <mmagnuski@swps.edu.pl> Mikolaj Magnuski <mmagnuski@swps.edu.pl>
@@ -336,6 +341,7 @@ Simon Kern <simon.kern@online.de> skjerns <14980558+skjerns@users.noreply.github
336341
Simon Kern <simon.kern@online.de> skjerns <simon.kern@online.de>
337342
Sondre Foslien <sondre.foslien@gmail.com> sondrfos <sondre.foslien@gmail.com>
338343
Sophie Herbst <ksherbst@gmail.com>
344+
Srivarsha Chivukula <varshaa.1616@gmail.com> varshaa-1616 <varshaa.1616@gmail.com>
339345
Steinn Hauser Magnússon <hausersteinn@gmail.com> Steinn Magnusson <s.magnusson@senec.com>
340346
Steve Matindi <stevematindi@gmail.com> stevemats <stevematindi@gmail.com>
341347
Steven Bierer <neurolaunch@gmail.copm> Steven Bierer <40672003+NeuroLaunch@users.noreply.github.com>
@@ -364,7 +370,6 @@ Tziona NessAiver <tzionan@mail.tau.ac.il> TzionaN <tzionan@mail.tau.ac.il>
364370
user27182 <89109579+user27182@users.noreply.github.com>
365371
Valerii Chirkov <vagechirkov@gmail.com> Valerii <42982039+vagechirkov@users.noreply.github.com>
366372
Valerii Chirkov <vagechirkov@gmail.com> Valerii <vagechirkov@gmail.com>
367-
varshaa-1616 <varshaa.1616@gmail.com>
368373
Velu Prabhakar Kumaravel <veluprabhakarkumaravel@Velus-MBP.lan> Velu Prabhakar Kumaravel <veluprabhakarkumaravel@Velus-MBP.lan>
369374
Victoria Peterson <victoriapeterson09@gmail.com> vpeterson <victoriapeterson09@gmail.com>
370375
Wei Xu <weixu@mail.bnu.edu.cn> Wei <weixu@mail.bnu.edu.cn>

.pre-commit-config.yaml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
# Ruff mne
33
- repo: https://github.com/astral-sh/ruff-pre-commit
4-
rev: v0.15.8
4+
rev: v0.15.12
55
hooks:
66
- id: ruff-check
77
name: ruff lint mne
@@ -54,7 +54,7 @@ repos:
5454
rev: v6.0.0
5555
hooks:
5656
- id: file-contents-sorter
57-
files: ^doc/changes/names.inc|^.mailmap|^doc/sphinxext/related_software.txt
57+
files: ^doc/changes/names.inc|^.mailmap|^doc/sphinxext/related_software.txt|^ignore_words.txt
5858
args: ["--ignore-case"]
5959

6060
- repo: https://github.com/pappasam/toml-sort
@@ -71,28 +71,16 @@ repos:
7171
language: python
7272
entry: ./tools/hooks/update_environment_file.py
7373
files: '^(pyproject.toml|tools/hooks/update_environment_file.py)$'
74-
- repo: local
75-
hooks:
76-
- id: dependency-sync
77-
name: Copy core dependencies from pyproject.toml to README.rst
78-
language: python
79-
entry: ./tools/hooks/sync_dependencies.py
80-
files: '^(pyproject.toml|tools/hooks/sync_dependencies.py)$'
81-
additional_dependencies: ["mne==1.11.0"]
8274

8375
# zizmor
8476
- repo: https://github.com/woodruffw/zizmor-pre-commit
85-
rev: v1.23.1
77+
rev: v1.24.1
8678
hooks:
8779
- id: zizmor
8880
args: [--fix]
8981
# We correctly use pull_request_trigger, and need Zizmor 2.0+ to configure the ignore
9082
exclude: ^.github/workflows/automerge.yml
9183

92-
# these should *not* be run on CIs:
93-
ci:
94-
skip: [dependency-sync] # needs MNE to work, which exceeds the free tier space alloc.
95-
9684
# The following are too slow to run on local commits, so let's only run on CIs:
9785
#
9886
# - repo: https://github.com/pre-commit/mirrors-mypy

0 commit comments

Comments
 (0)