mne-features
mne-features copied to clipboard
Update Python dependencies and fix GitHub Actions workflow
- ubuntu-20.04 is obsolete and no longer supported. Since this repository does not strongly depend on a specific OS version, it is better to use ubuntu-latest to simplify maintenance.
- Update outdated actions:
- actions/checkout, conda-incubator/setup-miniconda, and codecov/codecov-action.
- Add Python 3.10 and 3.13 to the matrix strategy.
- Python 3.8 has already reached end of life, and some libraries no longer support it with their latest versions.
- The test suite should therefore include newer Python releases.
- Python 3.9 will also reach end of life at the end of October.
- Although Python 3.14 is the latest version, Numba does not yet support it (numba/numba#9957 ).
- Hence, Python 3.10 and 3.13 were added to the matrix.
- Remove
env.PYTHON_VERSIONand replace it withmatrix.python-versionfor consistency with the workflow matrix configuration.
All tests will pass once #97 and #98 are merged. Example test result is here: https://github.com/rcmdnk/mne-features/actions/runs/18524132632
Thank you @rcmdnk for this PR! The workflow file has not been updated in a long time.
In my opinion, we should support Python >= 3.12,<3.14:
- Python 3.10 will be deprecated in a year (~Oct. 2026)
- As you noted,
numbadoes not yet support Python 3.14.
Can you, please, update the workflow file to use 3.12 and 3.13?
@jbschiratti Thank you for the review.
The Python versions in the workflow have been updated to 3.12 and 3.13.
Regarding the Python version requirements, there are a few differences:
python>=3.8: specified in environment.yml for Condapython_requires='>=3.6': specified in setup.py for the package build (PyPI requirement)
It would be good to align and maintain these versions consistently at some point.
As for merging, it seems I don’t have the permission to merge this PR. Could you please merge it for me?
It may be necessary for all checks to pass before merging this PR. If that’s the case, I can create a combined PR including #97, #98, and this one (#99).
Would you prefer that I combine these commits into this PR, or open a new PR instead?
@hubertjb Thank you for the review.
Be careful, you're tagging someone else on this PR.
The Python versions in the workflow have been updated to 3.12 and 3.13.
I've thought about this and I think that it would make sense to align with what's done in mne-python or scikit-learn.
Therefore, I'd suggest:
requires_python=">=3.10,<3.14"insetup.pypython >=3.10,<3.14inenvironment.yamlpython-version: [ "3.10", "3.11", "3.12", "3.13" ]inmain.yml
I'm sorry for the wrong mention.
Regarding the Python version requirements, I think it’s safer not to set <3.14 for this project.
If we specify <3.14, we’ll need to make a new release as soon as Numba releases a version that supports Python 3.14.
In addition, Python 3.15 is expected to be released next year.
@rcmdnk I just made you a maintainer of the repo. Thanks for helping this project stay usable by the community 🙏
Thanks! This library is very useful, and I’ll try to keep it in good shape.
I've rebased this branch onto master (including #97, #98), and all tests are now green. For this PR, I’ve set the Python version requirement to >=3.8 to minimize the impact. If you’re okay with that, I’ll go ahead and merge the PR.
[!NOTE] The setup-miniconda action sometimes raises a CondaHTTPError. Such jobs usually succeed when retried. It seems the issue tends to occur more often at certain times of the day. Ref: https://github.com/conda-incubator/setup-miniconda/issues/129
To mitigate this, I’ve increased the number of retries and the timeout in the Conda configuration. However, some jobs may still fail occasionally. If that happens, simply re-run the failed jobs and they should pass.
@rcmdnk Thank you very much for updating the repository.
One remark: I'm not sure that we need python >= 3.8 as Python 3.8 has reached end-of-life on October 2024.
If some people are still using Python 3.8, they probably should upgrade to Python 3.10 (or even Python 3.12).
I'd suggest to set python >= 3.10,<3.14. When numba is stable on Python 3.14, we'll allow 3.14 as well.
@jbschiratti
Sorry, some previous commit hashes were changed when I rebased histories.
I've not changed examples/plot_feature_names_analysis.py in this PR.
The history was fixed and this PR changes only .github/fowkflows/main.yml, setup.py, and enviroment.yml.
As you mentioned above, I've updated python version as >=3.10,<3.14 in these files.
#100 includes these ubuntu/python updates. Therefore, I close this PR.