-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Uber ride hailing #4979
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
Uber ride hailing #4979
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #4979 +/- ##
=============================================
+ Coverage 64.32% 64.39% +0.07%
- Complexity 13804 13856 +52
=============================================
Files 1689 1712 +23
Lines 66770 67079 +309
Branches 7189 7210 +21
=============================================
+ Hits 42947 43196 +249
- Misses 21417 21462 +45
- Partials 2406 2421 +15
... and 15 files with indirect coverage changes 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 in Codecov by Sentry. |
6c4947a to
86b8fc9
Compare
9210a11 to
1624f39
Compare
src/ext/java/org/opentripplanner/ext/ridehailing/service/oauth/OAuthService.java
Show resolved
Hide resolved
src/ext/java/org/opentripplanner/ext/ridehailing/RideHailingServiceParameters.java
Outdated
Show resolved
Hide resolved
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.
My biggest consern so fare is the time-shift of the request.
.../java/org/opentripplanner/routing/algorithm/filterchain/ItineraryListFilterChainBuilder.java
Outdated
Show resolved
Hide resolved
src/ext/java/org/opentripplanner/ext/ridehailing/RideHailingDepartureTimeShifter.java
Outdated
Show resolved
Hide resolved
src/ext/java/org/opentripplanner/ext/ridehailing/RideHailingDepartureTimeShifter.java
Outdated
Show resolved
Hide resolved
…partureTimeShifter.java Co-authored-by: Thomas Gran <[email protected]>
Note for the dev meetingThe following items are still open:
|
|
@t2gran I decided that I rather remove the timeshifting feature in order to get this merged more quickly. I'm going to re-add it in a later PR. |
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 have made it through everything now, so just a few small things left.
src/ext/java/org/opentripplanner/ext/legacygraphqlapi/datafetchers/LegacyGraphQLMoneyImpl.java
Outdated
Show resolved
Hide resolved
src/ext/java/org/opentripplanner/ext/ridehailing/service/uber/UberService.java
Show resolved
Hide resolved
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.
Works for me with the latest changes.
Summary
This adds an integration with ride hailing services. At the moment Uber is the only supported provider but Lyft might be added later.
The implications for the core routing code are suprisingly small: we make use of the existing CAR_PICKUP/DROPOFF code and only dectorate the resulting itineraries in a filter with extra information about the estimated arrival duration and price.
Warning
This feature is considerably slower than regular OTP searches as it extensively talks to external services.
Issue
Closes #4832
Closes #2678
Unit tests
Lots added.
Documentation
Added.
cc @demory
Review instructions for IBI
@binh-dam-ibigroup @demory If you want to execute a car hailing query in the debug UI you can select the last entry from the mode drop-down "Car hailing & transit". The debug UI will not show any Uber related information though.
I recommend that you try out the GraphQL explorer with the following query:
{ plan( from: {lat: 45.508271755944975, lon: -122.4288940} to: {lat: 45.579445114, lon: -122.7097320556} transportModes: [{mode: CAR, qualifier: HAIL}, {mode: TRANSIT}] numItineraries: 1 carReluctance: 4 ) { itineraries { duration legs { mode legGeometry { points } rideHailingEstimate { provider { id } arrival minPrice { currency { code } amount } maxPrice { currency { code } amount } } } } } }A complete configuration example is available at https://github.com/ibi-group/OpenTripPlanner/tree/car-hailing-uber/docs/examples/ibi/portland