Repository navigation
Live dining hall hours from UMD's published schedule - #42
Open
aleczzhang wants to merge 5 commits into
Open
aleczzhang wants to merge 5 commits into
aleczzhang wants to merge 5 commits into
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.
Summary
Dining hall hours were hardcoded to one week ("4/27–5/3"), so the app showed halls as open on breaks (e.g. Yahentamitsi during fall break, Oct 10–12). This serves UMD Dining's published day-by-day hours and uses them in the app.
Backend
hours.pyfetches the public Google Sheet that dining.umd.edu/hours/open-now reads, parses each hall × meal × date, and caches it (refreshes at most hourly; keeps the last good copy if Google fails, retries after 5 min).GET /api/hours?start=YYYY-MM-DD&days=N(defaults: today on campus, 14 days; max 60).[]for a date = closed all day; a missing date = unknown. 503 only if the sheet has never loaded.App
HallHoursServicefetches 21 days, caches to UserDefaults for offline, refreshes when the hall picker appears (at most hourly).Notes
deploy-api.yml); the app falls back to the hardcoded hours until/api/hoursis live.fix/empty-state-swipe-dining-hall-jump; theirHomeView.swiftchanges don't conflict.Testing
tests/test_hours.py; full suite 179 passed; ruff clean.HallHoursTests); full app suite passed.