Skip to content

Build the release with uv instead of hatch - #39

Merged
wtgee merged 1 commit into
mainfrom
cleanup/uv-build-release
Sep 16, 2026
Merged

wtgee merged 1 commit into
mainfrom
cleanup/uv-build-release

Conversation

@wtgee

@wtgee wtgee commented Sep 16, 2026

Copy link
Copy Markdown
Member

create-release.yml was the only workflow not going through uv. It set up a Python, pip install hatch, then ran hatch clean && hatch build, while tests, docs and canary all install astral-sh/setup-uv and run uv -- as does every developer, per CLAUDE.md.

uv build drives the same hatchling backend [build-system] declares, so the sdist and wheel are the artifacts uv build already produces locally. Two steps go with it:

  • actions/setup-python, because uv resolves an interpreter matching requires-python on its own.
  • hatch clean, because the runner checks out fresh -- there is no stale dist/ for the release upload to pick up.

This is the same objection as the retired hatch envs and docs/requirements.txt: a second way to reach the same thing is a second thing to keep in step.

Not changed

The PyPI upload stays on Trusted Publishing. This came up as a question of whether the workflow matched panoptes-utils, which still uses a long-lived PYPI_API_TOKEN -- matching it there would be a downgrade, and would contradict CLAUDE.md, which states that tagging publishes via Trusted Publishing and cuts the release from the annotated tag's message. The release-notes source, the annotated-tag guard and the id-token: write permission are all untouched.

panoptes-utils is the one that should be brought forward; filing that separately.

Verification

uv build run locally against this branch produces both artifacts, with hatch-vcs still deriving the version from git (0.5.1.dev0+ge82975406), so tag-derived versioning is intact. The workflow YAML parses and the deploy job's steps resolve in order.

The publish path itself only executes on a v* tag push, so it is not exercised until the next release.

🤖 Generated with Claude Code

`create-release.yml` was the only workflow not going through `uv`: it set up
a Python, `pip install hatch`, then `hatch clean && hatch build`. Every other
job -- tests, docs, canary -- installs `astral-sh/setup-uv` and runs `uv`,
and so does every developer.

`uv build` drives the same `hatchling` backend `[build-system]` declares, so
the sdist and wheel are the artifacts `uv build` already produces locally. It
also resolves an interpreter matching `requires-python` on its own, so the
`actions/setup-python` step goes with it. `hatch clean` goes too: the runner
checks out fresh, so there is no stale `dist/` for the release upload to pick
up.

This is the same objection as the retired hatch envs and `docs/requirements.txt`
-- a second way to reach the same thing is a second thing to keep in step.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@wtgee
wtgee merged commit e34ccee into main Sep 16, 2026
4 checks passed
@wtgee wtgee mentioned this pull request Sep 16, 2026
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