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

CI: How to manage uv version #6721

Open
danielhollas opened this issue Jan 22, 2025 · 1 comment
Open

CI: How to manage uv version #6721

danielhollas opened this issue Jan 22, 2025 · 1 comment

Comments

@danielhollas
Copy link
Collaborator

Is it possible to simplify this, somehow?
Right now, we need to update uv version manually in ~4 places.
Maybe one idea could be to have a hook on pre-commit to read the required version from pyproject.toml and if that doesn't match with other places (action.yml, .readthedocs.yml, etc), would automatically update them.

Originally posted by @khsrali in #6699 (comment)

@danielhollas
Copy link
Collaborator Author

After #6699 is merged, we'll have 4 places to maintain uv version

  • pyproject.toml - this one enforces a minimum uv version to ensure the consistency of the lockfile
  • .pre-commit-config.yaml - specifies uv version that is used to check the lockfile is up-to-date
  • .github/actions/install-aiida-core/action.yml - used to install aiida-core dependencies for most of the CI jobs
  • .readthedocs.yml for doc build

It's not clear how to reduce this number. I think ultimately, as uv matures and stabilizes (especially its lockfile implementation) we can simply always install the latest version in CI. This is what many others are doing.

I don't think it's worth it to somehow automate this. Updating version in four places is for sure annoying, but at the same time, if one forgets, there is a very clear error. If we bump minimum version in pyproject.toml, but forget to update it in docs build, it will fail with an error stating that the uv version is not satisfied.

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

No branches or pull requests

1 participant