add stopPositionInPattern in Stoptime in GTFS GraphQL API - #6204
Merged
leonardehrenfried merged 4 commits intoNov 12, 2024
Merged
leonardehrenfried merged 4 commits into
leonardehrenfried merged 4 commits into
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6204 +/- ##
=============================================
- Coverage 69.91% 69.72% -0.19%
+ Complexity 17736 17669 -67
=============================================
Files 2006 2007 +1
Lines 75526 75648 +122
Branches 7730 7741 +11
=============================================
- Hits 52804 52749 -55
- Misses 20036 20185 +149
- Partials 2686 2714 +28 ☔ View full report in Codecov by Sentry. |
stopIndex is considered an implementation detail in OTP which shouldn't be exposed, while stopPositionInPattern is guaranteed to run from 0 to n-1.
miklcct
force-pushed
the
index-in-stoptime-in-pattern
branch
from
November 5, 2024 14:02
71aca89 to
b7d0dbe
Compare
optionsome
reviewed
Nov 8, 2024
optionsome
left a comment
Member
There was a problem hiding this comment.
Use this new field in some integration test(s).
optionsome
approved these changes
Nov 12, 2024
leonardehrenfried
approved these changes
Nov 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
stopIndexinStoptimemodel in GTFS GraphQL API.The purpose of this field is to find the absolute position in a pattern, such as in conjunction with the pattern in
Stop.stoptimesForPatterns.Although the
stopIndexfield is used as the current implementation, it is considered an implementation detail, and this fetcher must return 0 to n-1 regardless of the implementation detail.Issue
Closes #6026
Unit tests
The fetcher code is not tested at all and is untestable, but if possible the fetcher should be tested to always return 0 to n-1.
Documentation
Added in GraphQL.