Loading the Database¶
To load the database you must ingest (create the course JSON), validate (make sure the data makes sense), and digest (load the JSON into the database). You can do so using the following commands:
If you have ingested before and still have the JSON file on your device, you may skip ingesting and simply digest the old data. This is useful if you are resetting your database during development and wish to quickly reload course data.
python manage.py ingest [SCHOOLCODE]
You may leave out the school code to parse all schools. This will run for a substantial amount of time and is not recommended.
To parse JHU data, you will need to acquire an API access key from SIS. Add the key to
dev_credentials.py in the
semesterly/ directory. Also, note that the [SCHOOLCODE] is
python manage.py digest [SCHOOLCODE]
You may leave out the school code to digest all schools.
Learn More & Advanced Usage¶
There are advanced methods for using these tools. Detailed options can be viewed by running
python manage.py [command] --help
For example, you can use the term and year flags to parse only a specific term
python manage.py ingest [SCHOOLCODE] --term Fall --years 2021