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

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

Merged
merged 10 commits into from
Jun 3, 2024

Conversation

vesameskanen
Copy link
Contributor

@vesameskanen vesameskanen commented May 8, 2024

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
Copy link

codecov bot commented May 8, 2024

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
Member

@vesameskanen
Copy link
Contributor Author

OK I will add the test, thanks for instructions!

@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
Contributor Author

Data is now structured.

@leonardehrenfried
Copy link
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
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
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.

Copy link
Member

@leonardehrenfried leonardehrenfried left a comment

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

Copy link
Member

@leonardehrenfried leonardehrenfried left a comment

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.

@vesameskanen
Copy link
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
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
5 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants