SOC sections are filed as Recitations unless the section label contains LEC #39

Open
opened 2026-10-03 19:44:38 +00:00 by jalenluorion · 0 comments
Member

What's wrong
build_events_and_rrules() uses category "Lectures" only when the section label contains LEC, and puts everything else in "Recitations". Most CMU courses have no Lec section at all; their lettered sections (A, B, ...) are the class itself. A dry parse of the Fall 2026 SOC page (2026-10-03) gives:

  • 5,190 events: 273 lectures and 4,917 recitations;
  • 2,267 of 2,478 courses have no Lec section (e.g. 48-025 has only section A), so all their meetings land in "Recitations";
  • section label shapes: one letter (3,955 rows), letter plus digit such as A3 (916, mini sections), Lec/Lec N (274), digits (22), others such as SV, RW, AA (about 60).

How to reproduce
cd api && python -m scraper.scripts.export_soc --semester Fall_26 --dry-run, then count category_key per event in build_events_and_rrules() (or add the counts to dry_run_report()).

Expected
A rule based on the SOC data. Rule to check: a course's lettered sections are recitations only when the course also has a Lec section; otherwise each section is a class meeting (a lecture). Check the rule against a few known courses (a CS course with Lec plus recitations, a single-section seminar, a Tepper mini) before coding it.

Where to look

  • api/scraper/transforms/soc_events.py L31-36 (decision); group_soc_rows() in api/scraper/helpers/event.py gives you all of a course's sections.
  • api/scraper/persistence/supabase_categories.py (category names). category_id is not part of the event identity, so a rerun moves existing events to the right category.
  • Line numbers are from main at 2c5f2e9.

Done when

  • the rule is written in the code comment, with the per-category counts from a dry run in the PR
  • test in api/tests/scraper_events/test_section_category.py (a course with Lec plus A/B, a course with only A/B, a mini A3)
**What's wrong** `build_events_and_rrules()` uses category "Lectures" only when the section label contains `LEC`, and puts everything else in "Recitations". Most CMU courses have no `Lec` section at all; their lettered sections (A, B, ...) are the class itself. A dry parse of the Fall 2026 SOC page (2026-10-03) gives: - 5,190 events: 273 lectures and 4,917 recitations; - 2,267 of 2,478 courses have no `Lec` section (e.g. 48-025 has only section A), so all their meetings land in "Recitations"; - section label shapes: one letter (3,955 rows), letter plus digit such as A3 (916, mini sections), `Lec`/`Lec N` (274), digits (22), others such as SV, RW, AA (about 60). **How to reproduce** `cd api && python -m scraper.scripts.export_soc --semester Fall_26 --dry-run`, then count `category_key` per event in `build_events_and_rrules()` (or add the counts to `dry_run_report()`). **Expected** A rule based on the SOC data. Rule to check: a course's lettered sections are recitations only when the course also has a `Lec` section; otherwise each section is a class meeting (a lecture). Check the rule against a few known courses (a CS course with Lec plus recitations, a single-section seminar, a Tepper mini) before coding it. **Where to look** - `api/scraper/transforms/soc_events.py` L31-36 (decision); `group_soc_rows()` in `api/scraper/helpers/event.py` gives you all of a course's sections. - `api/scraper/persistence/supabase_categories.py` (category names). `category_id` is not part of the event identity, so a rerun moves existing events to the right category. - Line numbers are from main at 2c5f2e9. **Done when** - [ ] the rule is written in the code comment, with the per-category counts from a dry run in the PR - [ ] test in `api/tests/scraper_events/test_section_category.py` (a course with Lec plus A/B, a course with only A/B, a mini A3)
jalenluorion added this to the Phase 1 milestone 2026-10-03 19:44:38 +00:00
jalenluorion added this to the CMUCal project 2026-10-03 19:45:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/cal#39
No description provided.