- Done means green — a change is only complete when
./happy.shexits 0; do not commit until it does. If./happy.shwas already failing before your changes, you must fix those pre-existing failures too — or stop and ask the user how to proceed. - Docs for everything public — new functionality or public API changes must have accompanying docs in
docs/*.rst - Type-annotate public APIs — all public functions and classes need type annotations; mypy is the gate
Chide is a Python library for quickly creating sample objects in tests. Features: registry-based object creation, nested object graphs, attribute simplification, tabular format parsing/rendering, SQLAlchemy support.
uv sync --dev --all-extras # setup or after pulling
rm -rf .venv && uv sync --dev --all-extras # full reset./happy.sh # all checks — required before commit
uv run pytest # all tests + doctests
uv run pytest tests/test_collection.py # single file
uv run pytest --cov=chide --cov-report=term-missing # with coverage
uv run mypy src/chide tests # type checking
make -C docs html # build docs
uv build # build sdist + wheelsrc/chide/ — all source. Key modules:
collection.py—Collection, the main registry for sample object parametersfactory.py—Factory, base class for object creationset.py—Set, ordered collection of sample objectssimplifiers.py— simplify objects to attribute mappings for comparisonformats.py— tabular format parsing and renderingsqlalchemy.py— SQLAlchemy session-aware collectiontyping.py— type helpers
Config: pyproject.toml (optional dep: sqlalchemy).