-
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 route lookup #6378
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 #6378 +/- ##
=============================================
+ Coverage 69.73% 69.82% +0.08%
- Complexity 18024 18085 +61
=============================================
Files 2057 2065 +8
Lines 76970 77181 +211
Branches 7846 7852 +6
=============================================
+ Hits 53678 53891 +213
+ Misses 20545 20536 -9
- Partials 2747 2754 +7 ☔ View full report in Codecov by Sentry. |
application/src/main/java/org/opentripplanner/transit/service/DefaultTransitService.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/opentripplanner/transit/model/filter/transit/RouteMatcherFactoryTest.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/opentripplanner/transit/model/filter/transit/RouteMatcherFactoryTest.java
Outdated
Show resolved
Hide resolved
.../src/test/java/org/opentripplanner/transit/model/filter/transit/RouteMatcherFactoryTest.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.
The main code looks very neat but I have a few comments about the test code.
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.
Overall this looks very good - only one small suggestion to consider.
Summary
This change allows for a clean separation of concerns and lays the path for more efficient filtering logic down the line.
The functionality is backwards compatible, though there may be a discussion here that it should not be and that we should instead improve on some of the choices made earlier. For instance whether the longName check should really be a case insensitive prefix match.
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.