This file provides guidance for Codex (and other AI agents) working in this repository. Its scope covers the entire repo.
- For repository-wide policies and detailed workflows (including releases and changelogs), defer to the canonical guidance in
CONTRIBUTING.md.
- Install dependencies with
uv sync. - Install Git hooks:
pre-commit install. - Use
make formatbefore committing to format both backend and frontend code.
- For local frontend development, set
_RELEASE = Falseinstreamlit_webrtc/component.py(do not commit this change) and run:cd streamlit_webrtc/frontend && pnpm dev- In another terminal:
streamlit run home.py
- Backend tests:
uv run pytest - Frontend tests:
cd streamlit_webrtc/frontend && pnpm test
- Run
uv run mypy .for backend typing.
- Full build:
make build - Frontend-only build:
cd streamlit_webrtc/frontend && pnpm run build
- Create a changelog fragment with
scriv createfor each PR (scriv create --editto open an editor) and commit it underchangelog.d/. - CI will open a changelog preview PR from committed fragments; maintainers merge it before the automated release build runs.
- Keep changes minimal and focused; prefer small, reviewable commits.
- Follow existing code patterns and naming conventions in each area.