Skip to content

Commit f952d58

Browse files
committed
Merge remote-tracking branch 'upstream/main' into kernel
* upstream/main: (37 commits) Use constrained layout in matplotlib visualization (mne-tools#12050) Add raw stc (mne-tools#12001) [MRG] update codeowners (mne-tools#12089) DOC: Morlet wavelet length in tfr_morlet (mne-tools#12073) BUG: Fix bug with mne browser backend (mne-tools#12078) Cache avatars (mne-tools#12077) BUG: Fix bug with ch_name resolution (mne-tools#12086) add unicode roundtrip for FIF (mne-tools#12080) add Ivan to names.inc (mne-tools#12081) MAINT: Work around PySide 6.5.3 event loop error (mne-tools#12076) mne-tools#11608, buggfix and docstring update (mne-tools#12066) MAINT: Fix broken examples (mne-tools#12074) Add UI Event linking to DraggableColorbar (mne-tools#12057) handle lazy loading through .pyi type stubs (mne-tools#12072) BUG: Fix bug with sensor_colors (mne-tools#12068) clean up some deprecations (mne-tools#12067) Allow not dropping bads when creating or plotting Spectrum objs (mne-tools#12006) Collapsible html repr for raw/info (mne-tools#12064) BUG: Fix bug with pickling MNEBadsList (mne-tools#12063) add details for Denis (mne-tools#12065) ...
2 parents 5ffedd8 + fdaeb86 commit f952d58

File tree

262 files changed

+3850
-3997
lines changed

Some content is hidden

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

262 files changed

+3850
-3997
lines changed

.github/CODEOWNERS

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#################################################
2525

2626
# Artifact regression
27-
/mne/preprocessing/_regress.py @wmvanvliet @cbrnr
27+
/mne/preprocessing/_regress.py @wmvanvliet
2828
/mne/preprocessing/tests/test_regress.py @wmvanvliet
2929

3030
# Beamforming
@@ -33,25 +33,26 @@
3333
*lcmv*.py @britta-wstnr
3434

3535
# Channels
36-
/mne/channels @cbrnr @agramfort @mscheltienne
36+
/mne/channels @agramfort @mscheltienne @dengemann @jasmainak
3737

3838
# Core sensor-space classes
39-
/mne/epochs.py @drammock @agramfort @mscheltienne
40-
/mne/evoked.py @drammock @agramfort @mscheltienne
41-
/mne/io/*.* @drammock @cbrnr @agramfort @mscheltienne
39+
/mne/epochs.py @drammock @agramfort @mscheltienne @dengemann
40+
/mne/evoked.py @drammock @agramfort @mscheltienne @dengemann
41+
/mne/io/*.* @drammock @cbrnr @agramfort @mscheltienne @dengemann
4242

4343
# Current-source density
44-
/mne/preprocessing/_csd.py @alexrockhill
44+
/mne/preprocessing/_csd.py @alexrockhill @dengemann
4545

4646
# Decoding
47-
/mne/decoding/csp.py @cbrnr @agramfort
47+
/mne/decoding/csp.py @cbrnr @agramfort @dengemann
48+
/mne/decoding/*.py @jasmainak
4849

4950
# fNIRS
5051
/mne/preprocessing/nirs @rob-luke
5152
*fnirs*.py @rob-luke
5253

5354
# forward
54-
/mne/forward/ @agramfort
55+
/mne/forward/ @agramfort @jasmainak
5556
*forward*.py @agramfort
5657

5758
# Intracranial
@@ -69,19 +70,21 @@
6970
/mne/io/nirx @rob-luke
7071
/mne/io/snirf @rob-luke
7172
/mne/export @sappelhoff @cbrnr
73+
/mne/io/eeglab.py @jasmainak
74+
/mne/io/eeglab/tests/test_eeglab.py @jasmainak
7275

7376
# Minimum Norm
7477
/mne/minimum_norm @agramfort
7578

7679
# Preprocessing
77-
/mne/preprocessing/ica.py @cbrnr @adam2392 @agramfort @mscheltienne
78-
/mne/preprocessing/infomax_.py @cbrnr @adam2392 @mscheltienne
80+
/mne/preprocessing/ica.py @cbrnr @adam2392 @agramfort @mscheltienne @dengemann
81+
/mne/preprocessing/infomax_.py @cbrnr @adam2392 @mscheltienne @dengemann
7982
/mne/preprocessing/*annotate*.py @mscheltienne
8083
/mne/preprocessing/bads.py @mscheltienne
8184
/mne/preprocessing/e*g.py @mscheltienne
8285

8386
# Report
84-
/mne/report @hoechenberger
87+
/mne/report @hoechenberger @dengemann @jasmainak
8588

8689
# Simulation
8790
/mne/simulation/ @agramfort
@@ -93,25 +96,28 @@
9396
/mne/_freesurfer.py @alexrockhill @larsoner
9497

9598
# TFR
96-
/mne/time_frequency @drammock @cbrnr @adam2392 @mscheltienne
99+
/mne/time_frequency @drammock @adam2392 @mscheltienne
97100

98101
# Viz
99-
/mne/viz @drammock @cbrnr
102+
/mne/viz @drammock @dengemann
100103
/mne/viz/_brain @larsoner @wmvanvliet
101104
/mne/viz/ui_events.py @wmvanvliet
102-
/tutorials/visualization @larsoner @wmvanvliet
103-
/examples/visualization @larsoner
105+
/tutorials/visualization @larsoner @wmvanvliet @dengemann
106+
/examples/visualization @larsoner @dengemann
107+
108+
# Datasets
109+
/mne/datasets/brainstorm @jasmainak
104110

105111
#########################
106112
# Project-level / other #
107113
#########################
108114

109115
# Examples and tutorials
110-
/examples @drammock @agramfort
111-
/tutorials @drammock @agramfort
116+
/examples @drammock @agramfort @dengemann
117+
/tutorials @drammock @agramfort @dengemann
112118

113119
# Non-tutorial documentation text and infrastructure
114-
/doc @larsoner @drammock @agramfort
120+
/doc @larsoner @drammock @agramfort @dengemann
115121
/logo @drammock
116122

117123
# Installation documentation
@@ -120,5 +126,5 @@
120126
# Project infrastructure and CIs
121127
/*.* @larsoner @drammock # files in the root directory
122128
/.circleci @larsoner
123-
/.github @larsoner @cbrnr
129+
/.github @larsoner
124130
/tools @larsoner @drammock

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
package:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
- uses: actions/setup-python@v4
2323
with:
2424
python-version: '3.10'

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ repos:
77

88
# Ruff mne
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.0.291
10+
rev: v0.0.292
1111
hooks:
1212
- id: ruff
1313
name: ruff mne
1414
files: ^mne/
1515

1616
# Ruff tutorials and examples
1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: v0.0.291
18+
rev: v0.0.292
1919
hooks:
2020
- id: ruff
2121
name: ruff tutorials and examples
@@ -26,7 +26,7 @@ repos:
2626

2727
# Codespell
2828
- repo: https://github.com/codespell-project/codespell
29-
rev: v2.2.5
29+
rev: v2.2.6
3030
hooks:
3131
- id: codespell
3232
additional_dependencies:

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ recursive-include tutorials *.py
1515
recursive-include tutorials *.txt
1616

1717
recursive-include mne *.py
18+
recursive-include mne *.pyi
1819
recursive-include mne/data *
1920
recursive-include mne/icons *
2021
recursive-include mne/data/helmets *

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ sample_data:
3333
testing_data:
3434
@python -c "import mne; mne.datasets.testing.data_path(verbose=True);"
3535

36-
pytest: test
37-
3836
test-no-network: in
3937
sudo unshare -n -- sh -c 'MNE_SKIP_NETWORK_TESTS=1 py.test mne'
4038

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The minimum required dependencies to run MNE-Python are:
9696
- Python >= 3.8
9797
- NumPy >= 1.21.2
9898
- SciPy >= 1.7.1
99-
- Matplotlib >= 3.4.3
99+
- Matplotlib >= 3.5.0
100100
- pooch >= 1.5
101101
- tqdm
102102
- Jinja2
File renamed without changes.

doc/_static/js/contrib-avatars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function putAvatarsInPage() {
4747
}
4848
// finish
4949
outer.append(title, inner);
50-
document.getElementById("institution-logos").after(outer);
50+
document.body.append(outer);
5151
}
5252

5353
putAvatarsInPage();

doc/_static/js/set_installer_tab.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/* inspired by https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/ */
2+
3+
function documentReady(callback) {
4+
if (document.readyState != "loading") callback();
5+
else document.addEventListener("DOMContentLoaded", callback);
6+
}
7+
8+
function setTabs() {
9+
var platform = "linux";
10+
if (navigator.userAgent.indexOf("Win") !== -1) {
11+
platform = "windows";
12+
}
13+
if (navigator.userAgent.indexOf("Mac") !== -1) {
14+
// there's no good way to distinguish intel vs M1 in javascript so we
15+
// just default to showing the first of the 2 macOS tabs
16+
platform = "macos-intel";
17+
}
18+
let all_tab_nodes = document.querySelectorAll(
19+
'.platform-selector-tabset')[0].children;
20+
let input_nodes = [...all_tab_nodes].filter(
21+
child => child.nodeName === "INPUT");
22+
let tab_label_nodes = [...document.querySelectorAll('.sd-tab-label')];
23+
let correct_label = tab_label_nodes.filter(
24+
// label.id is drawn from :name: property in the rST, which must
25+
// be unique across the whole site (*sigh*)
26+
label => label.id.startsWith(platform))[0];
27+
let input_id = correct_label.getAttribute('for');
28+
let correct_input = input_nodes.filter(node => node.id === input_id)[0];
29+
correct_input.checked = true;
30+
}
31+
32+
documentReady(setTabs);
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/* inspired by https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/ */
2+
3+
function documentReady(callback) {
4+
if (document.readyState != "loading") callback();
5+
else document.addEventListener("DOMContentLoaded", callback);
6+
}
7+
8+
async function getRelease() {
9+
result = await fetch("https://api.github.com/repos/mne-tools/mne-installers/releases/latest");
10+
data = await result.json();
11+
return data;
12+
}
13+
async function warnVersion() {
14+
data = await getRelease();
15+
// Take v1.5.1 for example and change to 1.5
16+
ids = ["linux-installers", "macos-intel-installers", "macos-apple-installers", "windows-installers"];
17+
warn = false;
18+
ids.forEach((id) => {
19+
label_id = document.getElementById(id);
20+
// tab is immediately after label
21+
children = [].slice.call(label_id.parentNode.children);
22+
div = children[children.indexOf(label_id) + 1];
23+
a = div.children[0].children[0]; // div->p->a
24+
ending = a.href.split("-").slice(-1)[0]; // Should be one of: ["macOS_Intel.pkg", "macOS_M1.pkg", "Linux.sh", "Windows.exe"]
25+
data["assets"].every((asset) => {
26+
// find the matching asset
27+
if (!asset["browser_download_url"].endsWith(ending)) {
28+
return true; // continue
29+
}
30+
old_stem = a.href.split("/").slice(-1)[0];
31+
new_stem = asset["browser_download_url"].split("/").slice(-1)[0];
32+
a.href = asset["browser_download_url"];
33+
// also replace the command on Linux
34+
if (ending === "Linux.sh") {
35+
code = document.getElementById("codecell0");
36+
}
37+
if (!warn) {
38+
// MNE-Python-1.5.1_0-Linux.sh to 1.5 for example
39+
old_ver = old_stem.split("-").slice(2)[0].split("_")[0].split(".").slice(0, 2).join(".");
40+
new_ver = new_stem.split("-").slice(2)[0].split("_")[0].split(".").slice(0, 2).join(".");
41+
if (old_ver !== new_ver) {
42+
warn = `The installers below are for version ${new_ver} as ${old_ver} is no longer supported`;
43+
}
44+
}
45+
return false; // do not continue
46+
});
47+
});
48+
if (warn) {
49+
let outer = document.createElement("div");
50+
let title = document.createElement("p");
51+
let inner = document.createElement("p");
52+
outer.setAttribute("class", "admonition warning");
53+
title.setAttribute("class", "admonition-title");
54+
title.innerText = "Warning";
55+
inner.innerText = warn;
56+
outer.append(title, inner);
57+
document.querySelectorAll('.platform-selector-tabset')[0].before(outer);
58+
}
59+
}
60+
61+
documentReady(warnVersion);

0 commit comments

Comments
 (0)