Feat/room blockout#105
Open
ekremarmagankarakas wants to merge 4 commits into
Open
Conversation
Room blockout CSV support:
- RoomBlockoutSchema and RoomBlockoutAdapter with flexible day/block
parsing (accepts integers or named values like 'Monday', '9AM-11AM')
- room_blockouts field on SchedulingDataset; DatasetFactory accepts
optional blockouts_df
- _assign_rooms skips blocked rooms and tracks unroomed courses in
ScheduleResult.unassigned so unplaced_exams count is accurate
- API route and DatasetService accept optional room_blockouts file
- Precompute blockout_slots into file_paths JSONB metadata at upload
time so schedule retrieval never re-reads from S3
- Frontend: optional upload slot with badge, store, and API support
- Tests: adapter parsing, scheduler enforcement, end-to-end pipeline
Merge group scheduling fix:
- Replace weight-9999 edge hack with DSATUR graph contraction — edges
mean must-be-different-color so the old approach prevented merged
courses from sharing a slot rather than guaranteeing it
- Contract each merge group into a virtual node, union external edges,
expand colors back after coloring
- Sum soft-constraint penalties across all CRNs in a group during slot
selection so back-to-back and load costs reflect the full group
- Add algorithm correctness test suite (coloring validity, no hard
conflicts, merge invariants, determinism)
Other:
- Run scheduler in asyncio.to_thread (CPU-bound work was blocking the
event loop)
- Make instructor, department, and term optional in course schema so
datasets missing these fields upload successfully
- Pass per-slot blocked room counts through schedule API response
(blockouts field on both generate and retrieve endpoints)
- CompactView shows blocked room badge per calendar cell
- DensityView shows blocked room badge alongside conflict badges
- StatisticsView shows blockout stats card (rooms constrained, total
blocked slots) when blockouts are present
- Extract extractTimeFromBlock to shared utils.ts, removing duplicate
implementations in both calendar views
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.
Summary
Room blockout CSV support:
parsing (accepts integers or named values like 'Monday', '9AM-11AM')
optional blockouts_df
ScheduleResult.unassigned so unplaced_exams count is accurate
time so schedule retrieval never re-reads from S3
Merge group scheduling fix:
mean must-be-different-color so the old approach prevented merged
courses from sharing a slot rather than guaranteeing it
expand colors back after coloring
selection so back-to-back and load costs reflect the full group
conflicts, merge invariants, determinism)
Frontend:
(blockouts field on both generate and retrieve endpoints)
blocked slots) when blockouts are present
implementations in both calendar views
Other:
event loop)
datasets missing these fields upload successfully