-
Notifications
You must be signed in to change notification settings - Fork 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
Add a matcher API for filters in the transit service used for regularStop lookup #6234
base: dev-2.x
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6234 +/- ##
=============================================
+ Coverage 69.79% 69.83% +0.03%
- Complexity 17790 17910 +120
=============================================
Files 2017 2038 +21
Lines 76042 76484 +442
Branches 7781 7819 +38
=============================================
+ Hits 53077 53410 +333
- Misses 20263 20340 +77
- Partials 2702 2734 +32 ☔ View full report in Codecov by Sentry. |
…arStops. Also moves the envelope filtering that used to happen on the client side of the findRegularStops call into the StopModelIndex.
e196533
to
b104b5d
Compare
application/src/main/java/org/opentripplanner/transit/api/request/RegularStopRequest.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.java
Outdated
Show resolved
Hide resolved
...est/java/org/opentripplanner/transit/model/filter/transit/RegularStopMatcherFactoryTest.java
Outdated
Show resolved
Hide resolved
…lter/transit/RegularStopMatcherFactoryTest.java Co-authored-by: Leonard Ehrenfried <mail@leonard.io>
...ication/src/main/java/org/opentripplanner/transit/api/request/RegularStopRequestBuilder.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/transit/api/request/RegularStopRequest.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/opentripplanner/transit/model/filter/transit/RegularStopMatcherFactory.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/transit/api/request/RegularStopRequest.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/transit/api/request/RegularStopRequest.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/apis/transmodel/TransmodelGraphQLSchema.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.
Sorry for the back and forth about agency/feed id. This looks ok now.
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.
.../main/java/org/opentripplanner/transit/api/request/FindRegularStopsByBoundingBoxRequest.java
Outdated
Show resolved
Hide resolved
...ava/org/opentripplanner/transit/api/request/FindRegularStopsByBoundingBoxRequestBuilder.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/opentripplanner/transit/model/filter/transit/RegularStopMatcherFactory.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/opentripplanner/transit/model/filter/transit/RegularStopMatcherFactory.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/opentripplanner/transit/model/filter/transit/RegularStopMatcherFactory.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/transit/service/TransitService.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/transit/service/TransitService.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/transit/service/TransitService.java
Outdated
Show resolved
Hide resolved
…est/FindRegularStopsByBoundingBoxRequest.java Co-authored-by: Thomas Gran <t2gran@gmail.com>
…est/FindRegularStopsByBoundingBoxRequestBuilder.java Co-authored-by: Thomas Gran <t2gran@gmail.com>
…lter/transit/RegularStopMatcherFactory.java Co-authored-by: Thomas Gran <t2gran@gmail.com>
…lter/transit/RegularStopMatcherFactory.java Co-authored-by: Thomas Gran <t2gran@gmail.com>
…TransitService.java Co-authored-by: Thomas Gran <t2gran@gmail.com>
…TransitService.java Co-authored-by: Thomas Gran <t2gran@gmail.com>
Summary
This change allows for a clean separation of concerns and lays the path for more efficient filtering logic down the line.
Also moves bounding box filtering on stops from the spatial index into a shared method so that all callers don't have to do this filtering themselves.
Issue
#5630
Unit tests
Added unit tests for each matcher and the new RegularStopMatcherFactory. Also ensured that the API in local runs behaves as expected.
Documentation
Added JavaDoc.