-
Notifications
You must be signed in to change notification settings - Fork 15
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
CI: Use uv for installing deps #752
Conversation
- Use FORCE_COLOR to get colored logs in Github UI - Update actions - Don't collect code coverage from tests/ folders
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #752 +/- ##
===========================================
- Coverage 80.73% 68.28% -12.45%
===========================================
Files 49 45 -4
Lines 3415 4143 +728
===========================================
+ Hits 2757 2829 +72
- Misses 658 1314 +656
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Thanks @danielhollas for the work. I don't understand some of the changes, could you address my comments?
|
||
- name: Run pytest | ||
run: pytest -v tests --cov | ||
run: pytest -v tests --cov=aiidalab_qe |
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.
Why add aiidalab_qe
?
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.
Citing from pytest --help
--cov=[SOURCE] Path or package name to measure during execution.
Use --cov= to not do any source filtering and record everything.
Without specifying the package there are two problems:
- (minor) Coverage of
tests/
folder is collected, which skews the overall coverage percentage. - If you don't specify the package, some files from the
aiidalab_qe
package might be omitted from the statistics.
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.
Note that aiida-core
uses the same approach.
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.
Here's how things look in Codecov without this change:
commands: | ||
- asdf plugin add uv | ||
- asdf install uv 0.2.13 | ||
- asdf global uv 0.2.13 | ||
- uv venv | ||
- uv pip install -r docs/requirements.txt | ||
- .venv/bin/python -m sphinx -W --keep-going -d _build/doctrees -D language=en -b html docs/source $READTHEDOCS_OUTPUT/html |
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.
Are there big benefits to this change? Otherwise it's better to use the one from the official readthedocs docs.
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.
It speeds up the build from ~30s to 5s. The configuration suggested here actually comes from the official docs https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv
But it would be fine to revert this change if you don't like it.
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.
Thanks @danielhollas for the detailed explanation! Nice work!
Use
uv
installer to speed up installing dependencies for tests + some other CI tweaks brought over from AWB: