Skip to content

Conversation

@CoMPaTech
Copy link
Member

@CoMPaTech CoMPaTech commented Oct 8, 2025

Summary by CodeRabbit

  • Chores

    • Streamlined CI with unified environment preparation and caching.
    • Updated default Python to 3.14 and bumped cache version.
    • Removed legacy virtual environment restore action.
  • Tests

    • Expanded test matrix to include Python 3.14.
    • Standardized virtual environment paths across jobs for consistency.
  • Documentation

    • Added changelog entry noting ongoing validation for Python 3.14.

These changes improve reliability and consistency of automation while ensuring compatibility with the latest Python version.

@CoMPaTech CoMPaTech requested a review from a team as a code owner October 8, 2025 08:06
@coderabbitai
Copy link

coderabbitai bot commented Oct 8, 2025

Walkthrough

Removed 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

Cohort / File(s) Summary
Composite action removal
.github/actions/restore-venv/action.yml
Deleted the composite action that restored/created venv and pre-commit cache with conditional failure logic.
Workflow updates
.github/workflows/merge.yml, .github/workflows/verify.yml
Increased CACHE_VERSION to 22; default Python to 3.14; reworked CI to use external prepare/restore actions, streamlined cache keys, unified venv paths with minor-version suffixes, updated matrices and steps across jobs.
Tooling version targets
pyproject.toml, .pre-commit-config.yaml
Set pylint/mypy/ruff targets to Python 3.14; added Python 3.14 classifier; switched pre-commit default language version from explicit python3.13 to default.
Documentation
CHANGELOG.md
Added “Ongoing” entry noting Python 3.14 testing/validation.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

github-actions, dependencies

Suggested reviewers

  • bouwew
  • dirixmjm

Poem

Hop-hop, I cache and I go,
New venv paths in a tidy row.
Thump-thump, 3.14 in sight,
Tools aligned, workflows light.
Carrot commits, green checks glow—
Burrow built, onward we flow! 🥕✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The title “Py314” does indicate a relation to Python 3.14 but is overly terse and does not clearly describe that the pull request adds support for or bumps the project and CI to Python 3.14, making it difficult for someone scanning the history to understand the primary change. Please update the title to clearly reflect the main change, for example “Add support for Python 3.14” or “Bump project and CI to Python 3.14,” so that reviewers immediately grasp the intent of the pull request.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch py314

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 8, 2025

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@codecov
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.05%. Comparing base (8acfcfa) to head (6e30c42).

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.
📢 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.

Copy link

@coderabbitai coderabbitai bot left a 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 check

PyPI 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 args

The 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 classifier

Optional: 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 key

Currently 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 commit

Using a floating master ref is risky for CI stability and supply-chain.

-      - name: Run ShellCheck
-        uses: ludeeus/action-shellcheck@master
+      - name: Run ShellCheck
+        uses: ludeeus/action-shellcheck@v2

Pick the latest tagged release or a commit SHA.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8acfcfa and 6e30c42.

📒 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: Using python: default is fine; ensure CI sets desired default

This 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 good

Entry is clear and placed correctly above latest release.

pyproject.toml (3)

60-61: Pylint py-version bump looks correct

Aligns with tool targeting for 3.14.


393-394: Mypy python_version bump looks correct

Consistent with CI targets.


423-424: Ruff target-version py314 OK

Matches other tool versions and CI.

.github/workflows/verify.yml (3)

145-153: Good: matrix uses exact minor for venv activation

You propagate the installed minor via steps.python.outputs.python-version into the venv path, avoiding mismatches. LGTM.


254-301: TestPyPI publish flow mirrors PyPI; OK

uv-based build/publish and pre-check on TestPyPI looks sound.


321-324: Complexity step relies on radon availability

Assuming 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 radon in prepare or here before running it.

@CoMPaTech CoMPaTech merged commit cdee5c2 into main Oct 8, 2025
29 of 30 checks passed
@CoMPaTech CoMPaTech deleted the py314 branch October 8, 2025 08:15
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.

2 participants