Contributing
Two commands reproduce everything CI runs on your pull request.
PYTHONPATH=. pytest -v tests/
pre-commit run --all-filesThe suite is plain pytest. Async mode is automatic, so async tests need no decorator.
PYTHONPATH=. pytest -v tests/ # everything
PYTHONPATH=. pytest -v tests/services/test_flow_service.py # one file
PYTHONPATH=. pytest -v tests/services/test_flow_service.py::test_name
PYTHONPATH=. pytest -v -k "flow" # by name| Directory | Covers |
|---|---|
tests/clients/ | The WhatsApp client and both LLM clients. |
tests/services/ | Routing, state, messaging, flows, citations and exam delivery. |
tests/database/ | Message helpers, with the database mocked out. |
tests/tools/ | Individual tools. |
tests/crons/ | The reminder job. |
You need a .env even though no test touches a database
Configuration is validated when the application is imported, so a missing required variable fails collection before any test runs. Any syntactically validDATABASE_URL satisfies it. There are no fixtures that create a schema and no test database anywhere.Handled entirely by pre-commit. There is no make lint and no separate format command.
| Hook | Enforces |
|---|---|
| black | Formatting, on defaults. |
| ruff | Lint plus import ordering, with autofix. |
| check-toml, check-yaml | Those files parse. |
| detect-private-key | No committed private keys. |
| end-of-file-fixer, trailing-whitespace | Whitespace hygiene. |
Both black and ruff rewrite files, and a rewritten file fails the commit. Stage the changes and commit again. The configuration stops at the first failing hook, so fixing one may reveal another.
There is no type checking in this project. No mypy, no pyright, no CI step.
tests/llm_client_tests.py does not match the naming pattern pytest collects, so it never runs despite containing real tests.test_*.py live under scripts/. They are outside the configured test paths and are development utilities rather than suite members.docs/en/CONTRIBUTING.md says running the tests is not yet possible. It is; that line predates the suite.