Numpy2 compatibility #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Workflow to test against the latest nightly releases of development | |
# versions of Numpy 2.0 ahead of its upcoming release | |
name: Numpy2 compatibility | |
on: | |
push: | |
branches: [main] | |
schedule: | |
# Run every Monday at 8am UTC | |
- cron: 0 8 * * 1 | |
workflow_dispatch: | |
# Force to use color | |
env: | |
FORCE_COLOR: true | |
jobs: | |
test_numpy2: | |
if: github.repository == 'nilearn/nilearn' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout nilearn | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: install and run ruff checks for NPY NPY201 | |
# see https://numpy.org/devdocs/numpy_2_0_migration_guide.html#ruff-plugin | |
run: | | |
python -m pip install ruff>0.1.8 | |
ruff check --preview --select NPY201 . | |
- name: Install tox | |
run: python -m pip install tox | |
- name: Show tox config | |
run: tox c | |
- name: Run test suite | |
run: tox run -e test_numpy2 -- nilearn |