-
Notifications
You must be signed in to change notification settings - Fork 173
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
Add conditionally required for alert #92
Conversation
…escription_text in the alert
…An alert with only a cause is useless.
The header and description text were an intentional change to "Required" as part of the GTFS-realtime v2 semantic overhaul (see #64, https://medium.com/@sjbarbeau/whats-new-in-gtfs-realtime-v2-0-cd45e6a861e9) to ensure that all alerts had a human-readable description, considering that the docs say elsewhere:
Are there other case you're seeing where human-readable text isn't needed? Or are trip cancellations the main case you're thinking of?
@gcamp Assuming we leave header and description text as required, the question here would then be if |
SIGNIFICANT_DELAYS, REDUCED_SERVICE are still useful alerts even if Trip Updates will contain the updates for relevant trips. i.e. you still want to have an alert to mention that to the user. I could also see STOP_MOVED and DETOUR be valid effect without text if the informed_entity are correctly set to stops. Most agencies I've seen anyway put "Stop moved for stop 5555 on corner of X and Y", which doesn't add anything to the alert. I'm also open to have at least one text (either description_text or header_text) provided without taking into account effect. However having both required is not how most agencies use the text fields, they often provide one or the other. Best case scenario is to have both texts (and that would be perfect for us as consumer), but I don't think it's realistic. I feel the spec should only avoid things that really doesn't make sense, even if there's a best practice to provide both text fields. |
I agree. Generally, the interactions between TripUpdates and Alerts are not well-defined at this point. My preference would be to tackle this change along with a larger effort to reconcile the two, and do this in a data-driven manner to look at actual use cases today. And, to understand why both Alert text fields aren't being populated by agencies - is this a tool limitation for publishing alerts, or is the additional text just not seen as necessary by the agency? Does the agency understand how this text appears in consumer apps? |
I agree, that need to defined more clearly. Especially if alerts are expected to change behaviour of apps/trip planner more than just display.
Would be the perfect outcome but, I would put word of caution of trying to do too much at the same time. The current system works in general, I'd try to improve more than change it significantly.
Specifically, most often we've seen agencies only put the description_text. The header text can be deduced from the effect, which I feel is fine. Some agencies also use twitter as a baseline for their alerts, and thus only have 280 (and often 140 still) characters to entry text without a title. |
@gcamp I'm circling back to this. In your opinion, are the changes in this pull request predicated on the fact that alerts are intended to a) modify the network (e.g., prevent a stop from showing up in a trip plan), not b) just be human-readable descriptions shown to the user? For example:
From my read the GTFS-rt spec isn't currently clear if expected consumer behavior is a) or b), and I'd like to resolve that. From talking with others, it seems like b) is relatively widely used but not clearly documented in the spec. If your answer to the initial question is yes, we should better define this expected alert behavior in this PR or another before adopting these changes. If your answer to the initial question is no, then I think we can pursue this PR independently of the larger a)/b) issue. What are your opinions on this? |
@barbeau These changes are not predicated on the fact that alerts are for modifying the network. My understanding is also that it was never defined clearly but most use it to display human-readable information. So the answer is no, I think is this still necessary without talking about the alert feed effect on the consumer. My two main reasons for these changes
For example, I can clearly see an agency putting "Stop X is cancelled" as title without putting a description. That should still be a valid alert, since they might not have more information than this. Otherwise, I can see the agency putting the same text in both title and description, which is arguably worst but would respect the current spec. |
Update on this, seems that producers are really adhering to the spec, so my proposition is not really relevant anymore. Here are the alerts feeds we support that either have alerts with either no alerts or no description. Note that they all have gtfs-rt version of 1.
|
Without at least one effect, header_text or description_text the alert doesn't have semantic value. At least one of these fields should be provided in addition to informed_entity.
Also fixes the error where header_text and description_text were Required even if only optional in the .proto.