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

Fix filtering of inconsistent NeTEx stop times #5061

Conversation

vpaturet
Copy link
Contributor

@vpaturet vpaturet commented Apr 21, 2023

Summary

the Graph Builder does not filter out NeTEx ServiceJourneys with inconsistent stop times.

In the current implementation, the stop times validation/filtering is performed in org.opentripplanner.graph_builder.module.ValidateAndInterpolateStopTimesForEachTrip for both GTFS and NeTEx imports, but in the NeTEx case the validation occurs too late, after the creation of TripTimes, preventing proper filtering.

This PR moves the validation/filtering of stop times earlier in the import process so that incorrect trips are both reported and filtered out.
The filtering logic is also adapted to prevent filtering of valid flexible trips.

Issue

Unit tests

Added unit tests

Documentation

No

@vpaturet vpaturet added the Bug label Apr 21, 2023
@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Patch coverage: 79.50% and project coverage change: +0.16 🎉

Comparison is base (b08c994) 64.50% compared to head (c233153) 64.66%.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5061      +/-   ##
=============================================
+ Coverage      64.50%   64.66%   +0.16%     
- Complexity     13864    13960      +96     
=============================================
  Files           1710     1717       +7     
  Lines          67019    67303     +284     
  Branches        7203     7242      +39     
=============================================
+ Hits           43229    43524     +295     
+ Misses         21372    21346      -26     
- Partials        2418     2433      +15     
Impacted Files Coverage Δ
...tripplanner/ext/fares/impl/GtfsFaresV2Service.java 95.96% <0.00%> (ø)
...raphqlapi/generated/LegacyGraphQLDataFetchers.java 0.00% <ø> (ø)
...legacygraphqlapi/generated/LegacyGraphQLTypes.java 7.57% <0.00%> (ø)
...pplanner/ext/siri/SiriTimetableSnapshotSource.java 0.00% <0.00%> (ø)
...er/ext/siri/updater/SiriETGooglePubsubUpdater.java 0.00% <ø> (ø)
...r/ext/siri/updater/SiriETHttpTripUpdateSource.java 0.00% <0.00%> (ø)
...pentripplanner/ext/siri/updater/SiriETUpdater.java 0.00% <0.00%> (ø)
...pentripplanner/ext/siri/updater/SiriSXUpdater.java 0.00% <0.00%> (ø)
...ner/ext/siri/updater/azure/SiriAzureETUpdater.java 0.00% <0.00%> (ø)
...ner/ext/siri/updater/azure/SiriAzureSXUpdater.java 0.00% <0.00%> (ø)
... and 83 more

... and 48 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@t2gran t2gran added this to the 2.4 milestone Apr 24, 2023
@t2gran t2gran modified the milestones: 2.4, 2.5 (next release) Sep 13, 2023
@t2gran t2gran modified the milestones: 2.5, 2.6 (next release) Mar 13, 2024
@vpaturet vpaturet closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants