Skip to content

Conversation

lrosenfield-uta
Copy link

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 = True in 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

  1. 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

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.
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.

1 participant