Skip to content

ci(py): publish dotpromptz-handlebars as a pure-Python universal wheel - #621

Merged
huangjeff5 merged 2 commits into
feat/handlebars-pythonfrom
feat/dotpromptz-python-handlebars
Oct 5, 2026
Merged

huangjeff5 merged 2 commits into
feat/handlebars-pythonfrom
feat/dotpromptz-python-handlebars

Conversation

@huangjeff5

@huangjeff5 huangjeff5 commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Configures release-please and GitHub Actions to publish dotpromptz-handlebars 0.2.0 as a pure-Python universal wheel (py3-none-any).

# before (publish_python_handlebarrz_package.yml)
strategy:
  matrix:
    target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, ...] # 15 Rust cross-compilation targets

# after (publish_python_handlebarrz_package.yml)
- name: Build pure Python wheel and sdist
  run: uv build --package dotpromptz-handlebars
# => Builds a single py3-none-any wheel in seconds

Decisions

  • One universal wheel replaces 15 platform binaries: Previously, handlebarrz built separate platform ABI wheels for Linux, macOS, and Windows on x86 and ARM. We build one py3-none-any wheel and sdist, dropping the entire Rust toolchain, sccache, and smoke-test-wheels.yml.
  • PyPI floor check gates dotpromptz publishing: dotpromptz requires dotpromptz-handlebars>=0.2.0. We query PyPI in the publish workflow before building dotpromptz so a release cannot publish with an unresolvable dependency.
  • Cross-version smoke testing: Added a PyPI smoke test verifying clean installation and import across Python 3.10 through 3.14.
  • Publish workflow SHA pinning: Touching the publish workflows to transition to pure-Python packaging triggered the repo's mandatory zizmor scan, requiring action pins to immutable commit SHAs and scoping top-level permissions to contents: read.

@github-actions github-actions Bot added documentation Improvements or additions to documentation python config dotpromptz root rust Pull requests that update rust code bazel labels Sep 25, 2026
@huangjeff5
huangjeff5 added this pull request to stack #622 September 25, 2026 20:09
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch 9 times, most recently from 976203e to 89fbb53 Compare October 1, 2026 05:17
@huangjeff5
huangjeff5 requested a review from pavelgj October 1, 2026 05:41

@pavelgj pavelgj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A few comments/questions

Comment thread python/dotpromptz/pyproject.toml Outdated
Comment thread scripts/build_dists
Comment thread python/dotpromptz/src/dotpromptz/dotprompt.py Outdated
Comment thread python/dotpromptz/src/dotpromptz/dotprompt.py Outdated
Comment thread python/dotpromptz/src/dotpromptz/dotprompt.py Outdated
Comment thread .github/workflows/python.yml Outdated
Comment thread python/dotpromptz/src/dotpromptz/helpers.py Outdated
Comment thread python/dotpromptz/src/dotpromptz/helpers.py
Comment thread python/dotpromptz/tests/dotpromptz/helpers_test.py
@huangjeff5
huangjeff5 removed this pull request from stack #622 October 1, 2026 21:33
@huangjeff5
huangjeff5 added this pull request to stack #624 October 1, 2026 21:33
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from 3e52b24 to a599e60 Compare October 2, 2026 02:35
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from a599e60 to 0bc8bd6 Compare October 2, 2026 02:37
@huangjeff5 huangjeff5 changed the title feat(py): render dotpromptz with handlebars-python ci(py): publish pure-Python dotpromptz-handlebars wheel Oct 2, 2026
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from 0bc8bd6 to 8c7bf33 Compare October 2, 2026 02:45
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from 8c7bf33 to 49be9bd Compare October 2, 2026 02:49
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from ab74177 to e80f991 Compare October 2, 2026 04:14
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from e80f991 to 8470ca9 Compare October 2, 2026 04:22
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from 8470ca9 to 54d7248 Compare October 2, 2026 04:54
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from 54d7248 to e4ee83d Compare October 2, 2026 04:59
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch 2 times, most recently from 84d3694 to 3b49940 Compare October 2, 2026 05:03
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from 3b49940 to a7b20a5 Compare October 2, 2026 05:13
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from a7b20a5 to 78012a2 Compare October 2, 2026 05:15
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from 78012a2 to d6bfbae Compare October 2, 2026 05:22
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from d6bfbae to c16efd0 Compare October 2, 2026 05:31
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from c16efd0 to 3797680 Compare October 2, 2026 05:43
@huangjeff5
huangjeff5 force-pushed the feat/dotpromptz-python-handlebars branch from 3797680 to 8ce5a59 Compare October 2, 2026 05:52
@huangjeff5
huangjeff5 removed this pull request from stack #624 October 2, 2026 05:53
@huangjeff5
huangjeff5 added this pull request to stack #625 October 2, 2026 05:53

@pavelgj pavelgj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM with comments

Comment thread .github/workflows/publish_python_dotpromptz_package.yml
Comment thread .github/workflows/publish_python_dotpromptz_package.yml
- Move release-please configuration from python/handlebarrz to
  python/handlebars with release-as: 0.2.0.
- Rewrite publish_python_handlebarrz_package.yml to build a single
  py3-none-any pure-Python wheel and sdist, dropping the 15-target
  multi-arch Rust build matrix.
- Add PyPI smoke test verifying clean installation and import across
  Python 3.10-3.14.
- Delete smoke-test-wheels.yml.
- Update dotpromptz publish workflow with a floor check requiring
  dotpromptz-handlebars>=0.2.0 on PyPI before publishing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bazel config documentation Improvements or additions to documentation dotpromptz python root rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants