-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 ID generation hacks in GTFS mapping, improve FaresV2 spec conformance #6586
base: dev-2.x
Are you sure you want to change the base?
Fix ID generation hacks in GTFS mapping, improve FaresV2 spec conformance #6586
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6586 +/- ##
=============================================
+ Coverage 71.04% 71.06% +0.01%
- Complexity 18299 18312 +13
=============================================
Files 2005 2005
Lines 75849 75871 +22
Branches 7779 7773 -6
=============================================
+ Hits 53885 53915 +30
+ Misses 19221 19210 -11
- Partials 2743 2746 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
abe29a4
to
cea28d4
Compare
@@ -360,51 +360,6 @@ private GtfsMutableRelationalDao loadBundle(GtfsBundle gtfsBundle) throws IOExce | |||
} | |||
} | |||
|
|||
for (ShapePoint shapePoint : store.getAllEntitiesForType(ShapePoint.class)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@binh-dam-ibigroup You asked about this in a previous PR and all of this ugly code is now going away completely.
application/src/ext/java/org/opentripplanner/ext/fares/impl/GtfsFaresV2Service.java
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/gtfs/mapping/IdFactory.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/gtfs/mapping/FareTransferRuleMapper.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/gtfs/mapping/FareTransferRuleMapper.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/gtfs/mapping/IdFactory.java
Outdated
Show resolved
Hide resolved
@optionsome I'm sorry but I noticed another bug. |
# Conflicts: # application/src/main/java/org/opentripplanner/gtfs/mapping/AgencyAndIdMapper.java # application/src/main/java/org/opentripplanner/gtfs/mapping/FareLegRuleMapper.java # application/src/main/java/org/opentripplanner/gtfs/mapping/FareProductMapper.java # application/src/main/java/org/opentripplanner/gtfs/mapping/FareTransferRuleMapper.java # application/src/main/java/org/opentripplanner/gtfs/mapping/GTFSToOtpTransitServiceMapper.java # application/src/test/java/org/opentripplanner/gtfs/mapping/FareTransferRuleMapperTest.java
d8dca70
to
119ac69
Compare
Summary
This PR has two parts:
ID generation
Previously OTP re-wrote the
AgencyAndId
and set the agency ID to the feed ID and then during mapping converted that to a feed scoped ID. This was pretty confusing, brittle and allowed you to only convertAgencyAndId
s toFeedScopedId
s not strings.This has been replaced with a more robust approach where we inject a
IdFactory
into the mappers.Unit tests
Lots updated and new ones for fares functionality added.
Bumping the serialization version id
Yes, graph entities are changed.
cc @miles-grant-ibigroup @fpurcell