Skip to content

Add PyPI trusted-publishing workflow - #92

Open
gonzalocasas wants to merge 3 commits into
chungmin99:mainfrom
gonzalocasas:ci/pypi-trusted-publishing
Open

gonzalocasas wants to merge 3 commits into
chungmin99:mainfrom
gonzalocasas:ci/pypi-trusted-publishing

Conversation

@gonzalocasas

@gonzalocasas gonzalocasas commented Nov 7, 2026 •

Copy link
Copy Markdown

Closes #90 (once the jaxls dependency is sorted out, see below).

This adds a release workflow that publishes to PyPI via trusted publishing (no API tokens), plus the packaging fixes needed for a clean first release.

One-time setup

  1. On PyPI, add a pending trusted publisher for project pyroki: owner chungmin99, repository pyroki, workflow publish.yml, environment pypi
  2. In the repo settings, create a GitHub environment named pypi
  3. To release, bump __version__ in src/pyroki/__init__.py, merge, and publish a GitHub release tagged v<version>.

Blocker: jaxls

pyroki depends on a git branch of jaxls and that's not allowed in the publishing process, so jaxls needs to be published first, before pyroki can be released to pypi

gonzalocasas and others added 3 commits October 21, 2026 23:42
- Add `publish.yml`: builds sdist/wheel and runs `twine check --strict`
  on every PR/push; on a published GitHub release, verifies the tag
  matches the package version and uploads to PyPI via trusted publishing.
- Fail releases early if the metadata contains direct URL dependencies
  (e.g. `jaxls @ git+...`), which PyPI rejects at upload.
- Single-source the version from `pyroki.__version__`.
- Use an SPDX license expression (setuptools>=77), dropping the
  deprecated license table/classifier.
- Add authors, keywords and project URLs to the package metadata.
- README: document `pip install pyroki` alongside the source install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`tyro` and `robot_descriptions` are only used by the examples, tests and
benchmarks, never by the library itself. Moving them to an `examples`
extra slims down `pip install pyroki`, and defines the extra that the CI
workflows already install via `.[dev,examples]`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Ignore PLR0917 (too many positional arguments), the positional sibling
  of the already-ignored PLR0913; newer ruff releases enforce it, and the
  cost functions take positional arguments on purpose.
- Assert only on the exception type in the RobotCollision batching test:
  JAX 0.12 reworded the pytree mismatch error, which broke the
  message-based assertion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gonzalocasas gonzalocasas mentioned this pull request Nov 7, 2026

This branch has not been deployed

No deployments
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.

pypi release

1 participant