Skip to content
This repository has been archived by the owner on Feb 20, 2022. It is now read-only.

Covid backend for notifying possible infected users by specifying infection rules

Notifications You must be signed in to change notification settings

benmezger/covid19-backend-br

Repository files navigation

covid19-backend-br

This application aims to help out people on knowing if they met someone with covid19.

CircleCI Black - Formatter

Setup the Project from Scratch

First of all, make sure you have this:

  • Docker
  • local.env file
  • python 3.7

Then you are ready to start:

  1. Clone the repo and get in the right branch
git clone https://github.com/benmezger/covid19-backend-br.git
git checkout dev
  1. Docker containers:

2.1. If you want to launch both db and web containers:

docker-compose up --build

2.2. If you want to launch just the db container instance and use the web locally:

docker-compose up -d db
  1. If you took the 2.2 option you'll need to install the project requirements:
python3.7 -m venv venv
source venv/bin/activate
pip install -r requirements/dev.txt -r requirements.txt
  1. On another panel:
python src/manage.py runserver

That's it! You can open your application here.

Testing

We have tests for the Python code. The steps to run them are:

  • Activate your virtual environment with your preferred tool. In case you're using pipenv:
source venv/bin/activate
  • Install the requirements with pip
pip install -r requirements/test.txt
  • Run the tests
pytest

You can learn more about pytest features here.

Linting

black .