You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I call a uv run, I get the uv.lock updated and kept in sync automatically. I would like to have a way to tell uv to not change the uv.lock file at all.
The problem is that while uv run sphinx-apidoc is doing its job producing auto-generated documentation, that way of invoking it is also updating the uv.lock file at the base of the checked-out repository.
And because my last step of the workflow is creating a PR with all local changes, I end up with a noisy PR that not only contain the changes from sphinx-apidoc, but also unexpected updates in uv.lock file.
- name: Reset uv.lock# Exclude `uv.lock` file which might be auto-updated by calls to `uv run`.run: | git checkout -- uv.lock
And that's how I end up with a clean PR with only the changes produced by sphinx-apidoc.
Now I just wonder if it might be a good idea to add a new option to uv, to let it restrain itself and keep uv.lock as it found it. Something like uv run --no-lock-update.
Discussion
If keeping the uv.lock in sync is good for everyday run, the reason I do not need that behavior in automated workflows is because I already have another dedicated job to keep it in sync.
The text was updated successfully, but these errors were encountered:
kdeldycke
added a commit
to kdeldycke/workflows
that referenced
this issue
Jul 18, 2024
Using the latest
uv
:Description
When I call a
uv run
, I get theuv.lock
updated and kept in sync automatically. I would like to have a way to telluv
to not change theuv.lock
file at all.Context
I am maintaining several Python-based CLI. To keep their Sphinx-based documentation up-to-date, I rely on a reusable GitHub workflow that calls
uv run sphinx-apidoc
.The problem is that while
uv run sphinx-apidoc
is doing its job producing auto-generated documentation, that way of invoking it is also updating theuv.lock
file at the base of the checked-out repository.And because my last step of the workflow is creating a PR with all local changes, I end up with a noisy PR that not only contain the changes from
sphinx-apidoc
, but also unexpected updates inuv.lock
file.My quick fix was to add an extra step to force its exclusion:
And that's how I end up with a clean PR with only the changes produced by
sphinx-apidoc
.Now I just wonder if it might be a good idea to add a new option to
uv
, to let it restrain itself and keepuv.lock
as it found it. Something likeuv run --no-lock-update
.Discussion
If keeping the
uv.lock
in sync is good for everyday run, the reason I do not need that behavior in automated workflows is because I already have another dedicated job to keep it in sync.The text was updated successfully, but these errors were encountered: