File Formats

Road File

The FireRoad road file (.road file extension) uses a JSON format to specify a user's majors and minors, selected courses, and progress assertions (also known as substitutions or overrides). Each file is a JSON object containing the following keys:

coursesOfStudy

A list of majors and minors that the user has added (e.g. major6, girs). Each course of study corresponds in name to a requirements list.

selectedSubjects

A list of selected subjects, specifying basic information about the subject and when it appears in the road. Each subject is a JSON object with the following keys:

  • subject_id - the subject ID (e.g. "6.009")
  • title - the subject title (e.g. "Fundamentals of Programming")
  • units - the total number of units provided by this subject
  • semester - the semester number in which this subject is placed. The semester numbers are zero-indexed, with the order as follows: Previous Credit, Freshman Fall, Freshman IAP, Freshman Spring, ... , Senior Spring
  • overrideWarnings - A boolean indicating whether the prereq/coreq and not-offered warnings should be hidden for this subject.
Notes:
  1. The information contained in each subject is intentionally redundant so that the road file can be displayed in a preliminary way without loading the entire course database.
  2. The same subject ID may appear multiple times with different semester numbers, if the user selects the same subject for different semesters.
  3. Subjects in the selected subjects list may be generic courses, which are defined in the native apps' Course model.
progressOverrides

Deprecated - prefer progressAssertions instead. A dictionary mapping requirement IDs to manual progress values. Requirement IDs are '.'-delimited strings that identify a particular requirements statement. For example, major3a.2 specifies the 3rd child of the 3-A major, which is a manual progress requirement defined as ""72 units""{>=72u}. Manual progress values are integers specifying how far the user is toward fulfilling that requirement; the range is determined by the requirements statement. In the previous example, the value may range from 0 to 72.

progressAssertions

A dictionary mapping requirement IDs to progress assertion dictionaries. Requirement IDs are defined as in progressOverrides, while progress assertion values are dictionaries that can contain the given keys, in decreasing order of precedence:

  • override - An integer that specifies an absolute override to the progress of this requirement (equivalent to the old progressOverrides values). This value is in units of subjects or units depending on the threshold criterion of the requirement. The override value will be ignored if the requirement is not a plain-string requirement, or if the requirement does not have an explicitly specified threshold.
  • ignore - A boolean indicating whether to ignore this requirement. If this is true, then the fulfillment status of this requirement should be ignored when computing parent fulfillment statuses.
  • substitutions - A list of subject ID strings. If this key is present, the user is overriding the given requirement by completing this list of courses instead of the published list. This list may be empty, which corresponds to an automatic fulfillment of the requirement.
Example

Below is an example of a road file illustrating the use of progress assertions:

{
  "coursesOfStudy" : [
    "girs",
    "major6-7"
  ],
  "progressAssertions" : {
    // Fulfill independent inquiry with 21M.387
    "major6-2.1.1" : {
      "substitutions" : ["21M.387"]
    },
    // Ignore 6.047 in lab subjects
    "major6-2.1.0.2": {
      "ignore": true
    }
  },
  "selectedSubjects" : [
    {
      "overrideWarnings" : false,
      "semester" : 0,
      "title" : "Generic Physics I GIR",
      "subject_id" : "PHY1",
      "units" : 12
    },
    {
      "overrideWarnings" : false,
      "semester" : 1,
      "title" : "Principles of Chemical Science",
      "subject_id" : "5.112",
      "units" : 12
    },
    {
      "overrideWarnings" : false,
      "semester" : 4,
      "title" : "Fundamentals of Programming",
      "subject_id" : "6.009",
      "units" : 12
    },
    {
      "overrideWarnings" : false,
      "semester" : 4,
      "title" : "Advanced Music Performance",
      "subject_id" : "21M.480",
      "units" : 6
    },
    {
      "overrideWarnings" : false,
      "semester" : 6,
      "title" : "Advanced Music Performance",
      "subject_id" : "21M.480",
      "units" : 6
    }
  ]
}

Schedule File

The FireRoad schedule file (.sched file extension) uses a JSON format to specify a user's selected subjects and sections (e.g. for recitations). Each file is a JSON object containing only one key at the moment:

selectedSubjects

A list of selected subjects, specifying basic information about the subject and its selected sections. Each subject is a JSON object with the following keys:

  • subject_id - the subject ID (e.g. "6.009")
  • title - the subject title (e.g. "Fundamentals of Programming")
  • allowedSections - a dictionary of allowed schedule units, where the keys are the section type (e.g. "lecture", "recitation", "lab", "design"), and the values are lists of schedule unit numbers. This indicates the user-defined constraints on which schedule units can be selected. See below for information about the schedule units.
  • selectedSections - a dictionary of selected schedule units, where the keys are the section type, and the values are single schedule unit numbers. See below for more about the schedule units.

Schedule units. The schedule unit is an internal model type in the FireRoad app, which represents the most granular weekly-repeating unit that a user can select in their schedule. For example, a user can select an 18.03 lecture that takes place MWF at 1pm; this would be represented by a single schedule unit.

The course database defines the schedule units for each subject, which is then internally represented as a dictionary of section types (lecture, recitation, etc.) pointing to lists of schedule units as displayed on the registrar site. Rather than specify the exact times within the document, the schedule JSON file specifies the index of the schedule unit that has been selected/constrained. This allows the document to be robust to changes in the exact times of each section. (If the schedule units list becomes shorter than the index specified, the FireRoad app by default reverts to the first-generated schedule option.)

Example

Below is an example of a schedule file illustrating the use of schedule unit constraints:

{
  "selectedSubjects" : [
    {
      "selectedSections" : {
        "Recitation" : 8,
        "Lecture" : 0
      },
      "title" : "Differential Equations",
      "subject_id" : "18.03",
      "allowedSections" : {
        "Recitation" : [
          0,
          3,
          4,
          7,
          8,
          9
        ]
      }
    },
    {
      "subject_id" : "6.031",
      "selectedSections" : {
        "Lecture" : 0
      },
      "title" : "Elements of Software Construction"
    },
    {
      "subject_id" : "21G.501",
      "selectedSections" : {
        "Lecture" : 1
      },
      "title" : "Japanese I"
    }
  ]
}

Requirements List File

For information about the requirements list file syntax (.reql file extension), see the Requirements Editor.