Skip to content

Commit 6518652

Browse files
authored
MAINT: Bump Python min to 3.10 (#102)
1 parent f6cce1e commit 6518652

6 files changed

Lines changed: 30 additions & 8 deletions

File tree

.github/workflows/main.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ jobs:
2020
matrix:
2121
python-version: [ "3.13" ]
2222
numba: [ "on", "off" ]
23+
include:
24+
- python-version: "3.12"
25+
numba: "on"
26+
- python-version: "3.11"
27+
numba: "on"
28+
- python-version: "3.10"
29+
numba: "on"
2330
defaults:
2431
run:
2532
shell: bash -el {0}
@@ -40,7 +47,7 @@ jobs:
4047
name: Install test utilities
4148
- run: pip install --no-deps -ve .
4249
- run: flake8 --count mne_features
43-
- run: pytest --cov=mne_features --cov-report=xml --verbose mne_features/tests
50+
- run: pytest --cov=mne_features --cov-report=xml --verbose -m "not slow" mne_features/tests
4451
- run: check-manifest --ignore doc,mne_features/*/tests
4552
- uses: codecov/codecov-action@v5
4653
with:

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: mne-features
22
channels:
33
- conda-forge
44
dependencies:
5-
- python>=3.8
5+
- python>=3.10
66
- mne
77
- pip
88
- numpy

mne_features/mock_numba.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ def identity(ob):
3939
return identity
4040

4141
nb.jit = jit
42+
HAS_NUMBA = False
43+
else:
44+
HAS_NUMBA = True

mne_features/tests/test_feature_extraction.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from mne_features.feature_extraction import (extract_features,
1818
FeatureFunctionTransformer,
1919
FeatureExtractor)
20-
from mne_features.mock_numba import nb
20+
from mne_features.mock_numba import nb, HAS_NUMBA
2121
from mne_features.univariate import compute_svd_fisher_info
2222
from mne_features.utils import _idxiter
2323

@@ -28,6 +28,11 @@
2828
n_epochs, n_channels = data.shape[:2]
2929

3030

31+
SLOW_KWARGS = {}
32+
if not HAS_NUMBA:
33+
SLOW_KWARGS['marks'] = pytest.mark.slow
34+
35+
3136
def test_shape_output():
3237
sel_funcs = ['mean', 'variance', 'kurtosis', 'pow_freq_bands']
3338
features = extract_features(data, sfreq, sel_funcs, n_jobs=1)
@@ -231,8 +236,11 @@ def test_channel_naming_pow_freq_bands(separator):
231236
assert df.columns.values.tolist() == expected_col_names
232237

233238

234-
@pytest.mark.parametrize('selected_func', ['max_cross_corr', 'phase_lock_val',
235-
'nonlin_interdep'])
239+
@pytest.mark.parametrize('selected_func', [
240+
pytest.param('max_cross_corr', **SLOW_KWARGS),
241+
'phase_lock_val',
242+
'nonlin_interdep',
243+
])
236244
@pytest.mark.parametrize('include_diag', [True, False])
237245
@pytest.mark.parametrize('separator', ['_', '__'])
238246
def test_channel_naming_bivariate(selected_func, include_diag, separator):

setup.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ ignore = E241,E121,E123,E126,E226,E24,E704,W503,W504
44

55
[tool:pytest]
66
addopts =
7-
--showlocals --durations=20 -ra --junit-xml=junit-results.xml
7+
--showlocals --durations=20 -rfEXs --junit-xml=junit-results.xml
88
--ignore=doc
9+
markers =
10+
slow: marks tests as slow (deselect with '-m "not slow"')

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
MAINTAINER_EMAIL = 'jean.baptiste.schiratti@gmail.com'
2222
LICENSE = 'BSD (3-clause)'
2323
DOWNLOAD_URL = 'https://github.com/mne-tools/mne-features.git'
24+
HOMEPAGE_URL = 'https://github.com/mne-tools/mne-features'
2425
VERSION = version
2526

2627

@@ -42,6 +43,7 @@ def package_tree(pkgroot):
4243
license=LICENSE,
4344
version=VERSION,
4445
download_url=DOWNLOAD_URL,
46+
home_page=HOMEPAGE_URL,
4547
long_description=open('README.rst').read(),
4648
long_description_content_type='text/x-rst',
4749
classifiers=['Intended Audience :: Science/Research',
@@ -57,13 +59,13 @@ def package_tree(pkgroot):
5759
'Programming Language :: Python :: 3',
5860
],
5961
platforms='any',
60-
python_requires='>=3.6',
62+
python_requires='>=3.10',
6163
packages=package_tree('mne_features'),
6264
install_requires=['numpy', 'scipy', 'numba', 'scikit-learn', 'mne',
6365
'PyWavelets', 'pandas'],
6466
project_urls={
6567
'Documentation': 'https://mne-tools.github.io/mne-features/',
6668
'Bug Reports': 'https://github.com/mne-tools/mne-features/issues',
6769
'Source': 'https://github.com/mne-tools/mne-features',
68-
},
70+
},
6971
)

0 commit comments

Comments
 (0)