opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.12k stars 1.01k forks source link

Add rental system to GraphQL API #5909

Open sharhio opened 3 weeks ago

sharhio commented 3 weeks ago

Summary

  1. RentalVehicleSystem is returned for rental vehicles. This is so that a the system url to an operator can be provided (especially when there is no vehicle specific link available.)
  2. Searching for nearest stations/vehicles can be filtered by networks. In some cases we only want to show the stations/vehicles of certain operators, and without filtering, the nearest search returns a very large amount of unnecessary data. The large amount of unwanted data coupled with a result limit makes most of the results unusable.
  3. Added an option for hiding networks from maplayers so that unnecessary data doesn't always need to be returned from otp. (For example, in cases where one only wants to show the vehicles of a network and never the stations.)
  4. Sometimes data is faulty and the name field contains an empty string, this causes an error in the FeedScopedId. Added an empty string check.

Unit tests

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 77.27273% with 5 lines in your changes missing coverage. Please review.

Project coverage is 69.51%. Comparing base (2a5c8be) to head (b9a0c82). Report is 9 commits behind head on dev-2.x.

Files Patch % Lines
...ntripplanner/apis/gtfs/generated/GraphQLTypes.java 50.00% 2 Missing :warning:
...e_rental/datasources/GbfsGeofencingZoneMapper.java 0.00% 1 Missing and 1 partial :warning:
...anner/apis/transmodel/TransmodelGraphQLSchema.java 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev-2.x #5909 +/- ## ============================================= + Coverage 69.45% 69.51% +0.05% - Complexity 17070 17104 +34 ============================================= Files 1937 1938 +1 Lines 73692 73732 +40 Branches 7540 7546 +6 ============================================= + Hits 51184 51255 +71 + Misses 19880 19838 -42 - Partials 2628 2639 +11 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

leonardehrenfried commented 2 weeks ago

Can you add tests, like these:

optionsome commented 1 day ago

This is now ready for review.