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

Remove filtering subway predictions by route #663

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

PaulJKim
Copy link
Collaborator

@PaulJKim PaulJKim commented Jul 27, 2023

Summary of changes

Asana Ticket: Investigate removing route-based filtering for predictions

This logic uses the routes fields in the source config for a stop to filter out predictions. This has caused a few instances, most recently for the new GLX stops, where trains that are being predicted in the feed do not show up on countdown clocks because the prediction is technically for a different route. A more specific example is an occasional Green Line B, C, or D train going up to Medford Tufts but not showing up on the countdown clocks because those signs source configs only had Green-E in the routes field.

In cases where there are multiple routes serving a station, there are always separate platform stop_ids that are used for each route (or route(s) for Green Line). JFK/UMass could be a potential special case but again, all platforms at that station have distinct platform stop_ids. Therefore, it should be safe and preferable to remove this filtering logic.

In addition, the historical context of this logic is that it was added to handle splitting out B and C/D predictions at Kenmore when the platform stop_ids were shared. Now we have distinct ones for the Kenmore B platforms so that further supports that we can safely remove the filtering logic #166

Testing done:

  • Deployed temporary logging for when predictions are filtered out by route and there were zero instances a week

@github-actions
Copy link

Coverage of commit 44e0783

Summary coverage rate:
  lines......: 76.4% (1784 of 2334 lines)
  functions..: 76.4% (491 of 643 functions)
  branches...: no data found

Files changed coverage rate:
                                                             |Lines       |Functions  |Branches    
  Filename                                                   |Rate     Num|Rate    Num|Rate     Num
  =================================================================================================
  lib/signs/realtime.ex                                      |95.6%     45|90.9%    11|    -      0
  lib/signs/utilities/source_config.ex                       |95.7%     23| 100%     8|    -      0

Download coverage report

Copy link
Member

@jzimbel-mbta jzimbel-mbta left a comment

Choose a reason for hiding this comment

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

Thanks for the detailed explanation in the PR description! Looks good to me.

@PaulJKim PaulJKim merged commit a144894 into main Jul 28, 2023
1 check passed
@PaulJKim PaulJKim deleted the pk/remove-filtering-subway-predictions-by-route branch July 28, 2023 14:07
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