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

Update cause enum for alert #856

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ErinLMoore
Copy link
Contributor

@ErinLMoore ErinLMoore commented Jan 30, 2025

Summary of changes

Asana Ticket: Update cause list in API repo

The hard-coded Cause enum used in alerts is outdated, this updates it to be the same as the enum we use in AlertsUI.

Feel free to assign this to a different reviewer as needed.

@ErinLMoore ErinLMoore self-assigned this Jan 30, 2025
@ErinLMoore ErinLMoore requested a review from Whoops January 30, 2025 20:31
@Whoops Whoops force-pushed the elm-update-cause-enum branch from 2e22429 to 6a34178 Compare January 31, 2025 15:44
@rudiejd
Copy link
Contributor

rudiejd commented Feb 18, 2025

@ErinLMoore if these are going to change, could you please update the GTFS documentation too? https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#enum-cause

@rudiejd
Copy link
Contributor

rudiejd commented Feb 19, 2025

Oops, I meant to link the MBTA GTFS docs for alerts. If the values are only changing in the API and not GTFS, it's fine not to update that. But in that case, we should still have a list of all the potential causes somewhere, since the API documentation links to the GTFS-RT Alert entity, but the causes in this enum are not listed in that specification

@ErinLMoore
Copy link
Contributor Author

Oops, I meant to link the MBTA GTFS docs for alerts. If the values are only changing in the API and not GTFS, it's fine not to update that. But in that case, we should still have a list of all the potential causes somewhere, since the API documentation links to the GTFS-RT Alert entity, but the causes in this enum are not listed in that specification

These values come from the GTFS-RT enhanced field called "cause detail", which gets called "cause" in the API, and the actual "cause" field is dropped. In the GTFS, cause detail isn't defined as an enum, it's just a string. That's the reason none of these values have been in the GTFS docs. If you think it's a good idea, I can update the API docs to reflect that.

@ErinLMoore ErinLMoore force-pushed the elm-update-cause-enum branch from e55af41 to 34cb9b1 Compare February 27, 2025 16:55
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.

3 participants