Skip to content
Open
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
24 changes: 17 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,28 +152,38 @@ None :)
- `BACKEND_HOST`: the subdomain where your users will access your API (e.g "api.mydomain.com")


### Developing your feature
## Developing your feature

#### Commits
### Commits

- **Code**: ensure to provide docstrings to your Python code. In doing so, please follow [Google-style](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) so it can ease the process of documentation later.
- **Commit message**: please follow [Udacity guide](http://udacity.github.io/git-styleguide/)

#### Tests
### Tests

In order to run the same unit tests as the CI workflows, you can run unittests locally:

#### pytest
```shell
make test
```

This will run the full suite of core API unittests. However, if you're trying to run some specific unittests, you can do as follows:
```shell
make run-dev
docker-compose exec -T backend pytest tests/routes/test_XYZ.py
docker compose -f docker-compose.dev.yml up -d --build --wait
```

```shell
docker compose exec -T backend pytest tests/endpoints/test_cameras.py
```

#### end to end test

```shell
make e2e
```

#### Code quality
### Code quality

To run all quality checks together

Expand All @@ -187,7 +197,7 @@ The previous command won't modify anything in your codebase. Some fixes (import
make style
```

#### Local deployment
### Local deployment

To run the API locally, the easiest way is with Docker. Launch this command in the project directory:

Expand Down
Loading