Skip to content

Commit 03a3501

Browse files
Merge branch 'doc-ref-channel-clarification' of https://github.com/Dpereaptkhamur-13/mne-python into doc-ref-channel-clarification
2 parents ec318e6 + 2549205 commit 03a3501

64 files changed

Lines changed: 1870 additions & 266 deletions

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/tests.yml

Lines changed: 15 additions & 31 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,36 +119,21 @@ 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'
146128
- 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)
157139
- uses: astral-sh/setup-uv@v8.1.0
@@ -162,7 +144,9 @@ jobs:
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)

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,17 @@ Users and contributors to MNE-Python are expected to follow our [code of conduct
77

88
The [contributing guide](https://mne.tools/dev/development/contributing.html) has details on the preferred contribution workflow
99
and the recommended system configuration for a smooth contribution/development experience.
10+
11+
12+
Policy on AI Assistance in Contributions
13+
----------------------------------------
14+
Contributing to MNE-Python requires human judgment, contextual understanding, domain knowledge, and familiarity with MNE-Python’s structure and goals. It is not suitable for automatic processing by AI tools.
15+
16+
You may not submit issues or pull requests generated by fully-automated tools. Maintainers reserve the right, at their sole discretion, to close such submissions and to block any account responsible for them.
17+
18+
Review all code or documentation changes assisted by AI tools and make sure you understand all changes and can explain them on request, before submitting them under your name. Do not submit any AI-generated code that you haven’t personally reviewed, understood and tested. Please pay special attention to whether AI-assisted code reproduces specific passages for specialized algorithms, as this may risk license violations.
19+
20+
Please do not paste AI generated text in the description of issues, PRs or in comments as this makes it harder for reviewers to assess your contribution.
21+
If you used AI tools, state so in your PR description and disclose the tools you have used, and the manner and scope of their assistance (see PR template for examples).
22+
23+
PRs that appear to violate this policy will be closed without review. AI usage is an evolving issue with serious repercussions far beyond the scientific software ecosystem. The MNE-Python project reserves the right to change or reverse this policy given the developments in these areas.

azure-pipelines.yml

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ stages:
8282
variables:
8383
AZURE_CI: 'true'
8484
jobs:
85-
- job: Ultraslow_PG
85+
- job: Linux_Ultraslow_PG
8686
pool:
87-
vmImage: 'ubuntu-22.04'
87+
vmImage: 'ubuntu-latest'
8888
variables:
8989
DISPLAY: ':99'
9090
OPENBLAS_NUM_THREADS: '1'
@@ -93,7 +93,7 @@ stages:
9393
MNE_BROWSER_PRECOMPUTE: 'false'
9494
steps:
9595
- bash: |
96-
set -e
96+
set -eo pipefail
9797
./tools/setup_xvfb.sh
9898
sudo apt install -yq tcsh
9999
displayName: 'Install Ubuntu dependencies'
@@ -112,19 +112,19 @@ stages:
112112
addToPath: true
113113
displayName: 'Get Python'
114114
- bash: |
115-
set -e
115+
set -eo pipefail
116116
python -m pip install --progress-bar off --upgrade pip
117117
python -m pip install --progress-bar off "mne-qt-browser[opengl] @ git+https://github.com/mne-tools/mne-qt-browser.git" pyvista scikit-learn python-picard qtpy nibabel sphinx-gallery "PySide6!=6.8.0,!=6.8.0.1,!=6.8.1.1,!=6.9.1" pandas neo pymatreader antio defusedxml curryreader pymef
118118
python -m pip uninstall -yq mne
119119
python -m pip install --progress-bar off --upgrade -e . --group=test
120120
displayName: 'Install dependencies with pip'
121121
- bash: |
122-
set -e
122+
set -eo pipefail
123123
mne sys_info -pd
124124
mne sys_info -pd | grep "qtpy .*(PySide6=.*)$"
125125
displayName: Print config
126126
- bash: |
127-
set -e
127+
set -eo pipefail
128128
LD_DEBUG=libs python -c "from PySide6.QtWidgets import QApplication, QWidget; app = QApplication([]); import matplotlib; matplotlib.use('QtAgg'); import matplotlib.pyplot as plt; plt.figure()"
129129
- bash: source tools/get_testing_version.sh
130130
displayName: 'Get testing version'
@@ -141,19 +141,10 @@ stages:
141141
- bash: bash <(curl -s https://codecov.io/bash)
142142
displayName: 'Codecov'
143143
condition: succeededOrFailed()
144-
- task: PublishTestResults@2
145-
inputs:
146-
testResultsFiles: '**/junit-*.xml'
147-
testRunTitle: 'Publish test results for $(Agent.JobName)'
148-
failTaskOnFailedTests: true
149-
condition: succeededOrFailed()
150-
- task: PublishCodeCoverageResults@2
151-
inputs:
152-
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
153144

154-
- job: Qt
145+
- job: Linux_Qt_Bindings
155146
pool:
156-
vmImage: 'ubuntu-22.04'
147+
vmImage: 'ubuntu-latest'
157148
variables:
158149
DISPLAY: ':99'
159150
OPENBLAS_NUM_THREADS: '1'
@@ -169,7 +160,7 @@ stages:
169160
addToPath: true
170161
displayName: 'Get Python'
171162
- bash: |
172-
set -e
163+
set -eo pipefail
173164
python -m pip install --progress-bar off --upgrade pip
174165
python -m pip install --progress-bar off --upgrade --pre --only-binary=\"numpy,scipy,matplotlib,vtk\" numpy scipy matplotlib vtk
175166
python -c "import vtk"
@@ -223,15 +214,6 @@ stages:
223214
- bash: bash <(curl -s https://codecov.io/bash)
224215
displayName: 'Codecov'
225216
condition: succeededOrFailed()
226-
- task: PublishTestResults@2
227-
inputs:
228-
testResultsFiles: '**/junit-*.xml'
229-
testRunTitle: 'Publish test results for $(Agent.JobName)'
230-
failTaskOnFailedTests: true
231-
condition: succeededOrFailed()
232-
- task: PublishCodeCoverageResults@2
233-
inputs:
234-
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
235217

236218
- job: Windows
237219
pool:
@@ -250,9 +232,9 @@ stages:
250232
strategy:
251233
maxParallel: 4
252234
matrix:
253-
3.10 pip:
235+
3.11 pip:
254236
TEST_MODE: 'pip'
255-
PYTHON_VERSION: '3.10'
237+
PYTHON_VERSION: '3.11'
256238
3.13 pip pre:
257239
TEST_MODE: 'pip-pre'
258240
PYTHON_VERSION: '3.13'
@@ -292,12 +274,3 @@ stages:
292274
- bash: bash <(curl -s https://codecov.io/bash)
293275
displayName: 'Codecov'
294276
condition: succeededOrFailed()
295-
- task: PublishTestResults@2
296-
inputs:
297-
testResultsFiles: '**/junit-*.xml'
298-
testRunTitle: 'Publish test results for $(Agent.JobName) $(TEST_MODE) $(PYTHON_VERSION)'
299-
failTaskOnFailedTests: true
300-
condition: succeededOrFailed()
301-
- task: PublishCodeCoverageResults@2
302-
inputs:
303-
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'

doc/_includes/forward.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,7 @@ EEG forward solution in the sphere model
689689

690690
For examples of using the sphere model when computing the forward model
691691
(using :func:`mne.make_forward_solution`), see :ref:`Brainstorm CTF phantom
692-
dataset tutorial <plt_brainstorm_phantom_ctf_eeg_sphere_geometry>`,
693-
:ref:`Brainstorm Elekta phantom dataset tutorial
694-
<plt_brainstorm_phantom_elekta_eeg_sphere_geometry>`, and
692+
dataset tutorial <plt_brainstorm_phantom_ctf_eeg_sphere_geometry>` and
695693
:ref:`tut-source-alignment-without-mri`.
696694

697695
When the sphere model is employed, the computation of the EEG solution can be

doc/changes/dev/13584.other.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adopting the diataxis framework by improving the phantom dipole tutorial, by `Carina Forster`_.

doc/changes/dev/13846.other.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Clarify average EEG reference behavior in documentation for :func:`~mne.add_reference_channels`, by `Deep Kaur`_ (:newcontrib:`Deep Kaur`)
1+
Add notes to :func:`~mne.set_eeg_reference` and :ref:`_tut-set-eeg-ref` about the correct procedure to create an average reference, by :newcontrib:`Deep Kaur`.

doc/changes/dev/13870.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix handling of optional dependencies that don't specify a version attribute, by :newcontrib:`Baris Talar`.

doc/changes/dev/13881.other.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed typos in error messages when reading measurement info, by :newcontrib:`Seth Bashford`.

doc/changes/names.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
.. _Asish Panda: https://github.com/kaichogami
3737
.. _Austin Hurst: https://github.com/a-hurst
3838
.. _Ayushi Satodiya: https://github.com/ayuclan
39+
.. _Baris Talar: https://github.com/baris-talar
3940
.. _Beige Jin: https://github.com/BeiGeJin
4041
.. _Ben Beasley: https://github.com/musicinmybrain
4142
.. _Benedikt Ehinger: https://www.benediktehinger.de
@@ -312,6 +313,7 @@
312313
.. _Sebastian Major: https://github.com/major-s
313314
.. _Sena Er: https://github.com/sena-neuro
314315
.. _Senwen Deng: https://snwn.de
316+
.. _Seth Bashford: https://github.com/sbashford
315317
.. _Seyed Yahya Shirazi: https://neuromechanist.github.io
316318
.. _Sheraz Khan: https://github.com/SherazKhan
317319
.. _Shresth Keshari: https://github.com/shresth-keshari

0 commit comments

Comments
 (0)