Skip to content

feat: generalize student timetable parsing - #1

Draft
raulkolaric wants to merge 4 commits into
mainfrom
codex/generalize-student-timetables
Draft

feat: generalize student timetable parsing#1
raulkolaric wants to merge 4 commits into
mainfrom
codex/generalize-student-timetables

Conversation

@raulkolaric

@raulkolaric raulkolaric commented Aug 7, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces repository-specific timetable and subject assumptions with a student-provided timetable parsing flow.

  • Parses semester bounds and class slots from the supplied timetable image; removes the fixed 2026 schedule and hard-coded fallback subjects.
  • Merges consecutive timetable rows for the same subject into a single class interval before event resolution.
  • Reconciles teaching-plan subjects against the parsed timetable catalog; removes course-specific mappings and LMA-only extraction behavior.
  • Fails safely when dates, subjects, or times cannot be resolved, with interactive terminal selection for ambiguous timetable matches.
  • Removes the static ICS campus location and uses the subject name when a timetable does not expose a subject code.
  • Updates provider/input documentation and adds generalized regression coverage.

Validation

  • [pdf] found 1 PDF(s) in '/var/folders/_t/cznf5jbd7452_yjrjhwcy01c0000gn/T/tmpd98g5ite': ['teaching-plan.pdf']
    [pdf] collected 1 labeled document(s)
    [pdf] JSON payload size: 56 chars
    [dates] computing events from 1 fact(s), 2 grid slot(s), semester start 2027-02-01
    [dates] computing events from 1 fact(s), 1 grid slot(s), semester start 2027-02-01
    [dates] fact: Projeto 1 | code=BIO42 | matched 1 slot(s)
    [dates] class #2 on weekdays [0] → 2027-02-08 (estimated)
    [dates] slot: BIO42 13:30:00-15:10:00 (weekday=0)
    [dates] produced 1 event(s)
    [output] writing 1 event(s) to ICS: /var/folders/_t/cznf5jbd7452_yjrjhwcy01c0000gn/T/tmpl242r_1w/events.ics
    [output] ICS written: 344 bytes
    [output] writing 1 event(s) to ICS: /var/folders/_t/cznf5jbd7452_yjrjhwcy01c0000gn/T/tmp6l4ewhl4/events.ics
    [output] ICS written: 378 bytes
    [dates] computing events from 1 fact(s), 1 grid slot(s), semester start 2027-02-01

All 24 tests pass.

- grid.py: parse and validate student-specific timetable slots and semester bounds\n- llm.py: reconcile extracted subjects against the parsed timetable\n- dates.py: require explicit resolution for unmatched subjects and times\n- output.py: remove the hard-coded campus location from ICS output\n- main.py: add interactive subject/time selection and user-facing failures\n- docs and tests: document the dynamic workflow and cover generalized behavior
- grid.py: combine adjacent slots for the same subject into one class block\n- test_generalization.py: cover consecutive timetable rows from one class session
- dates.py: use the only subject timetable slot when an explicit date falls on another weekday\n- test_generalization.py: cover automatic resolution for a single available slot
Extract calendar-scoping context from the teaching-plan Markdown content and preserve missing values as blank instead of prompting the student.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant