Skip to content

Ignore uv.lock - #108

Merged
QuiteYellow merged 1 commit into
mainfrom
chore/ignore-uv-lock
Sep 20, 2026
Merged

QuiteYellow merged 1 commit into
mainfrom
chore/ignore-uv-lock

Conversation

@QuiteYellow

Copy link
Copy Markdown
Owner

uv run locks the project directory before it runs anything, so the pinned-interpreter test command writes a uv.lock as a side effect. The file then sat untracked and unignored, one git add -A away 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] in pyproject.toml, and no reference to it in CI or the docs. The dependency strategy argues against keeping one:

what it pins
pyproject.toml ranges: cbor2>=5.6, pyOpenSSL>=23.1
CI floor job exact minimums: cbor2==5.6.0, pyOpenSSL==23.1.0, pytest==8.0.0
CI latest job unpinned, pip install -e ".[dev]"
a committed uv.lock one resolution between those two, installed by nothing

Testing 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 pytest and smartthings-local itself, so what it locks is a dev environment. Consumers get the ranges from pyproject.toml, since only uv reads a uv.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.

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.
@QuiteYellow
QuiteYellow merged commit 186dd49 into main Sep 20, 2026
8 checks passed
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.

1 participant