Skip to content

feat: store room capacity from 25live and publish it in the reports csv - #538

Merged
jaspermayone merged 1 commit into
mainfrom
room-capacity-from-25live
Aug 19, 2026
Merged

feat: store room capacity from 25live and publish it in the reports csv#538
jaspermayone merged 1 commit into
mainfrom
room-capacity-from-25live

Conversation

@jaspermayone

Copy link
Copy Markdown
Member

What

25Live already reports max_capacity on the spaces endpoint we call. sync_spaces read the space ID and the formal name and dropped the capacity. This keeps it.

  • New rooms.capacity column, with a check constraint that it is null or positive.
  • sync_spaces writes max_capacity to the room. A capacity of 0 means 25Live has no count, so the room stays unknown.
  • Capacity refreshes on every sync, unlike the ID and the formal name, which are set once. A rebuilt room changes its seat count.
  • New room_capacity column at the end of /reports/meeting_times.
  • TwentyFiveLiveSyncJob now runs every Saturday at 2:30am. It was not scheduled before, so nothing kept the 25Live data current.

Why

The reports CSV had section enrollment caps but no room capacity. A section cap tells you how many students the registrar allowed, not how many seats the room holds. Professor Mixer asked for room utilization, and that question needs the real capacity.

Coverage

Measured against the live 25Live response and the schedule:

count
Spaces in 25Live 234
Rooms used in Fall 2026 118
...that get a capacity 116
The 2 misses ONLINE 0 and TBD 0, which are not rooms

Sanity check: for 106 of 116 rooms the 25Live capacity is at or above the largest section cap ever scheduled there. The 10 rooms below are combinable spaces, for example CEIS 414A and CEIS 414B, which the registrar books as one room.

Deploy

The migration runs on start through db:prepare. Room capacities stay null until TwentyFiveLiveSyncJob runs.

flowchart LR
  A[25Live spaces.json] -->|max_capacity| B[TwentyFiveLiveSyncJob]
  B --> C[(rooms.capacity)]
  C --> D[/reports/meeting_times]
  D --> E[Excel / Power BI]
Loading

@jaspermayone jaspermayone added the migration Includes a database migration label Aug 19, 2026
@jaspermayone
jaspermayone merged commit 04053fe into main Aug 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

migration Includes a database migration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant