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

use day-of-week based headway periods #837

Closed
wants to merge 1 commit into from
Closed

Conversation

panentheos
Copy link
Collaborator

Summary of changes

Asana Ticket: Change RTS to read these new values, handle appropriately

This switches to reading the new day-of-week based headway periods.

Also modifies the config parsing code so it doesn't log errors when encountering unexpected data (which we'll have during the transition). Note that the current code will log errors in this case, so we expect to see some errors logged between deploying the signs-ui change and deploying this.

@panentheos panentheos requested a review from a team as a code owner October 28, 2024 17:12
end)
for {group, periods} <- map,
{period, %{"range_low" => low, "range_high" => high}} <- periods,
time_period = parse_time_period(period) do
Copy link
Collaborator

Choose a reason for hiding this comment

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

since time_period could be nil and then is passed to the Headway struct, shouldn't the typespec for Headway.time_period() also include | nil?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We're relying on the fact that falsy values act like a filter, so they actually get skipped and we don't create Headway structs for those.

@panentheos
Copy link
Collaborator Author

Closing in favor of #839

@panentheos panentheos closed this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants