SOC class occurrences are generated on holidays and breaks #38
Labels
No labels
bug
chore
data
feature
frontend
good first issue
intermediate
needs/docs
needs/research
needs/upstream
type/bug
type/external
type/feature
type/refactor
urgency
high
urgency
immediate
urgency
low
urgency
medium
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
ScottyLabs/cal#38
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What's wrong
SOC classes become one weekly RRULE from semester start to end, with no exception dates. Nothing in the scraper or in the occurrence expansion knows about university holidays or breaks, so classes show up on them. On prod, about 1,900 Spring 2026 occurrences fall on Spring Break days, and Fall 2026 will show classes during Fall Break and Thanksgiving.
How to reproduce
On prod (read-only), with the break dates from https://www.cmu.edu/hub/calendar/:
Expected
No SOC occurrence on a day without classes in CMU's academic calendar.
Where to look
api/scraper/helpers/semester.py:SEMESTER_CONFIGonly has start and end dates. Add per-semester no-class dates here (checked against the HUB calendar each year).api/scraper/helpers/recurrence.pybuild_rrule_from_parts()andapi/scraper/transforms/soc_events.py: rules are built here.api/scraper/persistence/supabase_recurrence.py: rules are deleted and reinserted every run, andrecurrence_exdatesrows cascade with them, so write the EXDATEs after the rules on every run.api/app/models/event_occurrence.py_build_occurrence_rows()L321: an EXDATE must equal the occurrence start exactly (same local time in the event's timezone).2c5f2e9.Done when
python -m scraper.scripts.export_soc --semester Fall_26removes Fall Break and Thanksgiving occurrencesapi/tests/scraper_events/test_no_class_dates.pythat expands a MWF class and checks no break day is generated