we follow the Astral AI policy verbatim. in short:
- AI is welcome as a coding tool, but you own the code you publish and we own what we merge. the bar for contributions is the same regardless of how the diff was produced.
- write your own issue descriptions, PR bodies, and review replies. do not paste AI-generated prose into conversations with maintainers. comments that look autogenerated will be hidden.
- a human in the loop must understand the change. autonomous-agent PRs (no human review before submit) will be closed.
- if you want to quote an AI interaction for context, put it in a
>block, label it as AI, and add your own commentary. no long snippets. - non-native English speakers using AI to polish phrasing: great — just make sure the result is in your own voice. for translation, keep the original in your language and put the translation in a quote block.
please read the full policy at the link above before opening a PR.
run maturin develop to build the rust extension and install it into the active
virtualenv so you can import and test the python bindings locally.
run cargo run -- test to test tryke's own python code, using tryke
we use cargo-nextest for the rust test suite. install it
once:
cargo install cargo-nextest --lockedthen run the suite with:
cargo nextest run --workspace --all-featuresrun cargo run -p tryke_dev --bin generate-cli-docs -- after changing the Rust CLI definitions
or their help text. this rewrites docs/reference/cli.md from the clap metadata in
crates/tryke/src/cli.rs.
pre-commit regenerates the file locally, and CI fails if the checked-in docs are out of sync with the Rust code.
- run
cargo nextest run— new or changed snapshots are written tocrates/tryke/tests/snapshots/as.snap.newfiles - review pending snapshots:
cargo insta review(interactive) or accept all:cargo insta accept - commit the
.snapfiles alongside code changes
the browser playground lives in playground/. to run it locally:
cd playground
bun install
bun run devto deploy manually to Cloudflare Pages:
cd playground
bun run build
bunx wrangler pages deploy dist --project-name=tryke-playgroundthis creates a preview deployment at a unique URL (e.g.
<hash>.tryke-playground.pages.dev). to deploy straight to production, add
--branch main — this is just metadata passed to Cloudflare and works from
any local branch:
bunx wrangler pages deploy dist --project-name=tryke-playground --branch mainpushes to main that touch the playground or WASM crates deploy automatically
to production via the playground GitHub Actions workflow.
-
start from a clean
mainbranch with the latest CI passing -
run the release helper with the bump type:
scripts/release.sh patch
use
minorormajorinstead ofpatchas needed.the helper checks that the Cargo workspace version and
pyproject.toml'sbump-my-versioncurrent_versionmatch, computes the nextv<version>tag, and prepends release notes toCHANGELOG.mdwith:uv run git-cliff --tag v0.2.0 --unreleased --prepend CHANGELOG.md
if
git-cliffcannot fetch GitHub PR metadata, export aGITHUB_TOKENand rerun the helper. -
when the helper pauses, review and edit the generated
CHANGELOG.mdentry. press Enter to continue once it looks right. -
the helper runs markdown hooks for
CHANGELOG.md, commits the changelog, runsbump-my-versionto updatepyproject.toml, the workspace version inCargo.toml, anduv.lock, creates the release commit andv<version>tag, then pushes both:git push origin HEAD git push origin v0.2.0
-
the
releaseworkflow triggers automatically on thev*tag. it builds linux, macOS, and windows wheels, publishes them to PyPI withuv publish, and then creates the GitHub release notes fromgit-cliffusing the tagged commits. -
monitor the workflow at
https://github.com/thejchap/tryke/actions -
once the
github-releasejob completes, verify PyPI has the new version:uv tool install --force tryke==0.2.0 tryke --version