Skip to content

feat: add PyPI dev bootstrap release mode#202

Open
sipercai wants to merge 2 commits into
mainfrom
liuyu/feat/pypi-dev-bootstrap
Open

feat: add PyPI dev bootstrap release mode#202
sipercai wants to merge 2 commits into
mainfrom
liuyu/feat/pypi-dev-bootstrap

Conversation

@sipercai
Copy link
Copy Markdown
Collaborator

Description

Add a manual dev-bootstrap-new-projects mode to the LoongSuite release workflow.

This mode is intended for newly merged LoongSuite distributions whose PyPI project names do not exist yet. It:

  • builds LoongSuite PyPI wheels with a unique PEP 440 dev version derived from the requested base version and GitHub run metadata;
  • queries PyPI JSON for each LoongSuite distribution from the release manifest;
  • keeps only wheels whose PyPI project does not already exist;
  • supports the default dry_run=true preview mode;
  • publishes kept wheels with PYPI_API_TOKEN through the existing pypi environment only when dry_run=false;
  • skips release branch creation, GitHub Release creation, and post-release PR creation.

Operational note: this workflow uses PyPI API token publishing. The token must have permission to upload and create new PyPI projects. Pending Publishers are only required if the workflow is switched to OIDC Trusted Publishing. If manual approval is required before upload, configure required reviewers on the GitHub pypi environment.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • python3 -m py_compile scripts/loongsuite/select_new_pypi_projects.py
  • uvx ruff@0.14.1 format --check scripts/loongsuite/select_new_pypi_projects.py
  • uvx ruff@0.14.1 check scripts/loongsuite/select_new_pypi_projects.py
  • Parsed .github/workflows/loongsuite-release.yml with yaml.BaseLoader
  • Simulated a missing-project prune locally: an existing wheel was removed and a missing-project wheel was kept
  • python3 <loongsuite-github-pipeline>/scripts/check_loongsuite_pr_readiness.py --repo .
  • tox -e precommit

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
    • Not applicable: this changes release automation and release documentation only.
  • Unit tests have been added
    • Not applicable: this mode is a manually dispatched release workflow; focused local smoke checks and tox -e precommit were run.
  • Documentation has been updated

@sipercai sipercai marked this pull request as ready for review May 26, 2026 10:57
@ralf0131 ralf0131 requested a review from Copilot May 27, 2026 01:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a manually-triggered “dev bootstrap” mode to the LoongSuite release workflow to pre-create newly added PyPI project names by publishing uniquely-versioned dev wheels only for distributions that don’t yet exist on PyPI.

Changes:

  • Added mode=dev-bootstrap-new-projects to the GitHub Actions release workflow, including dev-version derivation, wheel pruning, and conditional publishing.
  • Introduced a new helper script to detect missing PyPI projects via PyPI JSON and prune built wheels accordingly.
  • Updated release documentation to describe the new dev-bootstrap workflow and PyPI publishing setup.

Reviewed changes

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

File Description
scripts/loongsuite/select_new_pypi_projects.py New script that queries PyPI and prunes dist-pypi/ wheels to only those whose projects don’t yet exist.
docs/loongsuite-release.md Documents the dev-bootstrap mode and updates PyPI publishing guidance.
.github/workflows/loongsuite-release.yml Adds the new workflow mode, jobs, inputs, and token-based publishing changes.

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

Comment thread .github/workflows/loongsuite-release.yml Outdated
Comment thread .github/workflows/loongsuite-release.yml Outdated
@sipercai sipercai added the Skip Changelog PRs that do not require a CHANGELOG.md entry label May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants