-
Notifications
You must be signed in to change notification settings - Fork 277
[MAINT] run tests on parallel threads #1455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Remi-Gau
wants to merge
23
commits into
nipy:master
Choose a base branch
from
Remi-Gau:free_threaded
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+227
−1
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
c253274
[MAINT] run tests on parallel threads
Remi-Gau cd57743
run all
Remi-Gau 4c0d328
all but minc
Remi-Gau 6f6fef6
all but minc
Remi-Gau 3d16f2b
n auto
Remi-Gau 77422f1
tweak options
Remi-Gau 572c315
not in parallel
Remi-Gau 16bfb77
mark tests as unsafe
Remi-Gau f73f577
revert
Remi-Gau 5bcb4ca
mark unsafe
Remi-Gau 529a2c2
sty
Remi-Gau 39bc70a
unsafe
Remi-Gau 7ba8507
unsafe
Remi-Gau 67cfd04
unsafe
Remi-Gau bf65a34
unsafe
Remi-Gau eddc785
import
Remi-Gau 83e86dd
unsafe
Remi-Gau 6acaff7
skip when no gil
Remi-Gau efccdb6
fix
Remi-Gau a095bc0
more tests
Remi-Gau 6695eb2
Update nibabel/tests/test_removalschedule.py
Remi-Gau cd47a09
Merge branch 'master' into free_threaded
Remi-Gau 24f1c86
mark unsafe
Remi-Gau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| --- | ||
| # Runs tests suite with free threaded python. | ||
| # | ||
| ### | ||
| name: test free threaded python | ||
|
|
||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
| push: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| FORCE_COLOR: true | ||
|
|
||
| jobs: | ||
|
|
||
| free_threaded: | ||
| name: 'Test with ${{ matrix.py }} on ${{ matrix.os }}' | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| py: [3.14t] | ||
| os: [macos-latest, ubuntu-latest] | ||
| env: [free_threaded] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Install the latest version of uv | ||
| uses: astral-sh/setup-uv@v7 | ||
|
|
||
| - name: Setup python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ matrix.py }} | ||
| allow-prereleases: true | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| uv venv -p 3.14t | ||
| source .venv/bin/activate | ||
| uv pip install -e '.[test,dicomfs,dicom,viewers,indexed_gzip,spm,zstd]' | ||
| uv pip install pytest-run-parallel | ||
|
|
||
| - name: Run test suite | ||
| # run on several threads | ||
| # this may take a bit longer with fewer threads | ||
| # but as some tests can be flaky, | ||
| # they will more systematically fail with more threads | ||
| id: test_free_threaded | ||
| run: | | ||
| source .venv/bin/activate | ||
| PYTEST_RUN_PARALLEL_VERBOSE=1 | ||
| N_THREADS=16 | ||
| pytest -ra --strict-config --strict-markers --showlocals --capture=no --parallel-threads $N_THREADS nibabel |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with this, but it would be good to figure out why they are being generated in the CWD and fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
want me to do this in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struggling to actually "regenerate" those files: not sure which tests are supposed to fail to get them