This application aims to help out people on knowing if they met someone with covid19.
First of all, make sure you have this:
Docker
local.env
filepython
3.7
Then you are ready to start:
- Clone the repo and get in the right branch
git clone https://github.com/benmezger/covid19-backend-br.git
git checkout dev
- 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
- 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
- On another panel:
python src/manage.py runserver
That's it! You can open your application here.
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.
black .