Ignore uv.lock - #108
Merged
Merged
Ignore uv.lock#108
Conversation
uv writes it whenever `uv run` is used in the project directory, which is how tests get run against a pinned interpreter. So it appears unbidden, and it sat untracked and unignored: one `git add -A` from being committed, which happened once already. Nothing reads it. Dependencies are declared as ranges, and CI installs the floor and the latest explicitly, so a single locked resolution sits between the two ends that are actually tested and would rot unnoticed. Consumers get the ranges from pyproject.toml, since only uv reads a uv.lock.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
uv runlocks the project directory before it runs anything, so the pinned-interpreter test command writes auv.lockas a side effect. The file then sat untracked and unignored, onegit add -Aaway from being committed. That happened once already, in the first commit on #98, and had to be amended out.Nothing in the repo reads it. There is no
[tool.uv]inpyproject.toml, and no reference to it in CI or the docs. The dependency strategy argues against keeping one:pyproject.tomlcbor2>=5.6,pyOpenSSL>=23.1cbor2==5.6.0,pyOpenSSL==23.1.0,pytest==8.0.0pip install -e ".[dev]"uv.lockTesting the two ends of the supported range is the point of those two jobs. A lockfile pins a point between them that no job installs, so it would drift with nobody watching. It also holds
pytestandsmartthings-localitself, so what it locks is a dev environment. Consumers get the ranges frompyproject.toml, since only uv reads auv.lock.The ignore rule carries that reasoning as a comment, so the next person who wonders why it is ignored can read the answer there.