Thanks for your interest in contributing! This guide covers the essentials.
# Clone and install (requires Python 3.11+ and uv)
git clone https://github.com/Chinchill-AI/chat-sdk-python.git
cd chat-sdk-python
uv sync --group devuv run pytest tests/ # all tests
uv run pytest tests/ -x # stop on first failure
uv run pytest tests/unit/ # unit tests onlyuv run ruff check src/ tests/ # lint
uv run ruff format src/ tests/ # auto-formatAll PRs must pass ruff check with zero errors.
- Create
src/chat_sdk/adapters/<platform>/with at minimum:adapter.py-- the adapter class implementing the Adapter protocol__init__.py-- public exports and acreate_<platform>_adapter()factory
- Follow the patterns in existing adapters (Slack and Teams are good references).
- Add an optional-dependency group in
pyproject.toml. - Add tests under
tests/unit/adapters/<platform>/.
- Tests required. Every bugfix or feature needs at least one test.
- Ruff clean.
uv run ruff check src/ tests/must pass with no errors. - Small, focused PRs are easier to review than large ones.
- Descriptive commit messages. Explain why, not just what.
- Check existing issues before opening a new one.
- Reference the issue number in your PR description (e.g.,
Fixes #42). - For large changes, open an issue first to discuss the approach.
By contributing you agree that your contributions will be licensed under the MIT License.
When porting tests from the TypeScript SDK:
- Add the mapping to
scripts/verify_test_fidelity.py - Generate stubs:
python3 scripts/verify_test_fidelity.py --fix - Translate each stub by reading the TS
it("...")block line-by-line - Verify names match:
python3 scripts/verify_test_fidelity.pymust show 0 missing - Run tests:
uv run pytest tests/ -q
Test function names MUST be derivable from the TS it("...") description.
Do NOT write new tests — translate the EXISTING TS tests.