This document contains general instructions for agents making changes in Hypothesis projects.
Our frontend tech stack uses TypeScript, Preact and Tailwind CSS.
- After editing code, run
yarn format
- To check for errors, run
yarn typecheck
andyarn lint
- To run tests, use
yarn test
. To run a specific test, useyarn test --grep <pattern>
where is a regex that matches the test files you want to run.
Our backend tech stack uses Python, Pyramid, tox and pytest.
- After editing code, run
make format
to reformat code,make lint
to lint andmake test
to run tests - Before commmitting changes, run make sure to verify that all QA checks pass. A project may require that a database or other services are running before running tests. In that case use
make services
to start the services. - To run tests with specific arguments, use
tox -e <environment> -- <pytest args>
. Using tox ensures that environment variables etc. are set as needed.
- In commit messages, explain succinctly the change and the rationale for it. Do not include a test plan.
- In PR descriptions, explain the change and the rationale for it. Do not include a test plan.
- In commit messages and PR descriptions, do not state that tests are passing. It is assumed that all commits and PRs have appropriate tests.