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

StopTimeUpdate.ScheduleRelationship must not be SCHEDULED or SKIPPED for frequency type 0 trips #63

Open
isabelle-dr opened this issue Jan 9, 2022 · 1 comment
Labels
frequency-type-0 Related to GTFS trips defined in frequencies.txt with exact_times=0 or empty GTFS(-rt) spec clarification imported new rule your-first-pr Issues that are a good place to start contributing to the project
Milestone

Comments

@isabelle-dr
Copy link

Issue by barbeau
Sep 10, 2018
Originally opened as CUTR-at-USF#334


Summary:

For trips defined in frequencies.txt with exact_times=0, TripUpdates feeds should not have stop_time_updates with a schedule_relationship of SCHEDULED or SKIPPPED - these are only relevant for schedule-based transit (trips not defined in frequencies.txt or in frequencies.txt but with exact_times=1).

So, the following feed should not be valid:

entity {
  id: "1121"
  trip_update {
    trip {
      trip_id: "5"
      start_time: "19:29:28"
      start_date: "20180910"
      schedule_relationship: UNSCHEDULED
      route_id: "C"
    }
    stop_time_update {
      stop_sequence: 1
      arrival {
        time: 1536609516
      }
      stop_id: "421"
      schedule_relationship: SCHEDULED
    }
    stop_time_update {
      stop_sequence: 2
      arrival {
        time: 1536609552
      }
      stop_id: "425"
      schedule_relationship: SCHEDULED
    }

Related - I'm proposing adding an StopTimeUpdate.ScheduleRelationship UNSCHEDULED enumeration value in GTFS-realtime spec here:
google/transit#102

EDIT - Actually, considering that SCHEDULED is the default value, it shouldn't really be empty either, although until the above issue is clarified in GTFS-rt, I suppose empty is the best option.

Steps to reproduce:

Run TransitClock on USF Bull Runner data:
https://github.com/CUTR-at-USF/bullrunner-gtfs-realtime-generator

Expected behavior:

Flag stop_time_update with the values of SCHEDULED or SKIPPPED as an error for trips that are defined in frequencies.txt with exact_times=0 (or empty)

Observed behavior:

Validator does not flag stop_time_updates with the values of SCHEDULED or SKIPPPED as an error for trips that are defined in frequencies.txt with exact_times=0 (or empty)

Platform:

N/A

cc @scrudden

@isabelle-dr
Copy link
Author

isabelle-dr commented Jan 9, 2022

Comment by scrudden
Sep 16, 2018


I will go ahead with this with the check being that the value is not set to SCHEDULED. We can change this later to check for UNSCHEDULED if the change to the specification is agreed.

On this branch.

@isabelle-dr isabelle-dr added frequency-type-0 Related to GTFS trips defined in frequencies.txt with exact_times=0 or empty GTFS(-rt) spec clarification new rule your-first-pr Issues that are a good place to start contributing to the project imported labels Jan 9, 2022
@barbeau barbeau added this to the v1.2 milestone Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frequency-type-0 Related to GTFS trips defined in frequencies.txt with exact_times=0 or empty GTFS(-rt) spec clarification imported new rule your-first-pr Issues that are a good place to start contributing to the project
Projects
None yet
Development

No branches or pull requests

2 participants