{"action":"created","issue":{"url":"https://api.github.com/repos/google/transit/issues/65","repository_url":"https://api.github.com/repos/google/transit","labels_url":"https://api.github.com/repos/google/transit/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/google/transit/issues/65/comments","events_url":"https://api.github.com/repos/google/transit/issues/65/events","html_url":"https://github.com/google/transit/pull/65","id":241056495,"number":65,"title":"Remove requirement for stop_time_update arrival AND departure for SCHEDULED trips","user":{"login":"barbeau","id":928045,"avatar_url":"https://avatars0.githubusercontent.com/u/928045?v=4","gravatar_id":"","url":"https://api.github.com/users/barbeau","html_url":"https://github.com/barbeau","followers_url":"https://api.github.com/users/barbeau/followers","following_url":"https://api.github.com/users/barbeau/following{/other_user}","gists_url":"https://api.github.com/users/barbeau/gists{/gist_id}","starred_url":"https://api.github.com/users/barbeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barbeau/subscriptions","organizations_url":"https://api.github.com/users/barbeau/orgs","repos_url":"https://api.github.com/users/barbeau/repos","events_url":"https://api.github.com/users/barbeau/events{/privacy}","received_events_url":"https://api.github.com/users/barbeau/received_events","type":"User","site_admin":false},"labels":[{"id":236868408,"url":"https://api.github.com/repos/google/transit/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2017-07-06T19:10:58Z","updated_at":"2017-11-07T15:54:53Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/google/transit/pulls/65","html_url":"https://github.com/google/transit/pull/65","diff_url":"https://github.com/google/transit/pull/65.diff","patch_url":"https://github.com/google/transit/pull/65.patch"},"body":"The following wording for `stop_time_updates` that have `schedule_relationship` of `SCHEDULED` (or no `schedule_relationship` - `SCHEDULED` is default):\r\n\r\n> If the schedule for this stop contains both arrival and departure times then so must this update\r\n\r\n...is problematic from two perspectives:\r\n\r\n1. **GTFS requires both `arrival_time` and `departure_time` in `stop_times.txt` to be populated** - Looking at https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#stop_timestxt, it says:\r\n\r\n    >*If you don't have separate times for arrival and departure at a stop, enter the same value for arrival_time and departure_time*.... If this stop is not a timepoint, use either an empty string value for the arrival_time field or provide an interpolated time...Provide arrival times for all stops that are time points...\r\n\r\n    `departure_time` has similar text.\r\n\r\n    So, `arrival_time` and `departure_time` should always be populated, which means that the above wording *always* applies to `stop_time_update` `arrival` and `departure` for `SCHEDULED` (normal) trips.\r\n\r\n2. **There are valid cases where an `arrival` prediction may not exist, but a `departure` does, and vice versa** - For example, for the first stop in a trip, there may not be a rider-facing prediction for when the bus will arrive at that stop, but there is for when it will depart.  And, vice versa for the last stop in the trip.\r\n\r\nTo fix this, I'm proposing removing the following text that specifies that both arrival and departure must be populated, which will clarify that providers are allowed to provide only one of the two:\r\n\r\n> If the schedule for this stop contains both arrival and departure times then so must this update\r\n\r\nThis proposal was announced on GTFS-rt Google Group at https://groups.google.com/forum/#!topic/gtfs-realtime/hHWOJBMyDws.\r\n\r\n**EDIT October 30th 2017**\r\n\r\nReviewing the spec, elsewhere it's clear that arrival *OR* departure can be provided.\r\n\r\n[Stop Time Updates](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/trip-updates.md#stop-time-updates) narrative section says:\r\n\r\n>The update can provide a exact timing for arrival and/or departure at a stop in StopTimeUpdates using StopTimeEvent.\r\n\r\nFrom [StopTimeUpdate](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/reference.md#message-stoptimeupdate), for `arrival` and `departure`:\r\n\r\n>If schedule_relationship is empty or SCHEDULED, either arrival or departure must be provided within a StopTimeUpdate - both fields cannot be empty\r\n\r\nThe text I'm proposing to eliminate clearly conflicts with both of these, and is likely left over from an early version of the spec and Google's initial implementation."},"comment":{"url":"https://api.github.com/repos/google/transit/issues/comments/342527504","html_url":"https://github.com/google/transit/pull/65#issuecomment-342527504","issue_url":"https://api.github.com/repos/google/transit/issues/65","id":342527504,"user":{"login":"DaveBarker","id":7453714,"avatar_url":"https://avatars1.githubusercontent.com/u/7453714?v=4","gravatar_id":"","url":"https://api.github.com/users/DaveBarker","html_url":"https://github.com/DaveBarker","followers_url":"https://api.github.com/users/DaveBarker/followers","following_url":"https://api.github.com/users/DaveBarker/following{/other_user}","gists_url":"https://api.github.com/users/DaveBarker/gists{/gist_id}","starred_url":"https://api.github.com/users/DaveBarker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaveBarker/subscriptions","organizations_url":"https://api.github.com/users/DaveBarker/orgs","repos_url":"https://api.github.com/users/DaveBarker/repos","events_url":"https://api.github.com/users/DaveBarker/events{/privacy}","received_events_url":"https://api.github.com/users/DaveBarker/received_events","type":"User","site_admin":false},"created_at":"2017-11-07T15:54:53Z","updated_at":"2017-11-07T15:54:53Z","author_association":"NONE","body":"+1"}}
{"actor":{"display_login":"DaveBarker"}}