Skip to content

Commit 9247667

Browse files
tangmc0210claude
andcommitted
docs(timetable): as-built notes for the agenda endpoint and source toggles
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012t4BD5H1P5nn2zF7oU6q9e
1 parent beb5121 commit 9247667

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

timetable/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,20 @@ Mini-program:
810810
- Export: the settings section explains that the ICS subscription follows
811811
the same four source toggles.
812812
813+
Implementation notes (as built): sources gained an optional
814+
`occurrences_between(person, span: DateSpan, settings)`; `DateSpan`
815+
(`timetable/sources/base.py`) resolves the active terms for a date range
816+
once and is shared by all sources; term-based sources fall back to a default
817+
implementation. For dates outside any term `Occurrence.week` is counted
818+
relative to the latest started term (0 when there is none) while
819+
`AgendaDay.week` stays null. `days` above 14 is truncated (not an error);
820+
`days < 1`, non-integers and a malformed `from` answer 400; empty values
821+
mean "omitted"; with no term at all `agenda/` still answers 200 with
822+
`term: null` days. In date mode 书院课 are taken from every successful,
823+
non-aborted enrolment and selected by date (week mode still filters by the
824+
YPPF semester). `show_courses` also silences class reminders for school
825+
courses, like the other three toggles do for theirs.
826+
813827
## 7. Verification
814828
815829
- Backend: `python manage.py test pku_account timetable api.pku_account api.timetable`

0 commit comments

Comments
 (0)