-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Transit filters for GTFS API's planConnection
#6668
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
Transit filters for GTFS API's planConnection
#6668
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6668 +/- ##
=============================================
+ Coverage 71.38% 71.39% +0.01%
- Complexity 18551 18573 +22
=============================================
Files 2036 2038 +2
Lines 76609 76710 +101
Branches 7828 7847 +19
=============================================
+ Hits 54686 54769 +83
- Misses 19150 19163 +13
- Partials 2773 2778 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
utils/src/test/java/org/opentripplanner/utils/collection/CollectionUtilsTest.java
Outdated
Show resolved
Hide resolved
|
Note! I am not reviewing this, just commented on a few things I noticed while reading through part of the code - core domain only. |
|
@fpurcell this might also be relevant for you. |
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.
Was it possible to define these filters in the router configuration? If it is, we probably should expose the defaults in the schema.
application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLFormattingTest.java
Show resolved
Hide resolved
We have banned/whitelisted routes and agencies, but their mapping to this structure is a little awkward. |
e3e79d2 to
9d0ffc6
Compare
|
Move filters to TransitPreferences |
# Conflicts: # application/src/main/java/org/opentripplanner/apis/gtfs/generated/package.json # Conflicts: # application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java # application/src/main/java/org/opentripplanner/apis/gtfs/generated/package.json
|
While moving the filters into the transit preferences I notices a problem with how they interact with mode settings. I reworked the mapping, added tests and improved the docs. This is now ready for review. |
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/apis/gtfs/GraphQLUtilsTest.java
Outdated
Show resolved
Hide resolved
59d1868 to
443deac
Compare
79928c7 to
b1f0cd0
Compare
86ccb2e to
13a815b
Compare
|
@optionsome I've reworked the documentation a bit. |
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
0220a5c to
7e894c9
Compare
7e894c9 to
afa0629
Compare
Co-authored-by: Joel Lappalainen <[email protected]>
a6285b6 to
b8e0249
Compare
Summary
This adds the filter API originally developed for the Transmodel API to the GTFS API.
It allows you to included or exclude routes or agencies from the routing result.
For example it allows you to express the following filter criteria:
Issue
#6239
As discussed in this issue, the schema docs was copied more or less from the Transmodel API and uses the same semantics. Some features like dated service journeys and group of lines, which don't have a GTFS equivalent, are omitted.
Unit tests
Added.
Documentation
Javadoc and schema docs.