Skip to content

Commit

Permalink
Update field names in fireroad.py comments
Browse files Browse the repository at this point in the history
Following the changes to RawClass field names in #37 and #83.
  • Loading branch information
psvenk committed Dec 13, 2024
1 parent 4434312 commit db5a029
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scrapers/fireroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,17 @@ def get_course_data(courses, course):
# TODO: Do something else with this?
return False

# tb, s, l, r, b, lr, rr, br
# tba, sectionKinds, lectureSections, recitationSections, labSections,
# designSections, lectureRawSections, recitationRawSections, labRawSections,
# designRawSections
try:
raw_class.update(parse_schedule(course))
except Exception as e:
# if we can't parse the schedule, warn
print(f"Can't parse schedule {course_code}: {e!r}")
return False

# hh, ha, hs, he, ci, cw, re, la, pl
# hassH, hassA, hassS, hassE, cih, cihw, rest, lab, partLab
raw_class.update(parse_attributes(course))
raw_class.update(
{
Expand All @@ -251,13 +253,14 @@ def get_course_data(courses, course):
"meets": ", ".join(course.get("meets_with_subjects", [])),
}
)
# This should be the case with variable-units classes, but just to make sure.
# This should be the case with variable-units classes, but just to make
# sure.
if raw_class["isVariableUnits"]:
assert raw_class["lectureUnits"] == 0
assert raw_class["labUnits"] == 0
assert raw_class["preparationUnits"] == 0

# t, pr
# terms, prereqs
raw_class.update(parse_terms(course))
raw_class.update(parse_prereqs(course))

Expand All @@ -271,7 +274,7 @@ def get_course_data(courses, course):
}
)

# nx, rp, u, f, hf, lm are from catalog.json, not here
# nonext, repeat, url, final, half, limited are from catalog.json, not here

if "old_id" in course:
raw_class["oldNumber"] = course["old_id"]
Expand Down

0 comments on commit db5a029

Please sign in to comment.