benmezger / covid19-backend-br

Covid backend for notifying possible infected users by specifying infection rules

Home Page:https://covidapp.ufsc.br/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 .

About

Covid backend for notifying possible infected users by specifying infection rules

https://covidapp.ufsc.br/


Languages

Language:Python 94.8%Language:HTML 4.1%Language:Shell 0.8%Language:Dockerfile 0.2%