Loop fixes for upstreaming#61
Open
lrosenfield-uta wants to merge 2 commits intoBondify:masterfrom
Open
Conversation
Initial commit, just includes testing for loops. Logic for fixing will be implemented in subsequent commits.
Implemented an alternative method for getting segments, hidden behind a flag because I'm not 100% confident in it. In most (in spec) cases, this allows for correct segmentation of loops. It's also more likely to provide more notice for unexpected behaviors vs the current implementation. Unexpected behaviors are just less predictable, unfortunately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is an initial fix for #49. I only really touched get_segments (plus the new helper functions in both gtfs_functions and aux_functions), so I'm not yet sure if I also would need to refactor get_segments_frequency(). For that reason (and also because I know this approach can still cause issues when a feed is built out-of-spec1 I've put it behind an option flag. Users initiate a feed with
fix_loops = Truein order to run with the new segments functionality.I appreciate any thoughts or insights on the method I'm using here. Software Engineering isn't my primary task or line of education.
Footnotes
For example, it is currently failing for UTA's Route 223 because some aspect of an upcoming change seem to have been incorporated into our feed early, breaking stop-line parity ↩