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 Conventional Commit style commit messages (
feat:,fix:,perf:, etc.). - 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 is executed manually from GitHub Actions using the
Semantic Releaseworkflow (workflow_dispatch). - Semantic release evaluates Conventional Commits already present in the repository default branch (from PR merges or direct pushes).
- 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.
- After a tag is created, GitHub Release notes are generated automatically.
- CI release pipeline is tag-driven (
vX.Y.Z) to build artifacts and publish to PyPI. - Workflow dispatch is kept only as internal fallback trigger from
Semantic Releaseautomation.
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 commits to default branch (direct push or merged PR), using Conventional Commit messages.
- Open GitHub Actions and run
Semantic Releaseon the default branch. - Choose
release_type:auto(default) for commit-based bump, orpatch/minor/majorto force bump manually. - Workflow evaluates commits and creates tag
vX.Y.Zwhen releasable commits exist. - Workflow creates the corresponding GitHub Release.
- 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.
Commit validation note:
- Conventional commit message checks run on both
pushandpull_requestevents.
Required repository secrets:
PYPI_API_TOKEN: token used by publish job to upload wheels/sdist to PyPI.