Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.
Ceasar edited this page Nov 28, 2011 · 9 revisions

PCR API Schema

Course Review Pipeline

Instructions to update the PCR API database

  1. Change your directory to Penn-Course-API/scripts
  2. Run "python download.py"
    • This scrapes the registrar, cleans up the data, and dumps it into /registrardata.
  3. Run "python uploadcourses.py YEAR SEMESTER registrardata/*.txt"
    • uploadcourses.py [YEAR] [SEMESTER] [*FILES] parses the data scraped from download.py and uses it to update the PCR API database.
    • SEMESTER accepts either 'a', 'b', or 'c'
    • (ie, run "python uploadcourses.py 2009 a registrardata/econ.txt")
    • Since the registrardata changes every year, YEAR should be the current year, and SEMESTER the current semester.
  4. Run "python import_from_pcr.py YEAR SEMESTER"
    • import_from_pcr.py [YEAR] [SEMESTER] reads from an external database-- assumed to have the original PCR records --and creates or updates course and review data in the new PCR API database.
    • (This can take a while.)
Clone this wiki locally