chore(wren): prepare v0.1.0 for PyPI publishing#1505
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdded 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 Changes
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)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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/v1Pinning 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
📒 Files selected for processing (6)
.github/workflows/wren-pypi-publish.ymlwren/README.mdwren/pyproject.tomlwren/scripts/publish.shwren/src/wren/__init__.pywren/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>
Summary
wren-engineversion to 0.1.0scripts/publish.shfor manual builds and uploadswren versionCLI commandTest plan
uv buildproduces valid sdist + wheel inwren/dist/wren versionprintswren-engine 0.1.0pip install --index-url https://test.pypi.org/simple/ wren-engineinstalls correctly🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
versioncommandDocumentation
Chores