Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
actions:
patterns:
- "*"
6 changes: 6 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
changelog:
exclude:
authors:
- dependabot
- pre-commit-ci
- github-actions
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Upload a Python Package using Twine when a release is created

name: Build
on: # yamllint disable-line rule:truthy
release:
types: [published]
push:
branches: ["main", "maint/*"]
pull_request:
branches: ["main", "maint/*"]

permissions:
contents: read

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- run: python -m build --sdist --wheel
- run: twine check --strict dist/*
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist

pypi-upload:
needs: package
runs-on: ubuntu-latest
if: github.event_name == 'release'
permissions:
id-token: write # for trusted publishing
environment:
name: pypi
url: https://pypi.org/p/mne
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release'
19 changes: 19 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,26 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: pip install --upgrade pip setuptools
# TODO: shouldn't need to install NumPy first or pin it (distutils gone in 2.0), bad build reqs
- run: pip install --upgrade "numpy<2" s3cmd mne scikit-learn nose pytest pytest-cov "mne<0.24" nibabel
# TODO: Relax this pin
# TODO: Remove nose dependency
- run: pip install --no-build-isolation -ve .
- run: openssl aes-256-cbc -K "${{ secrets.encrypted_73bd2a498087_key }}" -iv "${{ secrets.encrypted_73bd2a498087_iv }}" -in .s3cfg.enc -out ~/.s3cfg -d
- run: python -c "from pathlib import Path; assert (Path('~').expanduser() / '.s3cfg').is_file()"
- run: mkdir ~/mne-hcp-data
- run: s3cmd get s3://mne-hcp-testing-data/mne-hcp-testing.tar.gz ~/mne-hcp-data/
- run: cd ~/mne-hcp-data/ && tar -xvzf mne-hcp-testing.tar.gz
- run: find ~/mne-hcp-data/mne-hcp-testing/105923 -name "*" > output.txt && cat output.txt | wc -l && head output.txt
- run: mkdir -p "${{ env.SUBJECTS_DIR}}" && python -c "import mne; mne.datasets.fetch_fsaverage(subjects_dir='${{ env.SUBJECTS_DIR }}')"
# TODO: Move this to the top (toward bottom to speed up testing of steps above)
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- run: pytest -rfEXs --cov-report= --tb=short --durations 30 -v --cov=hcp --cov-report xml hcp
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: success()