Contributing
We welcome contributions to the Tinker Cookbook — new recipes, bug fixes, documentation improvements, and feature additions.
Getting started
git clone https://github.com/thinking-machines-lab/tinker-cookbook.git
cd tinker-cookbook
uv sync --extra dev
pre-commit install
Running tests
# Unit tests (no API key needed)
uv run pytest tinker_cookbook/
# Integration tests (requires TINKER_API_KEY)
uv run pytest tests/
Code style
We use ruff for linting and formatting (line length: 100). Pre-commit hooks run automatically.
Pull request process
- Create a feature branch from
main - Make your changes with tests if applicable
- Ensure all checks pass:
pre-commit run --all-files - Open a PR with a clear description
CI runs pre-commit, pyright, and pytest on every PR.
Adding a new recipe
Recipes live in tinker_cookbook/recipes/. Each recipe has:
- A training script (e.g.,
train.py) with aCLIConfigfor command-line usage - A
README.mdexplaining the task, how to run it, and expected results - Optional data preparation scripts
Follow the existing recipes as a template — chat_sl is a good starting point.