Skip to content

Conversation

amotl
Copy link
Contributor

@amotl amotl commented Jul 26, 2025

What the title says.

Copy link

coderabbitai bot commented Jul 26, 2025

Caution

Review failed

The pull request is closed.

Summary by CodeRabbit

  • New Features

    • Introduced automated workflow for building and publishing Python packages to PyPI, supporting releases on tag pushes, pull requests, scheduled runs, and manual triggers.
  • Chores

    • Updated workflow name for GitHub Actions release process for improved clarity.

Walkthrough

The changes include renaming an existing GitHub Actions workflow for clarity and introducing a new workflow dedicated to building and publishing Python packages to PyPI. The new workflow is triggered by various events and automates the build and publish process using trusted publishing.

Changes

File(s) Change Summary
.github/workflows/release-github.yml Renamed workflow from "Release" to "Release: GitHub".
.github/workflows/release-pypi.yml Added new workflow to automate building and publishing Python packages to PyPI.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~6 minutes

Possibly related PRs

  • CI: Add PyPI release workflow #227: Introduces the same GitHub Actions workflows for releasing to GitHub and PyPI, including identical changes to .github/workflows/release-github.yml and addition of .github/workflows/release-pypi.yml.

Poem

A bunny hops with nimble feet,
New workflows make the build complete!
To PyPI we now deploy,
Release names bring extra joy.
With YAML neat and actions bright,
The code is shipped just right.
🐇✨


📜 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 ad95187 and ce8a819.

📒 Files selected for processing (1)
  • .github/workflows/release-pypi.yml (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release-pypi-ng

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

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

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

🧹 Nitpick comments (2)
.github/workflows/release-pypi.yml (2)

55-58: Pin build tooling for reproducibility
uv pip install build installs the latest build every run, which can introduce breaking changes. Pin to a known good version (e.g., build==1.2.1) or cache the wheel to keep builds deterministic.

-          uv pip install build
+          uv pip install build==1.2.1

60-61: Safer condition for tag publishing
github.event.ref does not exist on pull_request or schedule events. Use github.ref and guard by event name to avoid evaluation issues:

-        if: startsWith(github.event.ref, 'refs/tags')
+        if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7898bdd and ad95187.

📒 Files selected for processing (2)
  • .github/workflows/release-github.yml (1 hunks)
  • .github/workflows/release-pypi.yml (1 hunks)
🔇 Additional comments (3)
.github/workflows/release-github.yml (1)

1-1: Ensure concurrency group continuity after renaming the workflow

The concurrency block in .github/workflows/release-github.yml is defined as:

concurrency:
  cancel-in-progress: true
  group: ${{ github.workflow }}-${{ github.ref }}

By renaming the workflow from "Release" to "Release: GitHub", the group key will change from
Release-${{ github.ref }}Release: GitHub-${{ github.ref }}. In-flight runs started under the old key will no longer be cancelled by new runs.

Please verify whether you rely on that cancellation behavior. If you do, consider:

  • Pinning group: to a constant (for example, release-${{ github.ref }})
  • Extracting only the desired part of github.workflow via ${{ github.workflow == 'Release: GitHub' && 'Release' }} or similar
  • Running a quick test to confirm that in-progress jobs cancel as expected after this rename
.github/workflows/release-pypi.yml (2)

35-41: Ensure the pypi environment is configured for Trusted Publishing
The job assumes an environment named pypi with “OpenID-Connect” enabled and the project registered on PyPI for trusted-publisher auth. Without that, the publish step will 403. Verify the environment exists and OIDC is authorised.


28-29: No changes needed — Python 3.13 is stable and supported
GitHub’s ubuntu-latest runners and actions/setup-python@v5 have included Python 3.13 since its October 2023 release. You can safely keep:

        python-version: ["3.13"]

Likely an incorrect or invalid review comment.

Comment on lines 30 to 34
env:
OS_TYPE: ${{ matrix.os }}
PYTHON_VERSION: ${{ matrix.python-version }}
UV_SYSTEM_PYTHON: true

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Environment variable needs a string, not a boolean
UV_SYSTEM_PYTHON is parsed as a string. Passing a bare true serialises to "true" in YAML 1.2, but some tooling treats it as boolean and emits True/False. Make it explicit to avoid surprises:

-      UV_SYSTEM_PYTHON: true
+      UV_SYSTEM_PYTHON: "1"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
env:
OS_TYPE: ${{ matrix.os }}
PYTHON_VERSION: ${{ matrix.python-version }}
UV_SYSTEM_PYTHON: true
env:
OS_TYPE: ${{ matrix.os }}
PYTHON_VERSION: ${{ matrix.python-version }}
UV_SYSTEM_PYTHON: "1"
🤖 Prompt for AI Agents
In .github/workflows/release-pypi.yml around lines 30 to 34, the environment
variable UV_SYSTEM_PYTHON is set to a bare boolean true, which can be
interpreted inconsistently by different tools. To fix this, explicitly set
UV_SYSTEM_PYTHON to the string "true" by enclosing it in quotes to ensure
consistent string parsing across all tooling.

@amotl amotl force-pushed the release-pypi-ng branch from ad95187 to ce8a819 Compare July 26, 2025 21:38
@amotl amotl marked this pull request as ready for review July 26, 2025 21:38
@amotl amotl merged commit 3fc0400 into main Jul 26, 2025
2 checks passed
@amotl amotl deleted the release-pypi-ng branch July 26, 2025 21:38
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.

1 participant