- 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
cd
into the base TigerStudy directory - Install dependencies:
pip install -r requirements.txt
- If you're running into a
psycopg2
error (pg_config executable not found
), you probably have to installpostgresql
: https://stackoverflow.com/a/24645416
- If you're running into a
- Run
conda list
to validate that all packages inrequirements.txt
were installed. - Set all environment variables:
- Login to Heroku and go to the Settings tab for the
tiger-study
app - Reveal Config Vars
- For each Config Var key-value pair, create a local environment variable:
conda env config vars set key=value
(replacekey
andvalue
with 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 list
to validate all env vars were set.
After following the initial setup steps above, you can run the local development server:
cd
into the main directory- Activate your environment:
conda activate tigerstudy
- In
app.py
, set theLOCAL
,TESTING
, andLOGIN_DISABLED
constants 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