TigerPath is a web app that helps Princeton University students plan out their four-year course schedules. It began as a COS 333 project by Richard Chu, Barak Nehoran, Adeniji Ogunlana, and Daniel Leung.
You can visit TigerPath at tigerpath.io.
To learn about contributing to TigerPath, take a look at the contributing guidelines.
- Create a new conda environment:
conda create -n tigerpath
- Activate the conda environment:
conda activate tigerpath
- Install python:
conda install python=3.9
- Clone this repo and
cd
into the base TigerPath 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
tigerpath333-dev
app (do NOT use prod!) - 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) - After setting all env vars, reactivate your conda environment:
conda activate tigerpath
- Note that for
SECRET_KEY
, you might get an error so you can set its value to1
- Login to Heroku and go to the Settings tab for the
- Run
conda env config vars list
to validate all env vars were set
- Run
cd frontend && npm install
to install all required frontend packages- You might have to install
node
if you haven't already: https://formulae.brew.sh/formula/node
- You might have to install
After following the initial setup steps above, you can run the local development server:
- Activate your environment:
conda activate tigerpath
- Run the backend server:
python manage.py runserver
- Run the frontend server in a separate terminal window:
cd frontend && npm start
- Visit
http://localhost:8000/
to verify the server is up and running
- Visit
You can do this by running the following commands:
python manage.py makemigrations # Makes migrations based on models.py
python manage.py migrate # Migrates the database
python manage.py tigerpath_get_courses # Scrapes courses and puts them in the database
To load the major mappings fixture, which populates the major table in the database, run the following command:
python manage.py loaddata major_mappings