-
Notifications
You must be signed in to change notification settings - Fork 2
Py314 #356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughRemoved the in-repo composite action for venv restore; revamped CI to use external prepare/restore actions and Python 3.14. Updated workflow cache version, Python matrices, venv pathing, and job steps. Adjusted tooling targets (pylint, mypy, ruff) to 3.14, updated pre-commit default Python handling, and added changelog entry. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions
participant Cache as Cache
participant Prep as plugwise/gh-actions<br/>prepare-python-and-code
participant Restore as plugwise/gh-actions<br/>restore-venv
participant Jobs as CI Jobs (ruff, pytest, mypy, coverage)
Dev->>GH: Push / PR
GH->>Prep: Prepare Python and code (compute cache key)
Prep-->>GH: Outputs python-version, cache-key
GH->>Restore: Restore venv using cache-key
alt Cache hit
Restore-->>GH: venv restored
else Cache miss
Restore-->>GH: venv created and populated
end
GH->>Jobs: Activate .venv-${python-minor}/bin/activate
Jobs-->>GH: Run checks/tests with unified venv
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #356 +/- ##
==========================================
- Coverage 82.13% 82.05% -0.09%
==========================================
Files 36 36
Lines 8171 8156 -15
==========================================
- Hits 6711 6692 -19
- Misses 1460 1464 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.pre-commit-config.yaml (1)
95-96: Fix typo in hook name (missing closing parenthesis)Cosmetic, but avoid needless diffs in future.
- name: "Setup (extended for testing" + name: "Setup (extended for testing)"
🧹 Nitpick comments (5)
.github/workflows/merge.yml (1)
7-8: OK on 3.14 defaults; minor robustness for package name checkPyPI normalizes underscores to hyphens. To avoid false negatives when checking releases, normalize PACKAGE_NAME before querying.
- PACKAGE_NAME=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['name'])") + PACKAGE_NAME=$(python -c "import toml, re; n=toml.load('pyproject.toml')['project']['name']; print(re.sub(r'[_\.]+','-',n).lower())").pre-commit-config.yaml (1)
38-41: Clean up leftover inline comment in codespell argsThe long “Previous list, remove before merge …” tail looks like a stale comment embedded in args.
- Move the historical list into a proper YAML comment on its own line(s), or drop it to keep args concise.
pyproject.toml (1)
14-17: Classifier update OK; consider adding generic Python 3 classifierOptional: add "Programming Language :: Python :: 3" alongside specific versions for completeness on PyPI.
"Operating System :: OS Independent", + "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.13",.github/workflows/verify.yml (2)
35-41: Remove unused HA pyproject fetch or include it in cache keyCurrently downloaded but not hashed; it has no effect.
Either remove the step:
- - name: Fetch HA pyproject - id: core-version - run: wget -O ha_pyproject.toml "https://raw.githubusercontent.com/home-assistant/core/refs/heads/dev/pyproject.toml"Or include it in the cache key:
- run: echo "cache-key=${{ runner.os }}-${{ env.CACHE_VERSION }}-${{ hashFiles('pyproject.toml', 'requirements_test.txt', '.pre-commit-config.yaml') }}" >> "$GITHUB_OUTPUT" + run: echo "cache-key=${{ runner.os }}-${{ env.CACHE_VERSION }}-${{ hashFiles('pyproject.toml', 'requirements_test.txt', '.pre-commit-config.yaml', 'ha_pyproject.toml') }}" >> "$GITHUB_OUTPUT"
195-202: Pin ShellCheck action to a version or commitUsing a floating
masterref is risky for CI stability and supply-chain.- - name: Run ShellCheck - uses: ludeeus/action-shellcheck@master + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@v2Pick the latest tagged release or a commit SHA.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/actions/restore-venv/action.yml(0 hunks).github/workflows/merge.yml(1 hunks).github/workflows/verify.yml(10 hunks).pre-commit-config.yaml(1 hunks)CHANGELOG.md(1 hunks)pyproject.toml(4 hunks)
💤 Files with no reviewable changes (1)
- .github/actions/restore-venv/action.yml
🔇 Additional comments (8)
.pre-commit-config.yaml (1)
3-3: Usingpython: defaultis fine; ensure CI sets desired defaultThis will use the runner’s default interpreter. Your CI prepares a pinned venv, so this is acceptable. No change required.
Please confirm local devs also run hooks under 3.14 (e.g., via pyenv global or pre-commit default-python).
CHANGELOG.md (1)
3-6: Changelog entry for Python 3.14 looks goodEntry is clear and placed correctly above latest release.
pyproject.toml (3)
60-61: Pylint py-version bump looks correctAligns with tool targeting for 3.14.
393-394: Mypy python_version bump looks correctConsistent with CI targets.
423-424: Ruff target-version py314 OKMatches other tool versions and CI.
.github/workflows/verify.yml (3)
145-153: Good: matrix uses exact minor for venv activationYou propagate the installed minor via
steps.python.outputs.python-versioninto the venv path, avoiding mismatches. LGTM.
254-301: TestPyPI publish flow mirrors PyPI; OKuv-based build/publish and pre-check on TestPyPI looks sound.
321-324: Complexity step relies onradonavailabilityAssuming the prepare action installed dev deps, this is fine. If not, add an explicit install.
Do we guarantee radon is in the cached venv? If not, add:
pip install radonin prepare or here before running it.

Summary by CodeRabbit
Chores
Tests
Documentation
These changes improve reliability and consistency of automation while ensuring compatibility with the latest Python version.