-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Itinerary cleanup #6617
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
Itinerary cleanup #6617
Conversation
This is not a transit path, but any type - the transit part of the name refer to where it was produced, but that should not be part of a name.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6617 +/- ##
==========================================
Coverage 71.19% 71.19%
- Complexity 18465 18468 +3
==========================================
Files 2026 2026
Lines 76289 76278 -11
Branches 7807 7804 -3
==========================================
- Hits 54312 54307 -5
+ Misses 19218 19212 -6
Partials 2759 2759 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ion_to_transmodl_api # Conflicts: # application/src/ext/java/org/opentripplanner/ext/emissions/itinerary/DecorateWithEmission.java # application/src/main/java/org/opentripplanner/apis/gtfs/generated/graphql-codegen.yml
The old method was a bit awkward and is replaced with a generic withLegs(legs) and a transformLegs(legMapper).
# Conflicts: # application/src/ext/java/org/opentripplanner/ext/fares/impl/GtfsFaresV2Service.java
application/src/main/java/org/opentripplanner/model/plan/leg/ScheduledTransitLeg.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/model/plan/leg/ScheduledTransitLegBuilder.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/model/plan/leg/ScheduledTransitLegBuilder.java
Outdated
Show resolved
Hide resolved
leonardehrenfried
left a comment
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.
I noticed a few typos.
| package org.opentripplanner.apis.transmodel.mapping; | ||
|
|
||
| import org.opentripplanner.model.plan.RelativeDirection; | ||
| import org.opentripplanner.model.plan.walkstep.RelativeDirection; |
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.
Should walkstep be inside the leg package since walksteps are always part of a leg?
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.
I considered it, but fell down on that is is independent of leg. I do not think there is a right or wrong in this case. We can move it if you find the model more intuitive that way. The way I see it is that walk step represent the path you walk between to points in the street graph, and that a WalkLeg is the relationship between an itinerary and the walk-steps. So the walk-steps could in theory be used without an itinerary/leg.
application/src/test/java/org/opentripplanner/model/plan/leg/ScheduledTransitLegTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Leonard Ehrenfried <[email protected]> Co-authored-by: Joel Lappalainen <[email protected]>
Summary
This is a pure refactoring/cleanup. I will base my next PR on top of this.
A few unit-tests and utility methods is added.
Issue
🟥 No issue on this
Unit tests
🟥 Unit-tests are unchanged
Documentation
🟥 The code/doc is not touched.
Changelog
🟥 Not relevant
Bumping the serialization version id
🟥 The changed code is not part of the serialized graph.