- Create a new conda environment:
conda create -n tigerstudy - Activate the conda environment:
conda activate tigerstudy - Install python:
conda install python=3.10 - Clone this repo and
cdinto the base TigerStudy directory - Install dependencies:
pip install -r requirements.txt- If you're running into a
psycopg2error (pg_config executable not found), you probably have to installpostgresql: https://stackoverflow.com/a/24645416
- If you're running into a
- Run
conda listto validate that all packages inrequirements.txtwere installed. - Set all environment variables:
- Login to Heroku and go to the Settings tab for the
tiger-studyapp - Reveal Config Vars
- For each Config Var key-value pair, create a local environment variable:
conda env config vars set key=value(replacekeyandvaluewith the actual key and value) - For each env var you set, reactivate your conda environment:
conda activate tigerstudy
- Login to Heroku and go to the Settings tab for the
- Run
conda env config vars listto validate all env vars were set.
After following the initial setup steps above, you can run the local development server:
cdinto the main directory- Activate your environment:
conda activate tigerstudy - In
app.py, set theLOCAL,TESTING, andLOGIN_DISABLEDconstants toTrue. - Run the server:
export FLASK_DEBUG=1 && flask run- Visit
http://localhost:5000/to verify the server is up and running. - In debug mode, the server auto-restarts when changes are made to its code.
- Visit