build: migrate dependency files to pyproject groups - #766
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #766 +/- ##
===========================================
+ Coverage 84.14% 95.01% +10.87%
===========================================
Files 10 35 +25
Lines 801 5597 +4796
===========================================
+ Hits 674 5318 +4644
- Misses 127 279 +152
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d30bccc to
e8ea15c
Compare
Move the test, lint, and dev dependency declarations into PEP 735 dependency groups so tooling reads the same dependency graph from pyproject.toml. The dev group includes the test and lint groups, preserving the previous requirements_dev.txt include behavior. This fixes aislop false positives where ai-slop/hallucinated-import saw an empty dependency set because aislop only reads bare requirements.txt and pyproject dependency metadata, not requirements_*.txt. Add direct voluptuous and pyyaml declarations because the code imports them directly even though Home Assistant previously satisfied them transitively. Closes FutureTense#655 Assisted-by: GitHub Copilot CLI 1.0.82 (Claude Opus 5, model claude-opus-5) Signed-off-by: Andrew Grimberg <tykeal@bardicgrove.org>
e8ea15c to
beb35ec
Compare
There was a problem hiding this comment.
🟡 Changes recommended
CONTRIBUTING.md now depends on pip install --group, but it doesn’t note the minimum pip version needed for that flag, which can cause setup failures for contributors on older pip.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Lite
Summary
Migrates Keymaster's Python dependency declarations from the three
requirements_*.txtfiles into PEP 735[dependency-groups]inpyproject.toml.Closes #655.
The root cause for the aislop findings is that aislop enables Python import checking because this repository has
pyproject.toml, but it only reads barerequirements.txtplus dependency metadata frompyproject.toml. It does not readrequirements_dev.txt,requirements_lint.txt, orrequirements_test.txt, and this project previously declared no dependencies inpyproject.toml, so aislop built an empty dependency set and reported every non-stdlib import as hallucinated.Proposed change
This is a migration rather than a duplication: the old requirements files are removed,
tox.ininow consumes the newtestandlintdependency groups, and contributor setup instructions use dependency-group install commands.The
devgroup includes thetestandlintgroups, matching the previousrequirements_dev.txtinclude behavior.voluptuousandpyyamlare added deliberately because the code imports them directly; they were previously satisfied transitively through Home Assistant, but explicit declarations are needed for correct dependency metadata and for aislop'syaml->pyyamlmapping.Type of change
Additional information