Skip to content

Add feed publisher name and url to GTFS GraphQL API#5835

Merged
optionsome merged 10 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:publisher-query
Jun 3, 2024
Merged

Add feed publisher name and url to GTFS GraphQL API#5835
optionsome merged 10 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:publisher-query

Conversation

@vesameskanen

@vesameskanen vesameskanen commented May 8, 2024

Copy link
Copy Markdown
Contributor

Summary

Add fetchers for FeedInfo publisherName and publisherUrl information.

Unit tests

Feedinfo test query added.

Documentation

In gtfs graphql schema.

@vesameskanen
vesameskanen requested a review from a team as a code owner May 8, 2024 05:10
@codecov

codecov Bot commented May 8, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.40%. Comparing base (203fcdd) to head (a181803).
Report is 194 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5835      +/-   ##
=============================================
+ Coverage      67.91%   68.40%   +0.49%     
- Complexity     16559    16698     +139     
=============================================
  Files           1910     1915       +5     
  Lines          72438    72679     +241     
  Branches        7447     7453       +6     
=============================================
+ Hits           49194    49718     +524     
+ Misses         20724    20404     -320     
- Partials        2520     2557      +37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leonardehrenfried

Copy link
Copy Markdown
Member

@vesameskanen

Copy link
Copy Markdown
Contributor Author

OK I will add the test, thanks for instructions!

Comment thread src/test/resources/org/opentripplanner/apis/gtfs/queries/feedinfo.graphql Outdated
@leonardehrenfried leonardehrenfried changed the title Enable querying of publisher name and url from feed info in gtfs graphql api Enable querying of publisher name and url from feed info in GTFS GraphQL API May 14, 2024
@vesameskanen

Copy link
Copy Markdown
Contributor Author

Data is now structured.

@leonardehrenfried

Copy link
Copy Markdown
Member

If you have anyone at hsl that can be second reviewer in Joel's absence, you can assign them.

@leonardehrenfried leonardehrenfried changed the title Enable querying of publisher name and url from feed info in GTFS GraphQL API Add feed publisher name and url to GTFS GraphQL API May 15, 2024
Comment on lines +981 to +987
type FeedPublisher {
"""Name of feed publisher"""
name: String!

"""Web address of feed publisher"""
url: String!
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With GTFS these are required but how about NETEX?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that in Netex you don't have a feed publisher at all and you're right: the publisher should be optional. If these two fields should be optional, I'm not sure about.

@leonardehrenfried leonardehrenfried left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I realised something: you need to also map the FeedPublisher type in graphql-codegen.yml:

StopPosition: org.opentripplanner.apis.gtfs.model.StopPosition#StopPosition

Comment thread src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls Outdated
Comment thread src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls Outdated

@leonardehrenfried leonardehrenfried left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small doc change.

Co-authored-by: Leonard Ehrenfried <mail@leonard.io>
@vesameskanen

Copy link
Copy Markdown
Contributor Author

Out of curiosity, what is this convention of double-double-quotes around comments while single double quotes seem to work as well?

@leonardehrenfried

Copy link
Copy Markdown
Member

Out of curiosity, what is this convention of double-double-quotes around comments while single double quotes seem to work as well?

This allows you to write multi-line doc strings. Regular single-quoted strings have to stay on one line.

@optionsome
optionsome merged commit ef6c705 into opentripplanner:dev-2.x Jun 3, 2024
@optionsome optionsome added the +Skip Changelog This is not a relevant change for a product owner since last release. label Jun 3, 2024
t2gran pushed a commit that referenced this pull request Jun 3, 2024
@vesameskanen
vesameskanen deleted the publisher-query branch June 18, 2024 10:04
@t2gran t2gran added this to the 2.6 (next release) milestone Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+Skip Changelog This is not a relevant change for a product owner since last release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants