Skip to content

build: migrate dependency files to pyproject groups - #766

Open
tykeal wants to merge 1 commit into
FutureTense:mainfrom
tykeal:aislop-655-dependency-groups
Open

build: migrate dependency files to pyproject groups#766
tykeal wants to merge 1 commit into
FutureTense:mainfrom
tykeal:aislop-655-dependency-groups

Conversation

@tykeal

@tykeal tykeal commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrates Keymaster's Python dependency declarations from the three requirements_*.txt files into PEP 735 [dependency-groups] in pyproject.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 bare requirements.txt plus dependency metadata from pyproject.toml. It does not read requirements_dev.txt, requirements_lint.txt, or requirements_test.txt, and this project previously declared no dependencies in pyproject.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.ini now consumes the new test and lint dependency groups, and contributor setup instructions use dependency-group install commands.

The dev group includes the test and lint groups, matching the previous requirements_dev.txt include behavior. voluptuous and pyyaml are 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's yaml -> pyyaml mapping.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

@codecov-commenter

codecov-commenter commented Sep 4, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.01%. Comparing base (cdb4922) to head (beb35ec).
⚠️ Report is 307 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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     
Flag Coverage Δ
python 95.01% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This comment was marked as outdated.

@tykeal
tykeal force-pushed the aislop-655-dependency-groups branch from d30bccc to e8ea15c Compare September 4, 2026 18:34
@tykeal
tykeal requested a lite review from Copilot September 4, 2026 18:37

This comment was marked as outdated.

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>
@tykeal
tykeal force-pushed the aislop-655-dependency-groups branch from e8ea15c to beb35ec Compare September 4, 2026 21:05
@tykeal
tykeal requested a lite review from Copilot September 4, 2026 21:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread CONTRIBUTING.md

@firstof9 firstof9 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aislop: ai-slop/hallucinated-import across integration dependencies

4 participants