gtfs-validator
gtfs-validator copied to clipboard
Flex: Add location group schema and update stop time schema
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
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
- [x] Modify
- [ ] 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
Blocked until #1750 is completed
As part of QA for this issue:
Test #1776 and #1761
@jcpitre Updated requirements for the notice currently called unique_location_id_violation
in the issue above