forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 0
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 egi_annots_from_stim
* upstream/main: (252 commits) Disable the "Back to top" button in the documentation (mne-tools#12688) DOC: match_channel_orders works on Epochs and Evoked, too (mne-tools#12699) Scale points and labels in montage plot (mne-tools#12703) Add license header to mne.stats.erp (mne-tools#12712) Update license year to 2024 (mne-tools#12713) Add standardized measurement error (SME) (mne-tools#12707) ENH: Parallel example execution in doc build (mne-tools#12708) MAINT: Update PR template (mne-tools#12692) MAINT: Fix doc build (mne-tools#12706) [pre-commit.ci] pre-commit autoupdate (mne-tools#12702) Improve documentation of ylim argument through Evoked plotting function (mne-tools#12697) [pre-commit.ci] pre-commit autoupdate (mne-tools#12696) BUG: Fix bug with CSP rank="full" (mne-tools#12694) MRG: Add epochs metadata summary to HTML representation (mne-tools#12686) Correct `Epochs.apply_function` docstring (mne-tools#12691) FIX: Gracefully handle missing datetime in Eyelink File (mne-tools#12687) MAINT: Restore SciPy pre (mne-tools#12689) Enh single channel annotation (mne-tools#12669) [pre-commit.ci] pre-commit autoupdate (mne-tools#12682) Bump autofix-ci/action from 1.2 to 1.3 in the actions group (mne-tools#12681) ...
- Loading branch information
Showing
607 changed files
with
17,916 additions
and
11,349 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -22,65 +22,13 @@ _check_skip: &check_skip | |
fi | ||
jobs: | ||
pytest-macos-arm64: | ||
parameters: | ||
scheduled: | ||
type: string | ||
default: "false" | ||
macos: | ||
xcode: "14.2.0" | ||
resource_class: macos.m1.medium.gen1 | ||
environment: | ||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
steps: | ||
- checkout | ||
- run: | ||
<<: *check_skip | ||
- run: | ||
name: Install Python and dependencies | ||
command: | | ||
set -eo pipefail | ||
brew install [email protected] | ||
which python | ||
which pip | ||
pip install --upgrade pip | ||
pip install --upgrade --only-binary "numpy,scipy,dipy,statsmodels" -ve .[full,test_extra] | ||
# 3D too slow on Apple's software renderer, and numba causes us problems | ||
pip uninstall -y vtk pyvista pyvistaqt numba | ||
mkdir -p test-results | ||
echo "set -eo pipefail" >> $BASH_ENV | ||
- run: | ||
command: mne sys_info | ||
- run: | ||
command: ./tools/get_testing_version.sh && cat testing_version.txt | ||
- restore_cache: | ||
keys: | ||
- data-cache-testing-{{ checksum "testing_version.txt" }} | ||
- run: | ||
command: python -c "import mne; mne.datasets.testing.data_path(verbose=True)" | ||
- save_cache: | ||
key: data-cache-testing-{{ checksum "testing_version.txt" }} | ||
paths: | ||
- ~/mne_data/MNE-testing-data # (2.5 G) | ||
- run: | ||
command: pytest -m "not slowtest" --tb=short --cov=mne --cov-report xml -vv mne | ||
- run: | ||
name: Prepare test data upload | ||
command: cp -av junit-results.xml test-results/junit.xml | ||
- store_test_results: | ||
path: ./test-results | ||
# Codecov orb has bugs on macOS (gpg issues) | ||
# - codecov/upload | ||
- run: | ||
command: bash <(curl -s https://codecov.io/bash) | ||
|
||
build_docs: | ||
parameters: | ||
scheduled: | ||
type: string | ||
default: "false" | ||
docker: | ||
- image: cimg/base:current-22.04 | ||
machine: | ||
image: ubuntu-2404:current | ||
# large 4 vCPUs 15GB mem | ||
# https://discuss.circleci.com/t/changes-to-remote-docker-reporting-pricing/47759 | ||
resource_class: large | ||
|
@@ -163,7 +111,7 @@ jobs: | |
# Load pip cache | ||
- restore_cache: | ||
keys: | ||
- pip-cache | ||
- pip-cache-0 | ||
- restore_cache: | ||
keys: | ||
- user-install-bin-cache-310 | ||
|
@@ -175,7 +123,7 @@ jobs: | |
./tools/circleci_dependencies.sh | ||
- save_cache: | ||
key: pip-cache | ||
key: pip-cache-0 | ||
paths: | ||
- ~/.cache/pip | ||
- save_cache: | ||
|
@@ -200,6 +148,7 @@ jobs: | |
which python | ||
QT_DEBUG_PLUGINS=1 mne sys_info -pd | ||
python -c "import numpy; numpy.show_config()" | ||
python -c "import dipy.align.metrics" | ||
LIBGL_DEBUG=verbose python -c "import pyvistaqt; pyvistaqt.BackgroundPlotter(show=True)" | ||
python -c "import mne; mne.set_config('MNE_USE_CUDA', 'false')" # this is needed for the config tutorial | ||
python -c "import mne; mne.set_config('MNE_LOGGING_LEVEL', 'info')" | ||
|
@@ -454,6 +403,7 @@ jobs: | |
default: "false" | ||
docker: | ||
- image: cimg/base:current-22.04 | ||
resource_class: large | ||
steps: | ||
- restore_cache: | ||
keys: | ||
|
@@ -472,7 +422,7 @@ jobs: | |
command: ./tools/circleci_bash_env.sh | ||
- restore_cache: | ||
keys: | ||
- pip-cache | ||
- pip-cache-0 | ||
- run: | ||
name: Get Python running | ||
command: | | ||
|
@@ -496,8 +446,8 @@ jobs: | |
|
||
|
||
deploy: | ||
machine: | ||
image: ubuntu-2004:202111-01 | ||
docker: | ||
- image: cimg/base:current-22.04 | ||
steps: | ||
- attach_workspace: | ||
at: /tmp/build | ||
|
@@ -591,20 +541,6 @@ workflows: | |
only: | ||
- main | ||
|
||
weekly: | ||
jobs: | ||
- pytest-macos-arm64: | ||
name: pytest_macos_arm64_weekly | ||
scheduled: "true" | ||
triggers: | ||
- schedule: | ||
# "At 6:00 AM GMT every Monday" | ||
cron: "0 6 * * 1" | ||
filters: | ||
branches: | ||
only: | ||
- main | ||
|
||
monthly: | ||
jobs: | ||
- linkcheck: | ||
|
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ | ||
ref-names: $Format:%D$ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Adapted from action-towncrier-changelog | ||
import json | ||
import os | ||
import re | ||
import subprocess | ||
import sys | ||
from pathlib import Path | ||
|
||
from github import Github | ||
from tomllib import loads | ||
|
||
event_name = os.getenv("GITHUB_EVENT_NAME", "pull_request") | ||
if not event_name.startswith("pull_request"): | ||
print(f"No-op for {event_name}") | ||
sys.exit(0) | ||
if "GITHUB_EVENT_PATH" in os.environ: | ||
with open(os.environ["GITHUB_EVENT_PATH"], encoding="utf-8") as fin: | ||
event = json.load(fin) | ||
pr_num = event["number"] | ||
basereponame = event["pull_request"]["base"]["repo"]["full_name"] | ||
real = True | ||
else: # local testing | ||
pr_num = 12318 # added some towncrier files | ||
basereponame = "mne-tools/mne-python" | ||
real = False | ||
|
||
g = Github(os.environ.get("GITHUB_TOKEN")) | ||
baserepo = g.get_repo(basereponame) | ||
|
||
# Grab config from upstream's default branch | ||
toml_cfg = loads(Path("pyproject.toml").read_text("utf-8")) | ||
|
||
config = toml_cfg["tool"]["towncrier"] | ||
pr = baserepo.get_pull(pr_num) | ||
modified_files = [f.filename for f in pr.get_files()] | ||
|
||
# Get types from config | ||
types = [ent["directory"] for ent in toml_cfg["tool"]["towncrier"]["type"]] | ||
type_pipe = "|".join(types) | ||
|
||
# Get files that potentially match the types | ||
directory = toml_cfg["tool"]["towncrier"]["directory"] | ||
assert directory.endswith("/"), directory | ||
|
||
file_re = re.compile(rf"^{directory}({type_pipe})\.rst$") | ||
found_stubs = [f for f in modified_files if file_re.match(f)] | ||
for stub in found_stubs: | ||
fro = stub | ||
to = file_re.sub(rf"{directory}{pr_num}.\1.rst", fro) | ||
print(f"Renaming {fro} to {to}") | ||
if real: | ||
subprocess.check_call(["mv", fro, to]) |
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,6 @@ | ||
changelog: | ||
exclude: | ||
authors: | ||
- dependabot | ||
- pre-commit-ci | ||
- github-actions |
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,21 @@ | ||
name: autofix.ci | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
types: [opened, synchronize, labeled, unlabeled] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
autofix: | ||
name: Autoupdate changelog entry | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- run: pip install --upgrade towncrier pygithub | ||
- run: python ./.github/actions/rename_towncrier/rename_towncrier.py | ||
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a |
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,16 @@ | ||
name: Changelog | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
types: [opened, synchronize, labeled, unlabeled] | ||
branches: ["main"] | ||
|
||
jobs: | ||
changelog_checker: | ||
name: Check towncrier entry in doc/changes/devel/ | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: scientific-python/action-towncrier-changelog@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BOT_USERNAME: changelog-bot |
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
Oops, something went wrong.