-
Notifications
You must be signed in to change notification settings - Fork 1.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
Filter routes and patterns by service date in GTFS GraphQL API #5869
Filter routes and patterns by service date in GTFS GraphQL API #5869
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5869 +/- ##
=============================================
+ Coverage 69.45% 69.65% +0.20%
- Complexity 17070 17195 +125
=============================================
Files 1937 1946 +9
Lines 73692 73866 +174
Branches 7540 7562 +22
=============================================
+ Hits 51184 51453 +269
+ Misses 19880 19782 -98
- Partials 2628 2631 +3 ☔ View full report in Codecov by Sentry. |
542abcc
to
56c23fb
Compare
See my comments in #4879 |
Note to self: clarify docs on service date. |
971f060
to
244da3f
Compare
e6fdeb6
to
994d0b5
Compare
src/main/java/org/opentripplanner/apis/gtfs/PatternByServiceDatesFilter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/framework/graphql/scalar/DateScalarFactory.java
Outdated
Show resolved
Hide resolved
src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/apis/gtfs/PatternByServiceDatesFilterTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/apis/gtfs/PatternByServiceDatesFilterTest.java
Outdated
Show resolved
Hide resolved
99e0dbb
to
1734b8a
Compare
src/test/java/org/opentripplanner/apis/gtfs/PatternByServiceDatesFilterTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/apis/gtfs/mapping/LocalDateRangeMapperTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opentripplanner/apis/gtfs/mapping/LocalDateRangeMapperTest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opentripplanner/apis/gtfs/PatternByServiceDatesFilter.java
Outdated
Show resolved
Hide resolved
ae6371d
to
614434f
Compare
src/test/java/org/opentripplanner/apis/gtfs/model/LocalDateRangeTest.java
Outdated
Show resolved
Hide resolved
8512efe
to
b617f95
Compare
BTW @leonardehrenfried and @miles-grant-ibigroup ... so looking forward to this fix, as the OTP-RR and Calltaker apps are really broken (and will continue to be until October) in terms of future versions of routes and stops showing up: https://rtp.trimet.org/rtp/#/route. TriMet has a lot of changes coming in the September service change (https://trimet.org/betterbus/servicechanges-fy25proposed.htm#proposedchanges). That data is now in TriMet's gtfs.zip. Without a date filter, all of this junk is showing up and making for a confusing experience when viewing routes and stops that are not currently active. |
@fpurcell Since many developers from Europe are on holiday these days it will be a little longer until we will have finished the review. If you are keen to have it beforehand (and @miles-grant-ibigroup has capacity) we can supply you with a preview version of it. |
Thanks Leonard ... no rush on my end, especially since the new call taker app is not yet in the hands of end-users. Just pointing out that these fixes will eliminate a lot of confusion in today's system. |
src/main/java/org/opentripplanner/apis/gtfs/model/LocalDateRange.java
Outdated
Show resolved
Hide resolved
…ge.java Co-authored-by: Thomas Gran <t2gran@gmail.com>
Summary
TriMet has requested to be able to filter routes and their patterns based on the service dates that the operate on to only display those from the current week. The request is fleshed out in more details in #4879.
This makes the
Date
scalar implementation from the Transmodel API into a general one used by both APIs. Since the GTFS API also accepts dates in other places inyyyyMMdd
format this would also become possible in the Transmodel API. Is this a problem?Issue
#4879
Unit tests
Lots added.
Documentation
Javadoc and GraphQL docs.
cc @miles-grant-ibigroup @fpurcell