Skip to content

feat: serving "off"/closed dining periods#338

Draft
matt-franklin225 wants to merge 5 commits intomainfrom
dining-serve-closed-periods
Draft

feat: serving "off"/closed dining periods#338
matt-franklin225 wants to merge 5 commits intomainfrom
dining-serve-closed-periods

Conversation

@matt-franklin225
Copy link
Contributor

Description

UCI dining provides data on when various schedules are "off", which occurs when no regular schedule takes place on a certain day. Since the dining halls are closed on these days, we did not previously provide data for these days, meaning that all "off" days were skipped over. However, as mentioned in #332, PeterPlate's Figma is calling for such closed periods to be served.

To do this, the parseOpeningHours function in util.ts in apps/data-pipeline/dining-scraper has been adjusted such that, instead of skipping "off" periods, they are instead returned with a startTime and endTime of null (which is a breaking change, as these fields were previously not nullable and now are). Invalidly formatted date/time entries will still be filtered out.

Related Issue

This will close #332

Motivation and Context

As previously mentioned, PeterPlate wants our API to return data on which days are closed, and these days are represented by the "off" periods.

How Has This Been Tested?

The changes were initially tested locally to efficiently run through test cases, then was used for a standard run-through of the dining scraper to make sure it didn't break any previously working code.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code involves a change to the database schema.
  • My code requires a change to the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dining: serve "missing"/closed periods

1 participant