OTP2 no longer crashes on invalid GTFS stop time sequences - #4205
Conversation
Codecov Report
@@ Coverage Diff @@
## dev-2.x #4205 +/- ##
=============================================
+ Coverage 48.94% 48.95% +0.01%
- Complexity 10042 10048 +6
=============================================
Files 1376 1376
Lines 56540 56540
Branches 6589 6589
=============================================
+ Hits 27671 27680 +9
+ Misses 26839 26833 -6
+ Partials 2030 2027 -3
Continue to review full report at Codecov.
|
|
But if those stop time sequences are invalid, should OTP not crash? I think I agree with @hannesj that we should not try to fix invalid trips but rather filter them out and add an issue to the issue store. |
|
Having said that I don't think we have a good definition what this "repairing" actually means as it's pretty arbitrary and just guesswork to get something into the graph. Do you agree? |
|
Invalid stoptimes seem to be common in some datasets. If we don't filter them away we can't use the data at all. Filtering is not repairing. After the code change, bad trip is erased completely which is the right action. |
|
I just re-read the code around the diff and you're right. It makes no sense trying to interpolate stop times where we have decided that we are going to throw them away. An issue is also already added to the store so you can see which ones are removed. |
leonardehrenfried
left a comment
There was a problem hiding this comment.
I would feel a bit happier if we had tests for this module but I think the time is better spent adding them after the transit model refactoring.
Summary
Code which filters bad stop time sequences now correctly replaces the invalid stop time list with empty list.
Issue
fixes #4114