Skip to content

build: lock dev dependencies with uv.lock - #578

Merged
tibuntu merged 1 commit into
mainfrom
build/uv-lock
Nov 21, 2026
Merged

tibuntu merged 1 commit into
mainfrom
build/uv-lock

Conversation

@tibuntu

@tibuntu tibuntu commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Locks the Python dev environment with a committed uv.lock, like homeassistant-wolf-smartset.

  • CI: uv sync --locked --extra dev instead of uv pip install -e ".[dev]", so every run installs the same 188 packages. The uv cache key uses the uv.lock hash. A pyproject.toml change without a matching uv lock now fails CI.
  • pyproject.toml: [tool.uv] environments = ["python_full_version >= '3.14.2'"]. Home Assistant 2026.10 needs 3.14.2, but requires-python stays at 3.13 for users of older Home Assistant releases. The marker has to be raised when a test-plugin bump raises Home Assistant's minimum Python.
  • Renovate: lock file maintenance is on globally (Sundays), so indirect dependencies move in one weekly PR. It's off for npm, because a package-lock.json refresh can change the committed panel bundle and Renovate can't rebuild it. A local Renovate extract confirms that pep621 now detects uv.lock.
  • Docs: docs/DEVELOPMENT.md setup and CLAUDE.md updated.

🤖 Generated with Claude Code

CI installed the pinned direct dev dependencies with uv pip install, but everything below them (all of Home Assistant via pytest-homeassistant-custom-component) floated, so an upstream release could break CI without a change here. Commit a uv.lock, install it with uv sync --locked, and key the uv cache on it.

[tool.uv] environments limits the lock to Python >= 3.14.2, the minimum of the pinned Home Assistant; requires-python stays at 3.13 for users of older releases.

Enable Renovate lock file maintenance (Sundays) so the transitive dependencies move in one weekly PR. It stays off for npm: refreshing frontend/package-lock.json can change the committed panel bundle, which Renovate cannot rebuild.
@tibuntu
tibuntu enabled auto-merge (rebase) November 21, 2026 18:09
@tibuntu
tibuntu merged commit d5f9dfb into main Nov 21, 2026
15 checks passed
@tibuntu
tibuntu deleted the build/uv-lock branch November 21, 2026 18:11
@codecov

codecov Bot commented Nov 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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