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

Use uv to install dependencies in CI #419

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

danielhollas
Copy link
Contributor

@danielhollas danielhollas commented Mar 12, 2024

uv is the new cool kid in the town of Python packaging, from the creators of ruff. It currently serves as a much faster drop-in replacement for pip.

For the aiidalab package, this drops installation time from ~15s to ~2s, which nearly halves the workflow time since the tests we have here are pretty quick.

Couple other small changes (feel free to push back)

  • Remove pre-commit section from CI since we use the pre-commit.ci anyway.
  • Don't run tests on both push and pull_request event, this leads to duplication for pull requests coming from origin.
  • remove bumpver and pre-commit from direct dev dependencies, as proposed on Discourse
  • get rid of incidental pyyaml dependency, see comment below

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.12%. Comparing base (bfca750) to head (bff28e2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #419      +/-   ##
==========================================
+ Coverage   60.09%   60.12%   +0.02%     
==========================================
  Files          23       23              
  Lines        1466     1467       +1     
==========================================
+ Hits          881      882       +1     
  Misses        585      585              
Flag Coverage Δ
py-3.10 60.12% <100.00%> (+0.02%) ⬆️
py-3.11 60.12% <100.00%> (+0.02%) ⬆️
py-3.8 60.12% <100.00%> (+0.02%) ⬆️
py-3.9 60.12% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

setup.cfg Show resolved Hide resolved
@@ -1,7 +1,7 @@
from pathlib import Path

import pytest
import yaml
from ruamel.yaml import YAML
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We've been depending on pyyaml for tests by accident, and did not notice since it got installed together with pre-commit. Let's use ruamel since that's what is used in the aiidalab package.

@danielhollas danielhollas changed the title Use uv to install dependencies Use uv to install dependencies in CI Mar 13, 2024
Copy link
Contributor Author

@danielhollas danielhollas left a comment

Choose a reason for hiding this comment

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

@superstar54 could you take a look? This might be beneficial for QeApp as well.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
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.

None yet

2 participants