Contributing to Toaster
Thanks for helping! This is a small, focused project — the bar is simply: green checks, and the architecture stays clean.
Setup
uv venv && uv pip install -e ".[dev]" # or: pip install -e ".[dev]"
pre-commit install # optional: ruff on every commit
Before you push
make check # ruff check + ruff format --check + pytest
CI runs exactly this on Python 3.11 and 3.12 for every push and PR. Please keep it green and add a test for any behaviour change (the suite is headless and fast — no GUI needed).
Architecture rules (please keep these)
toaster.coreis numpy-only and headless — it must never import a GUI, a renderer, or a web framework.tests/test_architecture.pyenforces this.- Dependencies flow one way:
core←io / segment / persistence←interaction←api / web. The browser receives only numpy arrays and a flat snapshot, never colour buffers. - The two public extension seams are
Segmenter(@register_segmenter) andLoader(register_loader). New built-ins go through them; see the README for worked examples.
Style
rufffor lint and formatting (config inpyproject.toml).- Type hints and
from __future__ import annotationseverywhere; docstrings with Args/Returns on public API. - Code, comments and docs in English.