Skip to content

Feat pypi publish#192

Merged
ryansurf merged 2 commits into
mainfrom
feat-pypi-publish
Apr 8, 2026
Merged

Feat pypi publish#192
ryansurf merged 2 commits into
mainfrom
feat-pypi-publish

Conversation

@ryansurf
Copy link
Copy Markdown
Owner

@ryansurf ryansurf commented Apr 8, 2026

General:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Code:

  1. Does your submission pass tests?
  2. Have you run the linter/formatter on your code locally before submission?
  3. Have you updated the documentation/README to reflect your changes, as applicable?
  4. Have you added an explanation of what your changes do?
  5. Have you written new tests for your changes, as applicable?

Summary by Sourcery

Configure automated publishing of the Python package to PyPI when a GitHub release is created.

Build:

  • Add a GitHub Actions workflow to build the project and publish distributions to PyPI on release creation.
  • Update project metadata keywords to improve package discoverability on PyPI.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 8, 2026

Reviewer's Guide

Configures automated publishing of the cli-surf package to PyPI on GitHub release creation and slightly refines the package metadata keywords.

Sequence diagram for GitHub release triggered PyPI publish workflow

sequenceDiagram
    actor Maintainer
    participant GitHub
    participant ActionsRunner
    participant PyPI

    Maintainer->>GitHub: Create_release(tag, notes)
    GitHub-->>GitHub: Trigger_release_created_event
    GitHub->>ActionsRunner: Start_workflow(publish.yml)

    ActionsRunner->>ActionsRunner: actions_checkout_v4
    ActionsRunner->>ActionsRunner: actions_setup_python_v4(python_3_x)
    ActionsRunner->>ActionsRunner: pip_install(build, setuptools, wheel)
    ActionsRunner->>ActionsRunner: python_m_build(build_distributions)

    ActionsRunner->>PyPI: gh_action_pypi_publish(upload_distributions)
    PyPI-->>ActionsRunner: Publish_result
    ActionsRunner-->>GitHub: Workflow_status(success_or_failure)
Loading

File-Level Changes

Change Details Files
Refine package metadata keywords for better PyPI discoverability.
  • Extend the keywords list to include an additional term related to surfing for improved search coverage
pyproject.toml
Add a GitHub Actions workflow to build and publish the package to PyPI when a GitHub Release is created.
  • Introduce a publish workflow triggered on newly created GitHub releases
  • Set up a Python environment and install build-related dependencies (build, setuptools, wheel)
  • Build the package using the standard Python build module
  • Publish the built distributions to PyPI using the pypa/gh-action-pypi-publish action with OIDC-based authentication and a dedicated pypi environment
.github/workflows/publish.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@ryansurf ryansurf merged commit 88d6513 into main Apr 8, 2026
8 of 10 checks passed
@ryansurf ryansurf deleted the feat-pypi-publish branch April 8, 2026 22:54
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In the workflow environment config, the PyPI URL should use the standard /project/cli-surf/ path instead of /p/cli-surf to point to the correct project page.
  • You can simplify the dependency installation step to a single command (e.g., python -m pip install --upgrade pip build setuptools wheel) to reduce redundancy and slightly speed up the workflow.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the workflow environment config, the PyPI URL should use the standard `/project/cli-surf/` path instead of `/p/cli-surf` to point to the correct project page.
- You can simplify the dependency installation step to a single command (e.g., `python -m pip install --upgrade pip build setuptools wheel`) to reduce redundancy and slightly speed up the workflow.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

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

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