Skip to content

Latest commit

 

History

History
73 lines (52 loc) · 2.69 KB

File metadata and controls

73 lines (52 loc) · 2.69 KB

Contributing to Otari

Before you start

Dev setup

Prerequisites: Python 3.13+, uv, Docker (for integration tests).

git clone https://github.com/mozilla-ai/otari
cd otari
uv venv && source .venv/bin/activate
uv sync --dev
cp config.example.yml config.yml
# Set master_key and at least one provider. If you don't have a local Postgres,
# change database_url to: sqlite+aiosqlite:///./otari.db
uv run otari serve --config config.yml

For hot reload: make dev.

Making changes

Branch naming: feature/, fix/, docs/, refactor/.

git checkout -b fix/your-description

After making changes:

make lint        # ruff
make typecheck   # mypy --strict
make test        # unit + integration

Run a single test: uv run pytest tests/unit/test_gateway_cli.py -v

If you changed any API routes or schemas, regenerate both generated artifacts and commit them:

uv run python scripts/generate_openapi.py
uv run python scripts/generate_postman.py
make openapi-check
make postman-check

Tests

  • New features need tests covering the happy path and error cases.
  • Unit tests for pure logic (tests/unit/), integration tests for route or database behavior (tests/integration/).
  • Integration tests require Docker (Testcontainers spins up Postgres automatically).

Pull requests

  • PR titles must follow Conventional Commits — the CI enforces this.
  • PRs are squash-merged, so the title is what ends up in the changelog.
  • Keep diffs focused; avoid unrelated refactors in the same PR.
  • Do not hand-edit CHANGELOG.md; it is regenerated from commit history at release time.
  • The PR description must keep the PR Type, Checklist, and AI Usage sections from the PR template. CI checks for these sections and will auto-close PRs that are missing them after 24 hours.

Questions?

License: By contributing, you agree your contributions will be licensed under Apache 2.0 (see LICENSE).