-
Notifications
You must be signed in to change notification settings - Fork 2
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
Initial destinations framework #2242
Merged
Merged
Conversation
This file contains 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
cmaddox5
approved these changes
Oct 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The commit breakdown was very helpful. Just a couple non-blocking comments.
As a precursor to making RoutePatterns a first-class resource, this frees up the `RoutePatterns.Parser` module name by moving some logic specific to `stops_by_route_and_direction/2` (currently only used to build GL E-ink line maps). This will let RoutePatterns follow the same module naming convention as other resources.
This makes RoutePatterns a resource with its own attributes that can be fetched directly, similar to Routes or Stops.
This creates a `line` field on Routes and populates it wherever Routes are fetched.
This is in support of the new "real-time destinations" logic. * RoutePatterns now have a `headsign`, which is the headsign of their representative trip. * Trips now have a `pattern_headsign`, which is the headsign of their route pattern (if they have one), and a `representative_headsign` accessor, which returns the pattern headsign if there is one and the regular headsign if not. * Departures now have a `representative_headsign` accessor, which delegates to the same-named accessor on the Trip of either their Prediction or Schedule, as appropriate.
This adds a module which generates "destinations" from screen configs, the first step in the proposed "real-time destinations" logic. Both "permanent" (from typical route patterns) and "live" (from upcoming departures) destinations are generated. Initially there is only one possible state for a destination, `NoDepartures`. Following tasks will add more states and wire these into the `DupNew` screen variant.
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.
This adds a module which generates "destinations" from screen configs, the first step in the proposed real-time destinations logic. Both "permanent" (from typical route patterns) and "live" (from upcoming departures) destinations are generated. Initially there is only one possible state for a destination,
NoDepartures
. Following tasks will add more states and wire these into theDupNew
screen variant.This required a lot of refactoring and expansion of how we fetch data. Individual commit messages have the explanations of this. 📝