open-cmuq / schedule-genius

Schedule Genius aims to make course planning easier for students and for professors by focusing on whats important
MIT License
1 stars 4 forks source link

Proposal: Standardized Course and Schedule format #1

Open tvlpirb opened 6 months ago

tvlpirb commented 6 months ago

Introduction

A standardised format for representing the schedule of classes is needed for maintaining stability and easing maintainability. It's easier to account for special cases when they're in the correct format and any data sources such as the SOC, Jarrin's excel sheet and other scrapers should be made to conform to the format.

From a students perspective, we're improving on the https://enr-apps.as.cmu.edu/open/SOC/SOCServlet page and would be an advanced drop in replacement for it. That means we need also need to consider auxiliary information about courses as well such as the description.

Format Requirements

Proposed JSON format

A JSON format would work really well with a web frontend since its easy to create into javascript objects and also to deal with in a python backend. Dealing with intricacies such as multiple sections is also made easier by adding them to a sections array.

The format is simple but the following rules are in place:

{
  "semester_name": "Fall 2024 Students",
  "semester_shortcode": "F24",
  "last_update": "2024-05-19T14:35:46.960741+00:00",
  "ID": ,
  "courses": [
    {
        "course_code": "03151",
        "course_title": "Honors Modern Biology",
        "units": "10",
        "description": "REMOVE FOR BREVITY",
        "prereqs": "None",
        "coreqs": "None",
        "sections": [
          {
            "section_type": "Lecture",
            "section_id": "Lec 2",
            "timings": {
              "days": [
                "UTR"
              ],
              "begin": "10:00AM",
              "end": "10:50AM",
              "teaching_location": "Doha, Qatar",
              "delivery_mode": "In-person Expectation",
              "instructor": [
                "Affara, Nesrine"
              ]
            }
          },
          {
            "section_type": "Recitation",
            "section_id": "W",
            "timings": {
              "days": [
                "R"
              ],
              "begin": "03:45PM",
              "end": "05:35PM",
              "teaching_location": "Doha, Qatar",
              "delivery_mode": "In-person Expectation",
              "instructor": [
                "Affara, Nesrine"
              ]
            }
          }
        ]
      }
   ]
}
tvlpirb commented 6 months ago

Currently the plan is to store the data on the clients side for speed and since it isn't too much data we can deal with it locally. The format should also be friendly then to work with IndexedDB, I'm not sure if the current proposed format is friendly with it or not yet.