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

display individual bus route alerts #708

Merged
merged 1 commit into from
Oct 12, 2023
Merged

display individual bus route alerts #708

merged 1 commit into from
Oct 12, 2023

Conversation

panentheos
Copy link
Collaborator

Summary of changes

Asana Ticket: Display individual bus route alerts

This adds "no service" messages for individual bus routes when there is an alert present, and no predictions. Also upgrades the stop-level "no service" message with new audio, and fixes a bug in the config loading that prevented bus alerts from loading.

Includes a mapping from bus route to destination name, which was pulled from the API using the included one-off script.

@panentheos panentheos requested a review from PaulJKim October 11, 2023 15:23
@github-actions
Copy link

Coverage of commit 4b5d499

Summary coverage rate:
  lines......: 73.6% (1998 of 2716 lines)
  functions..: 78.8% (550 of 698 functions)
  branches...: no data found

Files changed coverage rate:
                                                             |Lines       |Functions  |Branches    
  Filename                                                   |Rate     Num|Rate    Num|Rate     Num
  =================================================================================================
  lib/pa_ess/utilities.ex                                    |48.1%    310|96.4%    28|    -      0
  lib/signs/bus.ex                                           |85.9%    248|95.5%    44|    -      0
  lib/signs/utilities/signs_config.ex                        |95.2%     21|80.0%     5|    -      0

Download coverage report

Copy link
Collaborator

@PaulJKim PaulJKim left a comment

Choose a reason for hiding this comment

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

Code looks good. Were you able to test this locally though? I'm struggling to create an alert that will trigger the alert messaging, but I'm also not familiar with how OIO's set up bus alerts of this sort.

@panentheos
Copy link
Collaborator Author

I did some local testing, but only with synthetic alert statuses, not producing the status with an actual alert. I had assumed that the data flow would work the same as it currently does for rail alerts, but I agree it would be good to do some end-to-end verification first.

@panentheos
Copy link
Collaborator Author

Ok, I tested locally by adding a route alert in dev (and locally blocking predictions for that route), and the alert message showed as expected.

@panentheos panentheos merged commit fbcde45 into main Oct 12, 2023
1 check passed
@panentheos panentheos deleted the bhw/bus-alerts branch October 12, 2023 19:58
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