Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ source .venv/bin/activate
pip install -r requirements.txt
```

If you are working on backend tests and coverage locally, install the coverage helper too:

```bash
pip install coverage
```

### 5. Configure Environment Variables

Create a `backend/.env` file and add the required environment variables as described in the README.
Expand Down Expand Up @@ -112,6 +118,16 @@ python manage.py test

Ensure all tests pass successfully.

To generate coverage data and a browsable HTML report:

```bash
cd backend
coverage run manage.py test
coverage html
```

The backend coverage configuration lives in `backend/.coveragerc` and excludes virtual environments and migrations.

---

## Code Style Guidelines
Expand Down
14 changes: 14 additions & 0 deletions backend/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[run]
branch = True
source = .
omit =
*/venv/*
*/.venv/*
*/migrations/*

[report]
exclude_lines =
pragma: no cover
def __repr__
if TYPE_CHECKING:
if __name__ == .__main__.:
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ google-auth-oauthlib>=1.2,<2.0
firebase-admin>=6.5,<7.0
twilio>=9.0,<10.0
gunicorn>=20.1,<21.0
coverage>=7.6,<8.0