Skip to content

Conversation

@CoMPaTech
Copy link
Member

@CoMPaTech CoMPaTech commented Jul 13, 2025

As requested by @bouwew

On purpose no bumping the release (which should be done to completely test/cycle this).

Changed code has been tested using another, unrelated, module. Given the creation of the environments (Github->Settings->Environments) and the TP on both testpypi and pypi it should pass.

Initial should become green, but not upload (since v1.7.7 already exists). Proofing the pudding will be in a minor version bump or an alpha or patch bump.

Summary by CodeRabbit

  • Chores
    • Updated publishing workflows to use the "uv" tool for building and publishing Python packages to PyPI and TestPyPI.
    • Added a check to prevent re-publishing existing package versions on PyPI and TestPyPI.
    • Updated changelog with an entry about the switch to Trusted Publishing and "uv".
    • Bumped project version to 1.7.8a1.

@CoMPaTech CoMPaTech requested a review from a team as a code owner July 13, 2025 16:57
@CoMPaTech CoMPaTech added the enhancement New feature or request label Jul 13, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 13, 2025

"""

Walkthrough

The GitHub Actions workflows for publishing and verifying Python package releases were updated to use the uv tool for environment management, building, and publishing instead of pypa/build and pypa/gh-action-pypi-publish. Conditional logic was added to avoid redundant uploads to TestPyPI, and changelog documentation was updated accordingly.

Changes

File(s) Change Summary
.github/workflows/merge.yml, .github/workflows/verify.yml Updated workflows to use uv for building/publishing, added conditional publishing logic, updated permissions, and removed pypa/gh-action-pypi-publish.
CHANGELOG.md Added an "Ongoing" section noting the switch to Trusted Publishing and uv for publishing.
pyproject.toml Bumped version from 1.7.7 to 1.7.8a1 to mark the new alpha release with updated publishing.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant uv Tool
    participant PyPI/TestPyPI

    GitHub Actions->>uv Tool: Install and seed virtual environment
    GitHub Actions->>uv Tool: Build package (uv build)
    alt On merge (PyPI)
        GitHub Actions->>uv Tool: Publish to PyPI (uv publish)
        uv Tool->>PyPI/TestPyPI: Upload package
    else On verify (TestPyPI)
        GitHub Actions->>TestPyPI: Check if version exists
        alt Version does not exist
            GitHub Actions->>uv Tool: Publish to TestPyPI (uv publish)
            uv Tool->>PyPI/TestPyPI: Upload package
        else Version exists
            GitHub Actions-->>GitHub Actions: Skip publish step
        end
    end
Loading

Possibly related PRs

  • Follow beta/core with uv #595: Integrates uv as a dependency and modifies workflows to use uv, similar to this PR's adoption of uv for building and publishing.

Suggested labels

dependencies

Suggested reviewers

  • bouwew

Poem

In the warren of workflows, a change hops through,
With uv in its paws and a mission anew.
No more old tools—just a streamlined delight,
Trusted Publishing shining so bright!
Changelog updated, the future is clear,
🐇 Packages hopping to PyPI—cheer!
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 179a4ee and 2193a38.

📒 Files selected for processing (2)
  • .github/workflows/merge.yml (1 hunks)
  • .github/workflows/verify.yml (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/merge.yml
  • .github/workflows/verify.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run pytest using Python 3.13
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tp

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov
Copy link

codecov bot commented Jul 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (fe99d21) to head (2193a38).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #770   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines         3382      3382           
=========================================
  Hits          3382      3382           

☔ 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
Contributor

@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: 2

🧹 Nitpick comments (3)
CHANGELOG.md (1)

3-6: Minor grammar & casing tweak improves changelog readability

- - Chores move module publishing on (test)pypi to Trusted Publishing (and using uv)
+ - Chore: move module publishing on (test)PyPI to Trusted Publishing (using uv)
.github/workflows/merge.yml (1)

35-45: Remove trailing whitespace & keep command section tidy

Lines 41 and 45 contain trailing spaces – causes YAML-lint failures.

-          uv build␠
+          uv build-          uv publish ␠
+          uv publish
.github/workflows/verify.yml (1)

251-286: Optional: fail fast on script errors & pin uv

Adding set -euo pipefail and pinning uv keeps the publishing step predictable.

-        run: |
-          pip install uv
+        run: |
+          set -euo pipefail
+          pip install "uv==0.1.43"   # keep CI deterministic
           uv venv --seed venv
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe99d21 and 5ecb326.

📒 Files selected for processing (3)
  • .github/workflows/merge.yml (2 hunks)
  • .github/workflows/verify.yml (2 hunks)
  • CHANGELOG.md (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
.github/workflows/verify.yml (1)
Learnt from: CoMPaTech
PR: plugwise/python-plugwise#656
File: .pre-commit-config.yaml:9-9
Timestamp: 2024-11-28T19:54:45.351Z
Learning: The project's dependencies and pre-commit hooks (e.g., ruff at v0.8.0, bandit at 1.8.0, pyupgrade at v3.19.0) are confirmed to be compatible with Python 3.13.
🪛 YAMLlint (1.37.1)
.github/workflows/merge.yml

[warning] 23-23: wrong indentation: expected 6 but found 8

(indentation)


[error] 41-41: trailing spaces

(trailing-spaces)


[error] 45-45: trailing spaces

(trailing-spaces)

.github/workflows/verify.yml

[warning] 242-242: wrong indentation: expected 6 but found 8

(indentation)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Process test coverage

@CoMPaTech CoMPaTech requested a review from bouwew July 13, 2025 17:30
Copy link
Contributor

@bouwew bouwew left a comment

Choose a reason for hiding this comment

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

LGTM!

@CoMPaTech
Copy link
Member Author

Succesfully deployed to https://test.pypi.org/project/plugwise/#history

@bouwew all honour to you to merge and publish :)

@sonarqubecloud
Copy link

@bouwew bouwew merged commit e8be5d9 into main Jul 14, 2025
17 checks passed
@bouwew bouwew deleted the tp branch July 14, 2025 13:22
@bouwew
Copy link
Contributor

bouwew commented Jul 14, 2025

@CoMPaTech 👍

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants