Skip to content

github actions to publish to Pypi - #4

Merged
hotung1027 merged 12 commits into
mainfrom
pypi
Feb 11, 2026
Merged

github actions to publish to Pypi#4
hotung1027 merged 12 commits into
mainfrom
pypi

Conversation

@hotung1027

Copy link
Copy Markdown
Owner

This pull request introduces a new workflow for distributing the package to PyPI and updates the project configuration to use uv_build for builds instead of hatchling. It also revises author information and project metadata in pyproject.toml. These changes modernize the build and distribution process and ensure compatibility with recent Python versions.

Build and Distribution Workflow Updates

  • Added .github/workflows/distribute.yml to automate testing, building, and publishing to PyPI using GitHub Actions, with matrix testing for Python 3.12 and 3.13, and the uv tool for dependency management and builds.

Project Configuration and Metadata Changes

  • Switched build backend from hatchling to uv_build in pyproject.toml, including updating the [build-system] section and adding a build dependency group.
  • Updated author information in pyproject.toml to include name and email, replacing the previous format.
  • Removed the backpressure keyword from the keywords list in pyproject.toml for improved metadata accuracy.

Copilot AI review requested due to automatic review settings February 11, 2026 18:30
Comment thread .github/workflows/distribute.yml Fixed
Comment thread .github/workflows/distribute.yml Fixed
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions release workflow to build and publish tagged releases to PyPI, and updates packaging configuration to build with uv_build instead of hatchling, alongside minor project metadata tweaks.

Changes:

  • Added .github/workflows/distribute.yml to test, build, and publish distributions on v* tags.
  • Updated pyproject.toml build backend to uv_build and adjusted project metadata (authors/keywords), plus added a build extra.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
pyproject.toml Switches build backend to uv_build, updates author metadata/keywords, and adds a build-related extra.
.github/workflows/distribute.yml Introduces a tag-triggered pipeline to run lint/tests, build artifacts, and publish to PyPI via OIDC.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/distribute.yml Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
Comment thread pyproject.toml Outdated
Comment thread .github/workflows/distribute.yml Outdated
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --all-extras

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

Using uv sync --all-extras will install docs/build extras too, which can significantly slow down the release test job and increase the chance of unrelated dependency breakage. Consider syncing only what the test job needs (e.g., --extra dev) or a dedicated test group/extra.

Suggested change
run: uv sync --all-extras
run: uv sync --extra dev

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings February 11, 2026 18:34
hotung1027 and others added 4 commits February 12, 2026 02:36
reuse github workflow in ci test

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

@hotung1027 I've opened a new pull request, #5, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 11, 2026 18:38
Co-authored-by: hotung1027 <20833241+hotung1027@users.noreply.github.com>
[WIP] Update GitHub Actions for PyPI publishing
Update author formatting in pyproject.toml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml
Comment thread .github/workflows/distribute.yml Outdated
drop pr write permission

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 11, 2026 18:41
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

pyproject.toml:53

  • The PR description mentions adding a "build dependency group", but the change adds build under [project.optional-dependencies], which creates an installable extra (pip install .[build]) rather than a dependency group. If the intent is a dependency group for uv/PEP 735-style grouping, this likely needs to be expressed using the project’s supported grouping mechanism instead of optional-dependencies (or the PR description should be updated to match what’s actually implemented).

[project.urls]
Homepage = "https://github.com/hotung1027/anyiostream"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +13 to +18
test:
uses: ./.github/workflows/ci.yml
secrets: inherit
build:
runs-on: ubuntu-latest
needs: test

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

test job is calling uses: ./.github/workflows/ci.yml, but .github/workflows/ci.yml is not a reusable workflow (it lacks on: workflow_call). As written, this workflow will fail at runtime. Either add workflow_call to ci.yml (and adjust inputs/outputs as needed), or duplicate the CI steps directly in this workflow (or reference a reusable workflow that already supports workflow_call).

Suggested change
test:
uses: ./.github/workflows/ci.yml
secrets: inherit
build:
runs-on: ubuntu-latest
needs: test
build:
runs-on: ubuntu-latest

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
Comment on lines +61 to 62
[tool.uv_build]
packages = ["src/anyiostream"]

Copilot AI Feb 11, 2026

Copy link

Choose a reason for hiding this comment

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

[build-system].requires uses a different requirement-string format ("uv_build >= 0.10.0, <0.11.0") than the rest of the file (e.g. anyio>=4.8.0, uv_build>=0.10.0,<0.11.0). Consider normalizing this to the same no-space specifier style to reduce churn and avoid subtle parsing differences across tooling.

Copilot uses AI. Check for mistakes.

@hotung1027 hotung1027 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

all CodeQL, security,and format has fixed

Comment thread .github/workflows/distribute.yml Fixed
@hotung1027
hotung1027 merged commit c329142 into main Feb 11, 2026
6 checks passed
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.

4 participants