cd ./api && pip3 install --no-cache-dir -r requirements.txt
Numpy (pip install numpy)
Pandas (pip install pandas)
Django (pip install django)
Django rest framework (pip install djangorestframework)
Django pandas (pip install django_pandas)
Django rest multiple models (pip install django-rest-multiple-models)
psycopg2 (pip install psycopg2)
Shapely (pip install Shapely)
Geopandas (some of it’s pre-requirements) (pip install geopandas)
There may arise some problems\errors while installing geopandas, check if versions match the ones in ./api/reqirements.txt
In this case download the latest, compatible GDAL .whl file (Ex. if your OS is windows 64 bit, and if your python version is 3.6, download GDAL-3.0.4-cp36-cp36m-win_amd64.whl) from this website: https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
Run :
pip install /path/to/GDAL-***.whl
Repeat the above steps for Fiona:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona
Now Run:
pip install geopandas
Install in one go : cd ./containers/postgres && ./start_postgres.sh
Perequisites: Should have docker installed in the system, should know/set the db password
Download the package from this website: https://www.postgresql.org/download/
Click on the download the installer and click on the latest version for your OS to download.
Run the installer. Select all the packages to be installed.
While the installer runs it asks for a password setup for the superuser: postgres
Default we are using spotcorona
. Do not use this in a production environment
Complete the installation
Open pgAdmin from start menu.
Once it opens in the web browser, Authorize with your password.
In the browser panel on the left, right click on Databases and create a new database with the name: corona_project.
You would not see any tables yet because they havent been populated from the django project.
Export the password using export DB_PASSWORD=your_password
for the next step.
Install in one go : cd ./containers/server && ./start_server.sh
ssh -i covidkey.pem ubuntu@52.66.156.232
and git clone https://github.com/GoCorona-org/Backend.git. Else skip this step.python manage.py makemigrations corona_app
python manage.py sqlmigrate corona_app 0001_initial
python manage.py migrate
After this you can check the corona_project database/schemas/tables in the pgAdmin if installed. Right click and refresh. you can see the corona_app_coronaapp and corona_app_medicalmap tablespython manage.py runserver
The reference doc for the Backend API is https://github.com/GoCorona-org/Backend/blob/master/docs/swagger.yaml ( swagger.yaml in docs folder)
Copy paste the yaml files into https://editor.swagger.io/ to view the api.