Skip to content

Commit cacd961

Browse files
authored
ENH: Add release workflow and prep 0.3.1 (#100)
1 parent b0f1849 commit cacd961

File tree

6 files changed

+94
-28
lines changed

6 files changed

+94
-28
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
groups:
8+
actions:
9+
patterns:
10+
- "*"
11+
labels:
12+
- no-changelog-entry-needed
13+
cooldown:
14+
default-days: 7

.github/release.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot[bot]
5+
- pre-commit-ci[bot]

.github/workflows/main.yml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: Testing MNE-Features on Ubuntu 20.04
1+
name: Test MNE-Features
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
4+
cancel-in-progress: true
25
on:
36
push:
47
branches:
@@ -7,45 +10,39 @@ on:
710
branches:
811
- '*'
912

13+
permissions:
14+
contents: read
15+
1016
jobs:
1117
tests:
12-
runs-on: ubuntu-20.04
13-
env:
14-
PYTHON_VERSION: '3.8'
15-
CONDA_ENV: 'environment.yml'
18+
runs-on: ubuntu-latest
1619
strategy:
1720
matrix:
18-
python-version: [ "3.8" ]
21+
python-version: [ "3.13" ]
1922
numba: [ "on", "off" ]
23+
defaults:
24+
run:
25+
shell: bash -el {0}
2026
continue-on-error: true
2127
name: python-${{ matrix.python-version }}-numba-${{ matrix.numba }}
2228
steps:
2329
- uses: actions/checkout@v2
2430
- uses: conda-incubator/setup-miniconda@v2
2531
with:
2632
activate-environment: 'mne-features'
27-
python-version: ${{ env.PYTHON_VERSION }}
28-
environment-file: ${{ env.CONDA_ENV }}
33+
python-version: ${{ matrix.python-version }}
34+
environment-file: 'environment.yml'
2935
name: Install Miniconda and create environment
3036
- if: ${{ matrix.numba == 'off' }}
31-
shell: bash -el {0}
3237
run: pip uninstall --yes --quiet numba
3338
name: Uninstall numba
34-
- shell: bash -el {0}
35-
run: pip install --upgrade pytest pytest-cov flake8 check-manifest pytest-sugar
39+
- run: pip install --upgrade pytest pytest-cov flake8 check-manifest pytest-sugar
3640
name: Install test utilities
37-
- shell: bash -el {0}
38-
run: python setup.py develop --no-deps
39-
name: Install MNE-Features
40-
- shell: bash -el {0}
41-
run: |
42-
flake8 --count mne_features
43-
pytest --cov=mne_features --cov-report=xml --verbose mne_features/tests
44-
name: Run tests (with coverage)
45-
- shell: bash -el {0}
46-
run: check-manifest --ignore doc,mne_features/*/tests
47-
name: Check manifest
48-
- name: Upload coverage stats
49-
uses: codecov/codecov-action@v1
41+
- run: pip install --no-deps -ve .
42+
- run: flake8 --count mne_features
43+
- run: pytest --cov=mne_features --cov-report=xml --verbose mne_features/tests
44+
- run: check-manifest --ignore doc,mne_features/*/tests
45+
- uses: codecov/codecov-action@v5
5046
with:
51-
file: ./coverage.xml
47+
token: '1873840c-bd0f-4085-b7da-8b57b680d848'
48+
if: success() || failure()

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Upload a Python Package using Twine when a release is created
2+
3+
name: Build
4+
on: # yamllint disable-line rule:truthy
5+
release:
6+
types: [published]
7+
push:
8+
branches: ["master"]
9+
pull_request:
10+
branches: ["master"]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
package:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v5
20+
with:
21+
persist-credentials: false
22+
- uses: actions/setup-python@v6
23+
with:
24+
python-version: '3.13'
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install build twine
29+
- run: python -m build --sdist --wheel
30+
- run: twine check --strict dist/*
31+
- uses: actions/upload-artifact@v5
32+
with:
33+
name: dist
34+
path: dist
35+
36+
pypi-upload:
37+
needs: package
38+
runs-on: ubuntu-latest
39+
if: github.event_name == 'release'
40+
permissions:
41+
id-token: write # for trusted publishing
42+
environment:
43+
name: pypi
44+
url: https://pypi.org/p/mne-features
45+
steps:
46+
- uses: actions/download-artifact@v6
47+
with:
48+
name: dist
49+
path: dist
50+
- uses: pypa/gh-action-pypi-publish@release/v1
51+
if: github.event_name == 'release'

environment.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ dependencies:
1313
- scikit-learn
1414
- PyWavelets
1515
- tqdm
16-
- pip:
17-
- download
16+
- download

mne_features/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Dev branch marker is: 'X.Y.devN' where N is an integer.
1717
#
1818

19-
__version__ = '0.3'
19+
__version__ = '0.3.1'
2020

2121
from . import univariate, bivariate, feature_extraction
2222
from .univariate import get_univariate_funcs

0 commit comments

Comments
 (0)