gtfs-validator icon indicating copy to clipboard operation
gtfs-validator copied to clipboard

Flex: Add location group schema and update stop time schema

Open emmambd opened this issue 9 months ago • 2 comments

Describe the problem

We want to be able to support Flex as a part of #1721, we need to add a schema for the new file location_groups.txt and update the stop times schema to include new fields and modify stop_id from required to conditionally required.

Proposed solution

New schema. Test by checking if:

  • foreign_key_violation is triggered when location_group_id is defined in stop_times.txt but not in location_groups.txt. Test with modified-flex-feed-4226672-missing.zip. I removed location_group_id 4226672 from location_groups.txt in https://data.trilliumtransit.com/gtfs/islandtransit-wa-us/islandtransit-wa-us--flex-v2-TEST.zip to test this.

  • Check that missing_required_field no longer triggers when there's no stop_id in stop_times.txt AND no location_id . Check with https://data.trilliumtransit.com/gtfs/islandtransit-wa-us/islandtransit-wa-us--flex-v2-TEST.zip

  • Run performance tests on the implications of adding/checking additional fields in stop_times.txt

Alternatives you've considered

No response

Additional context

No response

emmambd avatar May 08 '24 21:05 emmambd

Tasks:

  • [x] Add location_groups.txt schema
  • [ ] Update stop_times.txt schema
    • [x] Modify stop_id from required to conditionally required
    • [x] Add location_group_id
    • [ ] Add location_id
    • [ ] Add start_pickup_drop_off_window
    • [ ] Add end_pickup_drop_off_window
    • [ ] Add pickup_booking_rule_id
    • [ ] Add drop_off_booking_rule_id
  • [ ] Add validation for the all the conditionally required fields (stop_id, location_group_id, location_id, start_pickup_drop_off_window, end_pickup_drop_off_window)
  • [ ] Unit tests

cka-y avatar May 16 '24 13:05 cka-y

Blocked until #1750 is completed

cka-y avatar May 16 '24 14:05 cka-y

As part of QA for this issue:

Test #1776 and #1761

emmambd avatar Sep 09 '24 19:09 emmambd

@jcpitre Updated requirements for the notice currently called unique_location_id_violation in the issue above

emmambd avatar Sep 09 '24 20:09 emmambd