forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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) ...
- Loading branch information
Showing
262 changed files
with
3,850 additions
and
3,997 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* inspired by https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/ */ | ||
|
||
function documentReady(callback) { | ||
if (document.readyState != "loading") callback(); | ||
else document.addEventListener("DOMContentLoaded", callback); | ||
} | ||
|
||
function setTabs() { | ||
var platform = "linux"; | ||
if (navigator.userAgent.indexOf("Win") !== -1) { | ||
platform = "windows"; | ||
} | ||
if (navigator.userAgent.indexOf("Mac") !== -1) { | ||
// there's no good way to distinguish intel vs M1 in javascript so we | ||
// just default to showing the first of the 2 macOS tabs | ||
platform = "macos-intel"; | ||
} | ||
let all_tab_nodes = document.querySelectorAll( | ||
'.platform-selector-tabset')[0].children; | ||
let input_nodes = [...all_tab_nodes].filter( | ||
child => child.nodeName === "INPUT"); | ||
let tab_label_nodes = [...document.querySelectorAll('.sd-tab-label')]; | ||
let correct_label = tab_label_nodes.filter( | ||
// label.id is drawn from :name: property in the rST, which must | ||
// be unique across the whole site (*sigh*) | ||
label => label.id.startsWith(platform))[0]; | ||
let input_id = correct_label.getAttribute('for'); | ||
let correct_input = input_nodes.filter(node => node.id === input_id)[0]; | ||
correct_input.checked = true; | ||
} | ||
|
||
documentReady(setTabs); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* inspired by https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/ */ | ||
|
||
function documentReady(callback) { | ||
if (document.readyState != "loading") callback(); | ||
else document.addEventListener("DOMContentLoaded", callback); | ||
} | ||
|
||
async function getRelease() { | ||
result = await fetch("https://api.github.com/repos/mne-tools/mne-installers/releases/latest"); | ||
data = await result.json(); | ||
return data; | ||
} | ||
async function warnVersion() { | ||
data = await getRelease(); | ||
// Take v1.5.1 for example and change to 1.5 | ||
ids = ["linux-installers", "macos-intel-installers", "macos-apple-installers", "windows-installers"]; | ||
warn = false; | ||
ids.forEach((id) => { | ||
label_id = document.getElementById(id); | ||
// tab is immediately after label | ||
children = [].slice.call(label_id.parentNode.children); | ||
div = children[children.indexOf(label_id) + 1]; | ||
a = div.children[0].children[0]; // div->p->a | ||
ending = a.href.split("-").slice(-1)[0]; // Should be one of: ["macOS_Intel.pkg", "macOS_M1.pkg", "Linux.sh", "Windows.exe"] | ||
data["assets"].every((asset) => { | ||
// find the matching asset | ||
if (!asset["browser_download_url"].endsWith(ending)) { | ||
return true; // continue | ||
} | ||
old_stem = a.href.split("/").slice(-1)[0]; | ||
new_stem = asset["browser_download_url"].split("/").slice(-1)[0]; | ||
a.href = asset["browser_download_url"]; | ||
// also replace the command on Linux | ||
if (ending === "Linux.sh") { | ||
code = document.getElementById("codecell0"); | ||
} | ||
if (!warn) { | ||
// MNE-Python-1.5.1_0-Linux.sh to 1.5 for example | ||
old_ver = old_stem.split("-").slice(2)[0].split("_")[0].split(".").slice(0, 2).join("."); | ||
new_ver = new_stem.split("-").slice(2)[0].split("_")[0].split(".").slice(0, 2).join("."); | ||
if (old_ver !== new_ver) { | ||
warn = `The installers below are for version ${new_ver} as ${old_ver} is no longer supported`; | ||
} | ||
} | ||
return false; // do not continue | ||
}); | ||
}); | ||
if (warn) { | ||
let outer = document.createElement("div"); | ||
let title = document.createElement("p"); | ||
let inner = document.createElement("p"); | ||
outer.setAttribute("class", "admonition warning"); | ||
title.setAttribute("class", "admonition-title"); | ||
title.innerText = "Warning"; | ||
inner.innerText = warn; | ||
outer.append(title, inner); | ||
document.querySelectorAll('.platform-selector-tabset')[0].before(outer); | ||
} | ||
} | ||
|
||
documentReady(warnVersion); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,4 +41,6 @@ | |
</div> | ||
{% endfor %} | ||
</div> | ||
<!-- contributors --> | ||
{% include 'avatars.html' %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.