Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: filter cancelled & skipped departures #2174

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

sloanelybutsurely
Copy link
Contributor

Parses the schedule_relationship field for Predictions and uses that data to remove departures with a SKIPPED or CANCELLED schedule relationship when merging Predictions and Schedules.

Some Predictions now have a SKIPPED schedule relationship AND arrival/departure times (indicating what time the vehicle is predicted to pass through the stop). These Predictions need to be filtered out when we fetch departures. Previously these didn't have times so our other filtering logic would remove them.

For completeness we are also filtering out Predictions with a CANCELLED schedule relationship.

Asana task: Filter out cancelled/skipped departures on Screens

Parses the `schedule_relationship` field for `Predictions` and uses that
data to remove departures with a SKIPPED or CANCELLED schedule
relationship when merging `Prediction`s and `Schedule`s.

Some Predictions now have a SKIPPED schedule relationship **AND**
arrival/departure times (indicating what time the vehicle is predicted
to pass through the stop). These Predictions need to be filtered out
when we fetch departures. Previously these didn't have times so our
other filtering logic would remove them.

For completeness we are also filtering out Predictions with a CANCELLED
schedule relationship.
@sloanelybutsurely sloanelybutsurely requested a review from a team as a code owner August 29, 2024 18:23
Copy link
Contributor

@digitalcora digitalcora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@sloanelybutsurely sloanelybutsurely merged commit ee539a3 into main Aug 29, 2024
13 checks passed
@sloanelybutsurely sloanelybutsurely deleted the sloane/push-tzpklpnruvzv branch August 29, 2024 18:31
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.

2 participants