Skip to content

implement channel specific epoch rejection #9315

implement channel specific epoch rejection

implement channel specific epoch rejection #9315

Workflow file for this run

name: autofix.ci
on: # yamllint disable-line rule:truthy
pull_request:
types: [opened, synchronize, labeled, unlabeled]
permissions:
contents: read
jobs:
autofix-changelog-headers:
name: Autofix and style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@v7.0.0
- run: pip install --upgrade towncrier pygithub gitpython numpy vulture
- run: python ./.github/actions/rename_towncrier/rename_towncrier.py
- run: python ./tools/dev/ensure_headers.py
- run: vulture
# Run this last, since it can fail the job if moved up
- uses: j178/prek-action@v3.0.0
- uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a
if: success() || failure()
changed-files:
name: Check for dependency-relevant changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
dependencies: ${{ steps.check.outputs.dependencies }}
steps:
- name: Check whether any dependency input or generated file changed
id: check
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
run: |
set -eo pipefail
# Also match the generated files themselves, so hand-edits get reverted
PATTERN='^(pyproject\.toml|README\.rst|environment\.yml|tools/pylock\.ci-old\.toml|\.github/workflows/autofix\.yml)$'
# Collect first: `grep -q` exits early, and the resulting SIGPIPE would
# trip `pipefail` precisely when a file does match
FILES=$(gh api --paginate "repos/${REPO}/pulls/${PR_NUMBER}/files" --jq '.[].filename')
if grep -qE "$PATTERN" <<< "$FILES"; then
echo "dependencies=true" | tee -a "$GITHUB_OUTPUT"
else
echo "dependencies=false" | tee -a "$GITHUB_OUTPUT"
fi
autofix-dependencies:
name: Autoupdate 'old' CI lockfile, README dependencies, and environment file
runs-on: ubuntu-latest
needs: changed-files
if: needs.changed-files.outputs.dependencies == 'true'
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v10.0.1
with:
version: ">=0.9"
activate-environment: true
enable-cache: false
python-version: "3.12"
- name: Update 'old' CI lockfile
# uv pip compile requires setting the python version for the environment explicitly in the command :(
run: |
uv pip compile pyproject.toml \
--python "3.11" --python-platform "x86_64-unknown-linux-gnu" \
--group test --group lockfile_extras \
--resolution lowest-direct \
--format pylock.toml --output-file tools/pylock.ci-old.toml \
--no-cache
- name: Validate 'old' CI lockfile
uses: mne-tools/mne-tools/actions/check-lockfile@main
with:
project-root: ${{ github.workspace }}
lockfile-path: tools/pylock.ci-old.toml
groups: lockfile_extras
- name: Sync dependencies to README
uses: mne-tools/mne-tools/actions/sync-dependencies-to-readme@main
with:
project-root: ${{ github.workspace }}
ignore-upper-pins: numpy
- name: Sync dependencies to environment file
uses: mne-tools/mne-tools/actions/sync-dependencies-to-environment-file@main
with:
project-root: ${{ github.workspace }}
extras: full,full-no-qt,hdf5
# manually specify extras groups to sync, as logic for recursion into other groups isn't implemented in the action yet (see mne-tools#40)
# e.g., `full` includes `mne[full-no-qt]`, but the action won't recognise this, so we need to specify `full-no-qt` explicitly
# ffmpeg is pinned to work around a conda solver issue (gh-14023)
additional-dependencies: pip,mamba,conda,nomkl,noqt5,ffmpeg==8.1.2
pip-dependencies: pymef
requirements-overrides: PySide6==6.11.1,vtk==9.6.2
- uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a
if: success() || failure()