chore: repair scripts/setup and align local tooling with the uv workflow - #69
Merged
Conversation
scripts/setup still ran pip against a requirements.txt that no longer exists since the migration to uv, which also broke the devcontainer's postCreateCommand. It now runs uv sync with the dev and lint groups, and the devcontainer installs uv and drops the template's leftover name. The pre-commit hooks move to local uv run commands so they always use the exact ruff pinned in pyproject.toml instead of a drifting mirror rev, and a mypy hook now runs the same strict check as CI.
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.
Summary
Local developer tooling had drifted from the uv-based workflow the repo actually uses:
scripts/setupranpip install --requirement requirements.txt, a file that no longer exists — the script (and the devcontainer, which runs it aspostCreateCommand) has been broken since the migration to uv.pyproject.toml, so a local commit could format differently from CI, and no mypy hook existed.Changes
scripts/setupnow runsuv sync --group dev --group lint..pre-commit-config.yamlswitches to localuv runhooks (ruff format, ruff check --fix, mypy) so the hook always uses the exact versions pinned inpyproject.toml; the file-hygiene hooks stay. The stale comment pointing at a nonexistentlint.ymlworkflow now points atci.yml..devcontainer.jsoninstalls uv via a devcontainer feature and is renamed toroquerodrigo/ha-ttlock-ble.Verification
Full lint + mypy + test suite green (262 passed, coverage 100%).