Install:
- Python 3, at least Python 3.6.
- Node.js 16, at least Node 16.16.
- My favorite way is through nvm.
In the root directory, run:
pip install -r requirements.txt
to install dependencies.npm install
to install dependencies.
- To update schedules, run
python update.py
. This runs three steps:python scrapers/coursews.py
to get the class schedules.python scrapers/catalog.py
to get the class descriptions.python scrapers/package.py
to bundle schedules, descriptions, and evaluations into ajson
file.
- To update evaluations, run
python update_evals.py
. - To update the frontend, run
npm build
. Then run./deploy.sh
or something.- You can run
npm start
for the frontend hotloader.
- You can run
Let's say you're updating from e.g. IAP 2022 to Fall 2022.
- First, archive the old semester:
- Run
npm build
. - Run
mkdir -p public/semesters/i22/static
. - Run
cp -r build/static/. public/semesters/i22/static
. - Run
cp build/full.json public/semesters/i22/full.json
. - Run
cp build/index.html public/semesters/i22/iap.html
.
- Run
- Then, update the new semester:
- Open
public/latestTerm.json
. - Change
urlName
tof22
.
- Open
- After running
npm build
, copy everything inbuild
to e.g.public/semesters/i22
for IAP 2022. - Rename
public/semesters/i22/index.html
toiap.html
. - Update
public/latestTerm.json
for the new semester. For example, for Fall 2022: - Run the normal update process:
python update.py && npm build
.
I want to change...
- ...the data available to Firehose.
- The entry point is
scrapers/update.py
(andupdate_evals.py
for evaluation data). - This goes through
src/components/App.tsx
, which looks for the data. - The exit point is through the constructor of
Firehose
insrc/lib/firehose.ts
.
- The entry point is
- ...the way Firehose behaves.
- The entry point is
src/lib/firehose.ts
. - The exit point is through
src/components/App.tsx
, which constructsFirehose
and passes it down.
- The entry point is
- ...the way Firehose looks.
- The entry point is
src/components/App.tsx
. - We use Chakra UI as our component library. Avoid writing CSS.
- The entry point is
Try to introduce as few technologies as possible to keep this mostly future-proof. If you introduce something, make sure it'll last a few years. Usually one of these is a sign it'll last:
- some MIT class teaches how to use it
- e.g. web.lab teaches React, 6.102 teaches Typescript
- it's tiny and used in only a small part of the app
- e.g. msgpack-lite is only used for URL encoding, nanoid is only used to make IDs
- it's a big, popular, well-documented project that's been around for several years
- e.g. FullCalendar has been around since old Firehose, Chakra UI has a large community