Skip to content

Commit d1e2797

Browse files
docs: add pre-commit and new endpoint guide to README
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8b2efd4 commit d1e2797

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,27 @@ For our project, we're using `bandit`, a tool designed to find common security i
207207
docker compose up --build --abort-on-container-exit mercury_security
208208
```
209209

210+
## Pre-commit
211+
212+
Install hooks locally to catch lint issues before CI:
213+
214+
```shell
215+
pip install pre-commit
216+
pre-commit install --install-hooks
217+
pre-commit run --all-files
218+
```
219+
220+
## How to add a new endpoint
221+
222+
1. **Flyway migration** — add `src/migrations/V{n}__description.sql` (next version number).
223+
2. **Model** — add or update a SQLAlchemy model in `src/models/`.
224+
3. **Schema** — add Pydantic request/response schemas in `src/schemas/`.
225+
4. **Controller** — implement logic in `src/controllers/`.
226+
5. **Route** — wire the endpoint in `src/routes/` and register it in `src/restful_ressources.py`.
227+
6. **Tests** — add coverage under `src/integration_tests/` (and `src/unit_tests/` when appropriate).
228+
229+
Run `./ci/integration-test.sh` after changes.
230+
210231
-------
211232

212233
## Contributions

0 commit comments

Comments
 (0)