Skip to content
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

Merged
merged 46 commits into from
Jul 30, 2024

Conversation

leonardehrenfried
Copy link
Member

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 in yyyyMMdd 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

Copy link

codecov bot commented May 24, 2024

Codecov Report

Attention: Patch coverage is 78.94737% with 16 lines in your changes missing coverage. Please review.

Project coverage is 69.65%. Comparing base (2a5c8be) to head (3cf6130).
Report is 196 commits behind head on dev-2.x.

Files Patch % Lines
...ntripplanner/apis/gtfs/generated/GraphQLTypes.java 54.54% 9 Missing and 1 partial ⚠️
...pplanner/apis/gtfs/datafetchers/QueryTypeImpl.java 0.00% 1 Missing and 1 partial ⚠️
...ntripplanner/apis/gtfs/datafetchers/RouteImpl.java 75.00% 1 Missing and 1 partial ⚠️
...ner/apis/gtfs/support/time/LocalDateRangeUtil.java 66.66% 1 Missing ⚠️
...er/framework/graphql/scalar/DateScalarFactory.java 85.71% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@leonardehrenfried leonardehrenfried requested a review from t2gran May 28, 2024 09:32
@leonardehrenfried leonardehrenfried added TriMet IBI Developed by or important for IBI Group labels May 28, 2024
@t2gran
Copy link
Member

t2gran commented Jun 3, 2024

See my comments in #4879

@leonardehrenfried
Copy link
Member Author

Note to self: clarify docs on service date.

@t2gran t2gran added this to the 2.6 (next release) milestone Jun 7, 2024
optionsome
optionsome previously approved these changes Jul 8, 2024
@fpurcell
Copy link
Member

fpurcell commented Jul 11, 2024

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.

@leonardehrenfried
Copy link
Member Author

@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.

@fpurcell
Copy link
Member

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.

…ge.java

Co-authored-by: Thomas Gran <t2gran@gmail.com>
@leonardehrenfried leonardehrenfried merged commit 09be088 into opentripplanner:dev-2.x Jul 30, 2024
5 checks passed
t2gran pushed a commit that referenced this pull request Jul 30, 2024
@leonardehrenfried leonardehrenfried deleted the route-filter branch July 30, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IBI Developed by or important for IBI Group New Feature TriMet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants