Skip to content

chore(wren): prepare v0.1.0 for PyPI publishing#1505

Merged
douenergy merged 2 commits intoCanner:mainfrom
goldmedal:chore/publish-wren-engine
Apr 2, 2026
Merged

chore(wren): prepare v0.1.0 for PyPI publishing#1505
douenergy merged 2 commits intoCanner:mainfrom
goldmedal:chore/publish-wren-engine

Conversation

@goldmedal
Copy link
Copy Markdown
Contributor

@goldmedal goldmedal commented Apr 1, 2026

Summary

  • Bump wren-engine version to 0.1.0
  • Add GitHub Actions workflow for PyPI / TestPyPI publishing (trusted publishing via OIDC)
  • Add local scripts/publish.sh for manual builds and uploads
  • Expand README with all connector install options, badges, development and publishing sections
  • Add wren version CLI command

Test plan

  • uv build produces valid sdist + wheel in wren/dist/
  • wren version prints wren-engine 0.1.0
  • Workflow dispatch to TestPyPI succeeds
  • pip install --index-url https://test.pypi.org/simple/ wren-engine installs correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a CLI version command
    • Bumped package version to 0.1.0
  • Documentation

    • Expanded README: installation for many connectors, development tasks, publishing commands
    • Added PyPI badges, license, and Python 3.11+ requirement
  • Chores

    • Added package publishing workflow and helper publish script
    • Updated project metadata with authors and expanded keywords

Add PyPI publishing workflow (GitHub Actions with trusted publishing),
local publish script, version bump to 0.1.0, expanded README with all
connector install options, and a `wren version` CLI command.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file ci labels Apr 1, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f718c696-1ebf-4480-b0b4-9fea1906a3a2

📥 Commits

Reviewing files that changed from the base of the PR and between 8bdd549 and 70ae849.

📒 Files selected for processing (1)
  • wren/scripts/publish.sh
✅ Files skipped from review due to trivial changes (1)
  • wren/scripts/publish.sh

📝 Walkthrough

Walkthrough

Added automated PyPI/TestPyPI publishing (GitHub Actions + publish script), updated package metadata and README (badges, install/publishing docs, Python 3.11+), bumped version to 0.1.0, and added a version CLI subcommand.

Changes

Cohort / File(s) Summary
Publishing Workflow & Script
.github/workflows/wren-pypi-publish.yml, wren/scripts/publish.sh
New GitHub Actions workflow to build and publish wren-engine (workflow_dispatch with target, OIDC id-token write, build → publish jobs). New publish.sh supports --test/--build, extracts version, builds with uv, validates with twine, and uploads via twine upload.
Package Metadata
wren/pyproject.toml, wren/src/wren/__init__.py
Added authors metadata and expanded keywords; bumped package __version__ from 0.0.1 to 0.1.0.
Documentation & CLI
wren/README.md, wren/src/wren/cli.py
README updated with PyPI badges, expanded install extras, Python 3.11+ requirement, development tasks, and publishing instructions. Added version Typer subcommand that prints wren-engine {__version__}.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as "Developer"
  participant GH as "GitHub Actions"
  participant Runner as "Runner (ubuntu-latest)"
  participant PyPI as "PyPI / TestPyPI"

  Dev->>GH: Trigger workflow (manual `target`=pypi/testpypi)
  GH->>Runner: Start build job
  Runner->>Runner: checkout, setup Python 3.11, install build
  Runner->>Runner: run `python -m build` in `wren/` → `wren/dist/*` (artifact)
  Runner->>GH: upload `dist` artifact
  GH->>Runner: start publish job (download artifact, list files)
  Runner->>PyPI: run pypa/gh-action-pypi-publish (uploads to selected repo)
  PyPI-->>Runner: respond with publish status
  Runner-->>GH: report job result
  GH-->>Dev: workflow completed (success/failure)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

python

Suggested reviewers

  • douenergy

Poem

🐰 A tiny script hops to the gate,
Builds and bundles, then checks the slate,
Version bumped, badges gleam,
PyPI dreams on a publish stream—
Wren hops off, package first-rate! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main objective: preparing version 0.1.0 of the wren package for PyPI publishing, which is the central focus of all changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/wren-pypi-publish.yml (1)

24-63: Pin GitHub Actions to commit SHAs for stronger supply-chain safety.

This workflow uses moving version tags (@v4, @v5, @release/v1) for actions, which can be reassigned or modified. Replace these with immutable commit SHAs:

  • Line 24: actions/checkout@v4
  • Line 26: actions/setup-python@v5
  • Line 38: actions/upload-artifact@v4
  • Line 52: actions/download-artifact@v4
  • Line 61: pypa/gh-action-pypi-publish@release/v1

Pinning to SHAs prevents unexpected changes from impacting your supply chain.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/wren-pypi-publish.yml around lines 24 - 63, Replace the
floating action tags with immutable commit SHAs for each referenced action to
improve supply-chain safety: update actions/checkout@v4,
actions/setup-python@v5, actions/upload-artifact@v4,
actions/download-artifact@v4, and pypa/gh-action-pypi-publish@release/v1 to
their corresponding full commit SHAs (obtain the latest intended secure SHA from
each action's GitHub repo and substitute it in place of the tag). Ensure you
update the uses: entries for those exact identifiers so the workflow references
the pinned SHAs instead of moving tags.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@wren/scripts/publish.sh`:
- Around line 66-67: The VERSION extraction in publish.sh is too broad and may
capture other occurrences of __version__ (e.g., in __all__), so update the
assignment that sets VERSION to match only the actual version assignment in
src/wren/__init__.py: restrict the grep/sed pattern to the line that begins with
__version__ (e.g., match ^__version__\s*=\s*['"]...['"] and capture the quoted
value) or replace the shell extraction with a small deterministic command (e.g.,
a Python -c that reads and parses __version__ from src/wren/__init__.py); modify
the variable named VERSION in publish.sh accordingly so it always contains the
correct version string.

---

Nitpick comments:
In @.github/workflows/wren-pypi-publish.yml:
- Around line 24-63: Replace the floating action tags with immutable commit SHAs
for each referenced action to improve supply-chain safety: update
actions/checkout@v4, actions/setup-python@v5, actions/upload-artifact@v4,
actions/download-artifact@v4, and pypa/gh-action-pypi-publish@release/v1 to
their corresponding full commit SHAs (obtain the latest intended secure SHA from
each action's GitHub repo and substitute it in place of the tag). Ensure you
update the uses: entries for those exact identifiers so the workflow references
the pinned SHAs instead of moving tags.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 054123e8-9328-4d84-8bea-63e179e48cf3

📥 Commits

Reviewing files that changed from the base of the PR and between 2e3c1de and 8bdd549.

📒 Files selected for processing (6)
  • .github/workflows/wren-pypi-publish.yml
  • wren/README.md
  • wren/pyproject.toml
  • wren/scripts/publish.sh
  • wren/src/wren/__init__.py
  • wren/src/wren/cli.py

Anchor the regex to lines starting with __version__ to avoid matching
other occurrences, and fail early if the version cannot be parsed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@goldmedal goldmedal requested a review from douenergy April 1, 2026 09:45
@douenergy douenergy merged commit f565a45 into Canner:main Apr 2, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants