-
Notifications
You must be signed in to change notification settings - Fork 201
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-pre-commit to validate lockfile #6699
Changes from all commits
ee5c84b
6de1fd0
47e5cdd
ebb2038
7c2de7a
290818b
daa3fb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,9 @@ runs: | |
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Set up uv | ||
uses: astral-sh/[email protected].0 | ||
uses: astral-sh/[email protected].1 | ||
with: | ||
version: 0.5.x | ||
version: 0.5.22 | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install dependencies from uv lock | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,16 +38,13 @@ jobs: | |
python-version: '3.11' | ||
|
||
- name: Set up uv | ||
uses: astral-sh/[email protected].0 | ||
uses: astral-sh/[email protected].1 | ||
with: | ||
version: 0.5.x | ||
version: latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do we use here latest and not version 0.5.22 as in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please see: #6699 (comment) We're only using the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In the actions case, specifying the python version is needed because it has a side-effect of automatically activating the virtual environment. Again, this is not needed here we can keep things simple and not duplicate the python version information. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see thanks for the clarification |
||
|
||
- name: Install utils/ dependencies | ||
run: uv pip install --system -r utils/requirements.txt | ||
|
||
- name: Validate uv lockfile | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's better to have this check only in one place. |
||
run: uv lock --check | ||
|
||
- name: Validate conda environment file | ||
run: python ./utils/dependency_management.py validate-environment-yml | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -516,4 +516,8 @@ commands = molecule {posargs:test} | |
""" | ||
|
||
[tool.uv] | ||
required-version = ">=0.5.20" | ||
# NOTE: When you bump the minimum uv version, you also need to change it in: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks a lot @danielhollas Do we need to update also here? Is it possible to simplify this, somehow? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Good catch. In this case, I opted to simply always install the latest uv version, since we only use it to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I've created #6721 as a follow-up, since it is not immediately clear how to improve this, and I don't want to block this PR since it is a clear improvement over status quo. I do agree it's not ideal, but also don't see it as a huge deal. Let's discuss in #6721. |
||
# .pre-commit-config.yaml | ||
# .github/actions/install-aiida-core/action.yml | ||
# .readthedocs.yml | ||
required-version = ">=0.5.21" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I did not notice this till now: Why do we accept also version 0.5.21 but bump in the other places the version to 0.5.22? I noticed that the version had be increased for some fixes. Are these fixes already included in 0.5.21? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, all the fixes are in 0.5.21. We don't need to bump the minimum supported version unless really needed. |
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.
Unrelated change, this was throwing a warning in CI jobs.