feat: store room capacity from 25live and publish it in the reports csv - #538
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
25Live already reports
max_capacityon thespacesendpoint we call.sync_spacesread the space ID and the formal name and dropped the capacity. This keeps it.rooms.capacitycolumn, with a check constraint that it is null or positive.sync_spaceswritesmax_capacityto the room. A capacity of 0 means 25Live has no count, so the room stays unknown.room_capacitycolumn at the end of/reports/meeting_times.TwentyFiveLiveSyncJobnow 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:
ONLINE 0andTBD 0, which are not roomsSanity 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 414AandCEIS 414B, which the registrar books as one room.Deploy
The migration runs on start through
db:prepare. Room capacities stay null untilTwentyFiveLiveSyncJobruns.