feat: independent release automation + surface gateway spec version#12
Merged
Conversation
The gateway codegen now stamps the spec version into the generated core (otari._client._spec_version). Re-export it from the package so callers can tell which gateway spec this SDK targets. The marker is seeded here to match the codegen output byte-for-byte, so the next regeneration is a no-op for it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the manual "create a GitHub release by hand" flow with release-please. Merges to main accumulate into a release PR that bumps the version and updates CHANGELOG.md; merging it tags the release and publishes to PyPI in the same workflow run (gated on release_created), so no PAT is needed to chain off the release event. Removes the old publish.yml, whose job moves into the publish step here. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Document how this SDK is released: conventional commits drive a release-please release PR; merging it tags and publishes. Covers the repo's registry, secret, version file, the one-time repo setting, and the retry path, and links to the gateway compatibility doc for the cross-repo policy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
khaledosman
approved these changes
Jun 11, 2026
There was a problem hiding this comment.
Pull request overview
This PR introduces independent release automation for the Python SDK via release-please, and surfaces the gateway spec version targeted by the generated client core as otari.__spec_version__.
Changes:
- Re-export generated gateway spec version marker as
otari.__spec_version__and add a unit test to guard the wiring. - Add release-please configuration and a unified Release workflow that opens release PRs and publishes to PyPI on release creation.
- Remove the legacy release-event-driven PyPI publish workflow in favor of release-please-driven publishing.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/unit/test_spec_version.py |
Adds a unit test asserting otari.__spec_version__ matches the generated marker. |
src/otari/_client/_spec_version.py |
Adds the generated spec-version marker file (seeded placeholder). |
src/otari/__init__.py |
Re-exports __spec_version__ from the generated core at the package root. |
RELEASE.md |
Documents the new release-please-driven release process and prerequisites. |
release-please-config.json |
Configures release-please for a Python package release flow. |
.release-please-manifest.json |
Seeds the release-please manifest at version 0.1.0. |
.github/workflows/release-please.yml |
Adds release-please automation and a publish job gated on release_created. |
.github/workflows/publish.yml |
Removes the old publish-on-release workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+21
to
+24
| # Gateway/spec version the generated core was built from, stamped into the core by | ||
| # the gateway codegen pipeline. Surfaced here so callers can check which gateway | ||
| # spec this SDK targets (see https://github.com/mozilla-ai/otari spec compatibility). | ||
| from otari._client._spec_version import __spec_version__ as __spec_version__ |
Comment on lines
+40
to
+46
| - uses: astral-sh/setup-uv@v6 | ||
|
|
||
| - name: Build package | ||
| # release-please already committed the version bump to pyproject.toml on | ||
| # main, so the build picks it up with no tag-to-file patching needed. | ||
| run: uv build | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the two per-SDK items from #9: independent release automation and surfacing the gateway spec version.
Surface the gateway spec version
otari/_client/_spec_version.py. The package re-exports it asotari.__spec_version__so callers can tell which gateway spec this SDK targets.tests/unit/test_spec_version.pyto guard the wiring.Release automation (release-please)
release-please-config.json,.release-please-manifest.json(seeded at the current0.1.0), and.github/workflows/release-please.yml.mainaccumulate into a release PR (version bump inpyproject.toml+CHANGELOG.md); merging it tags the release and publishes to PyPI in the same workflow run, gated onrelease_created.publish.yml; its publish job moves into the release-please workflow, so no PAT is needed to chain off the release event. Trusted-publisher OIDC (environment: pypi,id-token: write) is preserved.Prerequisites for the maintainer
Test plan
uv run ruff check .uv run mypy src/uv run pytest tests/unit(112 passed)Fixes #9
Part of mozilla-ai/otari#133
🤖 Generated with Claude Code