These steps are for Macbook, pasted in this to GPT to transfer for other OS.
-
If you don't have it, best advice is to chatgpt "install miniconda" on whatever hardware you are on
1.1 Can also use the commands to install miniconda on https://docs.anaconda.com/miniconda/#miniconda-latest-installer-links
1.2 If anaconda3 is intalled, can use anaconda3 instead of miniconda
-
Once installed, run conda 'env create -f environment.yml' in the Transit_Dashboard directory
-
That should create the python virtual environment, where you can run 'conda activate transit-env'
-
When working on any notebooks in this repository, make sure to select this environment kernel
- Run 'python setup.py' in the main directory to get your path (or just get it manually)
- Create a string like this with your printed path
export PYTHONPATH="${PYTHONPATH}:/Users/username/Projects/TRANSIT_DASHBOARD/src"
i.e for myself
export PYTHONPATH="${PYTHONPATH}:/Users/user/Documents/Capstone/Transit_Dashboard/src"
-
Run 'nano ~/.zshrc' and add the above string to the bottom of the file
3.1 if not have premission run 'sudo nano ~/.zshrc' and enter password
-
Save the file (CTRL + X, Y, then ENTER)
-
Run 'source ~/.zshrc'
-
Run 'echo $PYTHONPATH' to check if python path set correctly
FRONTEND SETUP
- In a new terminal, 'cd frontend/transit-dashboard/'
- Run 'bash setup.sh', and follow instructions (download nvm if neccessary)
- Run 'npm install'
FRONTEND RUN
- Run 'python -m http.server 8080' in the Transit_Dashboard directory
- In a new terminal, 'cd frontend/transit-dashboard/'
- Run 'npm start'