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

feat: cancel trips with a boarding status of Canceled #364

Merged
merged 4 commits into from
Jan 29, 2025

Conversation

lemald
Copy link
Member

@lemald lemald commented Dec 30, 2024

Summary of changes

Asana Ticket: [Investigate] Unexpected predictions during Commuter Rail cancellation

I still need to do a test in dev with actual data, but this should be code-complete and ready to review.

I disabled the Credo cyclomatic complexity warning because I feel that the filter/3 function is actually quite simple and readable despite the high complexity value, and since I don't see any obvious way to refactor it to be less "complex" per this metric that doesn't make it harder to follow.

@lemald lemald requested review from a team and Whoops and removed request for a team December 30, 2024 19:27
@lemald lemald force-pushed the lem-skip-cancelled-cr-predictions branch from 685eda9 to fb1c3e4 Compare December 31, 2024 16:45
@lemald
Copy link
Member Author

lemald commented Jan 10, 2025

My assumption going into this was that the StopTimeUpdates with the boarding status were going to be the only STUs for that trip, so we could do an Enum.all?/2 very similar to how things work on bus with block waivers. However, some testing with some other changes reminded me that that might not actually be the case, so the schedule relationship at North Station wasn't updated as we would have expected. I'll have to revisit this and come back with a slightly different approach.

@lemald
Copy link
Member Author

lemald commented Jan 10, 2025

@Whoops let me know what you think of the updated approach!

Copy link
Collaborator

@Whoops Whoops left a comment

Choose a reason for hiding this comment

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

Sorry, lost track of this! Looks good!

@lemald
Copy link
Member Author

lemald commented Jan 29, 2025

@Whoops sorry, re-requesting your review yet again. I realized it's probably best if we use the same skip/1 logic as other places in the application do, in particular for removing arrival and departure times. This necessitated a slight change to the typespec of skip/1 because it was complaining about a mismatch between the opaque type t and the structured type - I think it's fine, but let me know what you thin.

@lemald lemald merged commit 88d5104 into master Jan 29, 2025
16 checks passed
@lemald lemald deleted the lem-skip-cancelled-cr-predictions branch January 29, 2025 18:04
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