-
Notifications
You must be signed in to change notification settings - Fork 24
Enables parallel pytest execution and micromamba CI #821
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
Conversation
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.
Pull request overview
This PR enables parallel pytest execution to speed up CI testing by adding the pytest-xdist plugin and configuring pytest to use automatic worker detection.
Changes:
- Adds
pytest-xdistas a testing dependency - Configures pytest to run with
-n autoflag for parallel execution in CI workflows
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| requirements.txt | Adds pytest-xdist to the testing dependencies |
| environment.yml | Adds conda-forge::pytest-xdist to the conda environment |
| .github/workflows/ci.yml | Adds -n auto flag to pytest commands for both unit and functional tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks @calvinp0 ! This is very important. |
JintaoWu98
left a comment
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.
LGTM, just one minor comment\question. Thanks!
23f36a7 to
1a5a3d1
Compare
Speeds up testing by enabling parallel execution of pytest using the `-n auto` flag. Adds `pytest-xdist` as a dependency for parallel testing. Removes the redundant conda environment caching from the `update-cache.yml` workflow, as environment caching is already managed in the CI workflow, and adds `CONDA_ALWAYS_YES` and `MAMBA_ALWAYS_YES` variables to automatically accept prompts. Also adds the `--strict-channel-priority` flag when creating or updating the conda environment to ensure channel priorities are respected.
Lilachn91
left a comment
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.
LGTM :)
204b6c8 to
bb3e966
Compare
…ian function in torchani.utils Since we unrestricted the installation of torchani, it would download the latest version as well as pythoin 3.13, thus breaking our tests: `AttributeError: module 'torchani.utils' has no attribute 'hessian'`
Speeds up testing by enabling parallel execution of unit and functional tests using the
pytest-xdistplugin.Adds
pytest-xdistas a dependency inenvironment.ymlandrequirements.txt.Adds the
-n autoflag to the pytest command in the CI workflow to automatically determine the number of workers.This pull request also introduces several improvements to the project's environment setup and CI workflows. The main changes involve switching to micromamba for environment management in CI, enforcing stricter channel priorities, and enhancing the test suite with parallelization support.
.github/workflows/ci.yml) to setMAMBA_ALWAYS_YESandCONDA_ALWAYS_YESenvironment variables, ensuring non-interactive installs for more reliable automation.devtools/install_rmg.shto use the--strict-channel-priorityflag, enforcing stricter dependency resolution for reproducible environments..github/workflows/update-cache.ymlfromsetup-minicondatosetup-micromamba, enabling faster, more reliable builds and leveraging built-in caching for environments and downloads.