CUTR-at-USF / gtfs-realtime-validator

Java-based tool that validates General Transit Feed Specification (GTFS)-realtime feeds. See https://github.com/MobilityData/gtfs-realtime-validator for the latest!
Other
92 stars 40 forks source link

Don't throw W003 for multiple trips in block #360

Open barbeau opened 4 years ago

barbeau commented 4 years ago

Summary:

When a vehicle is serving multiple trips in a block, it is a best practice to include TripUpdates for the current and next trip. However, there will only be a VehiclePosition for the current trip, and as a result a W003 warning is thrown.

We should improve the W003 implementation so it doesn't throw warnings if there is a TripUpdate for the next trip in the block, and a VehiclePosition exists for the TripUpdate for the current trip.

See https://groups.google.com/forum/#!topic/gtfs-realtime/lVPOmi9A5vQ.

The GTFS-rt spec also doesn't currently recommend having TripUpdate for next trip in the block, but it should.

Note that another new rule could potentially throw an error/warning specifically in the case where the feed does NOT provide a prediction for the next trip in the block.

Steps to reproduce:

Run validator on feed with TripUpdates for next trip in block

Expected behavior:

Don't throw W003

Observed behavior:

W003 is thrown

Platform:

N/A

barbeau commented 2 years ago

Recommendations for providing TripUpdates for next trip in block was adopted in PR https://github.com/google/transit/pull/206, so I'm removing the spec clarification label.