Skip to content
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

Update tests - parallele #1091

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

arnaudbore
Copy link
Contributor

@arnaudbore arnaudbore commented Dec 12, 2024

Quick description

Parallel tests
Closes #910
...

Type of change

Check the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

...

Checklist

  • My code follows the style guidelines of this project (run autopep8)
  • I added relevant citations to scripts, modules and functions docstrings and descriptions
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I moved all functions from the script file (except the argparser and main) to scilpy modules
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Collaborator

@AlexVCaron AlexVCaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments to make this even better, then LGTM !

@@ -56,7 +56,7 @@ jobs:
- name: Run tests
run: |
export C_INCLUDE_PATH=$pythonLocation/include/python${{ steps.python-selector.outputs.python-version }}:$C_INCLUDE_PATH
pytest --cov-report term-missing:skip-covered
pytest -n logical --cov-report term-missing:skip-covered
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to always activate pytest-xdist for all users when they run tests ? If yes, I would put that in addopts in the pytest.ini config file. Also, you would need to add pytest-xdist and pytest-xdist[psutil] to the required_plugins list.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this : --dist worksteal. it makes the test worker steal job from each other when they finnish early.

@@ -35,6 +35,7 @@ pybids==0.16.*
pyparsing==3.0.*
PySocks==1.7.*
pytest==7.2.*
pytest-xdist==3.6.*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pytest-xdist==3.6.*
pytest-xdist==3.6.*
pytest-xdist[psutil]==3.6.*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Speedup testing
2 participants