Skip to content

feat(studip): import the timetable directly from Stud.IP - #52

Merged
502Proxy merged 5 commits into
mainfrom
feat/studip-timetable
Oct 28, 2026
Merged

502Proxy merged 5 commits into
mainfrom
feat/studip-timetable

Conversation

@502Proxy

Copy link
Copy Markdown
Owner

Closes #42

What changes and why?

The timetable can come straight from Stud.IP instead of a calendar link. One commit per layer:

  1. Domain: StudIPScheduleService port, calendar source kind .studIP, SyncStudIPTimetableUseCase – dates of linked active modules (30 days back, 240 ahead), linked to the module, „Entfällt: …“ for cancelled dates, stable IDs from the Stud.IP date ID; a failing module keeps its stored dates.
  2. Data: GET courses/{id}/events, lenient parser (start/end or begin, location or room, is-cancelled); StudIPHTML turns descriptions into text (the same file is in feat(studip): show course announcements #51, so the branches merge cleanly).
  3. Sync + setting: Settings → Stundenplan → „Termine verknüpfter Stud.IP-Veranstaltungen übernehmen“ (off by default, to avoid doubled dates for users who subscribe to the Stud.IP calendar link). A full Stud.IP sync then imports the dates and the calendar reloads.
  4. Docs: STUDIP.md

Note

Route and attribute names follow the Stud.IP JSON:API; I could not reach a Stud.IP server from my environment, so please check with real courses. #51 (announcements) also touches StudIPViewModel and AppContainer; whichever merges second, I will resolve the conflict.

Tests

  • SyncStudIPTimetableTests (import, refresh, cancelled/window, failing module, no source without links, expired session)
  • Parser tests, StudIPHTMLTests, setting on/off through StudIPViewModel
  • 173 tests pass locally (Linux subset); SwiftLint clean

Checklist

  • Linked issue, labels and milestone set
  • New logic has tests
  • Tried with real Stud.IP courses
  • Release notes: collected in the 1.12 release PR

Generated by Claude Code

A StudIPScheduleService port delivers the dates of a course and a new
calendar source kind „studIP“ holds them. SyncStudIPTimetableUseCase
imports the dates of linked active modules (30 days back, 240 ahead),
links them to their module, marks cancelled dates and gives stable IDs
so refreshes update instead of duplicating. A module that fails to
load keeps its stored dates.

Refs #42

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
The client reads courses/{id}/events and conforms to the new
StudIPScheduleService port; the parser accepts start/end or begin and
location or room, and marks cancelled dates. HTML descriptions become
plain text through StudIPHTML. The calendar sources sheet shows the
Stud.IP source with its own symbol.

Refs #42

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
New setting „Termine verknüpfter Stud.IP-Veranstaltungen übernehmen“
(Stundenplan, off by default so subscribed Stud.IP calendars are not
doubled). When it is on, every full Stud.IP sync imports the dates of
linked modules into the calendar source „Stud.IP“ and the calendar
reloads.

Refs #42

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
Refs #42

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmmqmKmX8VDSfoPbzTS1ew
@502Proxy 502Proxy added this to the 1.12 milestone Oct 28, 2026 — with Claude
@502Proxy 502Proxy added enhancement New feature or improvement area: calendar Timetable, calendar subscriptions and events area: studip Stud.IP sign-in, sync and course files labels Oct 28, 2026 — with Claude
# Conflicts:
#	App/AppContainer.swift
#	App/StudyAppApp.swift
#	Data/StudIP/StudIPJSONAPIParser.swift
#	Presentation/StudIP/StudIPViewModel.swift
#	docs/STUDIP.md

Copy link
Copy Markdown
Owner Author

CI: „Build & Tests (macOS)“ hängt mit „The test runner hung before establishing connection“. Das passiert seit den Merges von #50/#51/#54/#56 auch auf main (fd5824c), also nicht wegen des Stundenplans aus diesem PR. Ich grenze die Ursache gerade über die laufenden CI-Läufe ein (Issue #60, PR #61). Einen Fix gibt es noch nicht.


Generated by Claude Code

@502Proxy
502Proxy merged commit c01bb13 into main Oct 28, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: calendar Timetable, calendar subscriptions and events area: studip Stud.IP sign-in, sync and course files enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(studip): import the timetable directly from Stud.IP

2 participants