Skip to content

Modernize build: setuptools-scm, verified PyPI publishing, per-PR builds#8

Merged
OnFreund merged 1 commit into
mainfrom
claude/verified-per-pr-builds-bbe0d8
Jul 17, 2026
Merged

Modernize build: setuptools-scm, verified PyPI publishing, per-PR builds#8
OnFreund merged 1 commit into
mainfrom
claude/verified-per-pr-builds-bbe0d8

Conversation

@OnFreund

Copy link
Copy Markdown
Owner

Summary

  • Replace setup.py with pyproject.toml, using setuptools-scm to derive the version from git tags instead of a hand-maintained VERSION string.
  • Add mypy type checking (configured, passing) and a py.typed marker.
  • Add CI/release workflows mirroring pymonoprice:
    • ci.yml — mypy on every push/PR.
    • pr-build.yml / pr-publish.yml — every PR builds a wheel and publishes it as an installable GitHub pre-release (pr-N), with a bot comment containing pip and Home Assistant (rympro integration) install instructions.
    • pr-cleanup.yml — deletes the pre-release and comment when the PR is merged or closed.
    • release.yml — on publishing a GitHub release, builds and publishes to PyPI via trusted publishing (OIDC, no stored token) with PEP 740 attestations.
  • README: CI badge + "Testing PRs" section.

The pypi GitHub environment and PyPI trusted publisher are already configured.

Test plan

  • python -m build --wheel produces a correctly versioned wheel (e.g. 0.0.10.dev3+...) with py.typed included
  • mypy -p pyrympro passes against the new pyproject.toml config
  • All workflow YAML files parse
  • Open this PR and confirm pr-build/pr-publish produce a working pre-release + comment
  • Merge/close and confirm pr-cleanup removes the pre-release + comment
  • Cut a GitHub release and confirm release.yml publishes to PyPI

🤖 Generated with Claude Code

Replaces setup.py with pyproject.toml using setuptools-scm for
git-tag-derived versioning, adds mypy checking and py.typed, and adds
CI workflows mirroring pymonoprice: PR builds publish an installable
pre-release wheel with a bot comment, cleaned up on merge/close, and
tagged releases publish to PyPI via trusted publishing (OIDC) with
PEP 740 attestations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@OnFreund
OnFreund merged commit dde603a into main Jul 17, 2026
3 checks passed
@OnFreund
OnFreund deleted the claude/verified-per-pr-builds-bbe0d8 branch July 17, 2026 12:35
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