The aim of this repository is to put into practice some best practices regarding code Quality Assurance, like testing and static analysis.
A few things regarding Django specifically will also be addressed, like overriding the default User model and using this new model as default User validation model.
The creation of abstract models as a base model will also be addressed in this repository.
As for the API, its structure will be created with the help of Django Rest Framework.
A git pre-commit hook can be created by running the following command on terminal
make create-pre-commit
This hook will run tests and linting before the commit.
For testing run the following command
make test
Linting will be executed by using pylint
. Run the following command on terminal.
pylint --rcfile=.pylintrc --django-settings-module=core.settings */
Or alternativally, execute the following.
make lint
To build docker images, run the following command
make build
To bring the containers up, run the following command
make up-containers
With the containers running up, execute the following command
docker exec -it web python manage.py test
To shut the containers down, run the following command
make down-containers