Skip to content

Implement free transfers in GTFS Fares V2 - #4460

Merged
leonardehrenfried merged 18 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:fares-v2
Sep 30, 2022
Merged

Implement free transfers in GTFS Fares V2#4460
leonardehrenfried merged 18 commits into
opentripplanner:dev-2.xfrom
leonardehrenfried:fares-v2

Conversation

@leonardehrenfried

Copy link
Copy Markdown
Member

Summary

As a follow up of #4338 this PR implements the fare_transfer_rules.txt file from the recently added Fares V2 specification.

There are a couple of limitations though:

  • only free transfers are implemented
  • only tickets that cover the entire itinerary are implemented

I plan on removing these limitations in the near future.

Unit tests

Added.

cc @lslangley @christrillium

@leonardehrenfried leonardehrenfried added !New Feature A functional feature targeting the end user. +GTFS Related to import of GTFS data +Sandbox This will be implemented as a Sandbox feature +Bump Serialization Id Add this label if you want the serialization id automatically bumped after merging the PR labels Sep 21, 2022
@leonardehrenfried
leonardehrenfried requested a review from a team as a code owner September 21, 2022 09:41
@codecov-commenter

codecov-commenter commented Sep 21, 2022

Copy link
Copy Markdown

Codecov Report

Base: 58.55% // Head: 58.54% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (9bb7e6d) compared to base (5813e2f).
Patch coverage: 88.59% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #4460      +/-   ##
=============================================
- Coverage      58.55%   58.54%   -0.01%     
- Complexity     11439    11481      +42     
=============================================
  Files           1512     1516       +4     
  Lines          60089    60272     +183     
  Branches        6829     6842      +13     
=============================================
+ Hits           35185    35287     +102     
- Misses         22836    22913      +77     
- Partials        2068     2072       +4     
Impacted Files Coverage Δ
...estFareInFreeTransferWindowFareServiceFactory.java 84.61% <0.00%> (ø)
...g/opentripplanner/ext/fares/model/FareProduct.java 50.00% <ø> (-25.00%) ⬇️
...ntripplanner/ext/fares/model/FareTransferType.java 0.00% <0.00%> (ø)
...ripplanner/graph_builder/DataImportIssueStore.java 57.57% <ø> (-1.25%) ⬇️
...entripplanner/graph_builder/module/GtfsModule.java 69.14% <0.00%> (-1.89%) ⬇️
...pentripplanner/gtfs/mapping/FareLegRuleMapper.java 45.00% <0.00%> (ø)
...ipplanner/gtfs/mapping/FareTransferRuleMapper.java 90.90% <90.90%> (ø)
...tripplanner/ext/fares/impl/GtfsFaresV2Service.java 96.46% <94.73%> (-3.54%) ⬇️
...nner/ext/fares/impl/DefaultFareServiceFactory.java 86.04% <100.00%> (+0.68%) ⬆️
...g/opentripplanner/ext/fares/model/FareLegRule.java 100.00% <100.00%> (ø)
... and 46 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@t2gran t2gran added this to the 2.2 milestone Sep 22, 2022
Comment thread src/ext/java/org/opentripplanner/ext/fares/model/FareProduct.java Outdated
Comment thread src/main/java/org/opentripplanner/gtfs/mapping/FareProductMapper.java Outdated
@leonardehrenfried
leonardehrenfried merged commit cd23df6 into opentripplanner:dev-2.x Sep 30, 2022
@leonardehrenfried
leonardehrenfried deleted the fares-v2 branch September 30, 2022 10:17
t2gran pushed a commit that referenced this pull request Sep 30, 2022
t2gran pushed a commit that referenced this pull request Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+Bump Serialization Id Add this label if you want the serialization id automatically bumped after merging the PR +GTFS Related to import of GTFS data !New Feature A functional feature targeting the end user. +Sandbox This will be implemented as a Sandbox feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants