fix: always show route_pattern_prefix_overrides trips #685
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 of changes
Asana Ticket: [extra] 🐛🍎 API: Ashland stop disappeared on the Worcester Line
I lost my mind debugging this, but we were missing a case where a valid "canonical override" trip was falsely being flagged as
non-canonical
because it ended up in a list that was not checked against the configuration value.This logic (and perhaps the approach overall) for assigning stops to routes seems like it may be overcomplicated for what we are trying to do. It may even make sense to have a hard coded source of truth that we conditionally override vs. reverse engineering stops from trips in the future.
Asana Ticket: 🍎 Update merge_ids logic for StopsOnRoute
For this (
Boat-F6
), I am suggesting that we just whack the hardcoded configuration - from my understanding of the code, the output we are currently seeing is correct. For reference, locally I am seeing:NOT SPECIFIED:
Boat-Aquarium
,Boat-Fan
,Boat-Quincy
,Boat-Winthrop
,Boat-Logan
INBOUND:
Boat-Winthrop
,Boat-Quincy
,Boat-Logan
,Boat-Fan
,Boat-Aquarium
OUTBOUND:
Boat-Aquarium
,Boat-Fan
,Boat-Quincy
,Boat-Winthrop
According to the PDF schedule and my reading of the static schedule in GTFS, that is correct: https://cdn.mbta.com/sites/default/files/media/route_pdfs/2023-10-02-winthrop-ferry-weekday-schedule-effective-through-november-30-2023.pdf
I have removed the overrides as they state Logan is in both directions, which conflicts with this paper schedule.
Some extra context can be found here, though honestly stepping through this code with a debugger gave me a better understanding than anything else 💫