Thanks for contributing to Tryx.
- Install
uvand Rust toolchain. - Sync local dependencies:
uv sync --group dev --group docs- Build native extension in editable mode:
uv run maturin develop- Install local hooks:
uv run pre-commit install --hook-type pre-commit --hook-type commit-msgRun these before pushing:
uv run ruff check .
uv run ruff format --check .
uv run python scripts/check_stub_parity.pyUse format:
type(scope): summary
type(scope)!: summary
Scope is optional.
Allowed type values:
featfixperfrefactordocstestbuildcichorestyle
Versioning rules for semantic release:
feat-> minor releasefixandperf-> patch release!orBREAKING CHANGE:footer -> major release
Examples:
feat(client): add media retry metadatafix(events): avoid panic on missing participantfeat(api)!: rename send_file to upload_file
- Create a feature branch from
main. - Keep PR scope focused and small.
- Ensure CI is green.
- Use a Conventional Commit style PR title.
- Fill the PR template completely.
Recommended merge strategy: squash merge.
Use issue templates:
- Bug report for runtime/behavior bugs
- Feature request for API or workflow enhancements
Include:
- reproduction steps
- expected vs actual behavior
- environment details
- Release automation runs when a PR from
devintomainis merged. - Semantic release evaluates Conventional Commits from merged changes.
- If commits qualify (
feat,fix,perf, or breaking), version and changelog are updated and a new tag (vX.Y.Z) is created. - If commits do not qualify (for example docs/chore only), release is a no-op and no publish is triggered.
- New
vX.Y.Ztags trigger the CI workflow that builds multi-platform wheels and publishes to PyPI.
Use this rule of thumb for automatic versioning:
feat: ...-> bump minor (for example0.3.1->0.4.0)fix: ...orperf: ...-> bump patch (for example0.3.1->0.3.2)feat!: ...or commit body withBREAKING CHANGE:-> bump majordocs:,chore:,test:only -> no release
How to trigger semantic release until publish to PyPI:
- Push commit to
devusing Conventional Commit format. - Open PR from
devtomain. - Merge PR.
- Semantic Release workflow runs, creates tag
vX.Y.Zwhen releasable commits exist. - CI workflow runs on that tag and publishes artifacts to PyPI.
Manual fallback (if needed):
- Open Actions tab.
- Run
Semantic Releaseworkflow viaworkflow_dispatch. - If no releasable commit exists, workflow will report no new release.
Required repository secrets:
PYPI_API_TOKEN: token used by publish job to upload wheels/sdist to PyPI.