Maysa, Louise, Emily, and Jess K
The COVID calculator is an application that allows users to put in location information and returns data about COVID rates using an API and database. The COVID calculator gives the user simple advice to follow to reduce their risk of catching COVID based on risk. Also, it compares local rates to nationwide rates to give users some context to their local rate.
- Create database by running SQL file
- Download source code
- Run "main.py" from source code
- Create an account or sign-in
- Choose an area type and an area name: list of areas
- Find out how likely you are to get COVID
Go to the frontend branch in the team-5 repo.
git checkout frontend
- Export environment variables to shell in terminal
export RUN_ENV=WEB
export WEB_PASSWORD = "insert sql password here"
- Run Backend
cd /src
uvicorn main_server:app
- Run Frontend
cd /src/js/covid-calc
npm start
File | Description |
---|---|
main.py | Runs the program |
API.py | Connects to the API and fetches COVID rate info |
predict.py | Predicts what area name user desires |
dbconfig.py | Holds SQL login details |
dbconnection.py | Connects to SQL database |
dbutils.py | Modifies population and account info in SQL database |
hashing.py | Hashes passwords |
Population.py | Allows user to access population database info |
login.py | Allows user to login/create account |
area_advice.py | Gives user government advice for their nation |
save_search.py | Saves location and risk from previous search |
yes_no_input.py | Returns True for "y" and False for "n" |
main_server | Runs web server |
To run unit tests in PyCharm please follow these steps:
- In PyCharm right click on Source_code --> Mark Directory as --> Sources Root
- In PyCharm right click on Unit_tests --> Mark Directory as --> Test Sources Root
- Right click on Unit_tests --> Run