-
Notifications
You must be signed in to change notification settings - Fork 52
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
[MRG] Parallelize pytests where applicable #932
[MRG] Parallelize pytests where applicable #932
Conversation
Based on comparison to other recent test runs, this appears to shave about 3 minutes off of running the tests on the Macos and Linux github action runners. This especially helps speed up local testing. I will test making the same changes to Windows after I try installing it on a local Windows machine. |
shell: bash -el {0} | ||
run: | | ||
python -m pytest ./hnn_core/tests/ --cov=hnn_core --cov-report=xml | ||
python -m pytest ./hnn_core/tests/ -m "already_parallel" --cov=hnn_core --cov-report=xml --cov-append |
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.
maybe we should add this to the Makefile: https://github.com/jonescompneurolab/hnn-core/blob/master/Makefile
then you use the same command locally too. E.g.:
$ make already_parallel_tests
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.
and the make test
has a dependency on already_parallel_tests
and parallel_tests
like so:
tests : already_parallel parallel_tests
could you come up with slightly better names so the distinction between the two categories are clear?
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.
What about @pytest.mark.uses_mpi
? That way it is unique, easy to understand (and grep
), but also distinct from the other valid decorator @requires_mpi4py
.
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.
yes, I like that!
7c800e7
to
02e4391
Compare
Austin and I reviewed this together and it looks good and is ready to merge. |
No description provided.