datasciencecampus / transport-network-performance

Measuring the performance of transport networks around urban centres
https://datasciencecampus.github.io/transport-network-performance/
MIT License
19 stars 0 forks source link

GtfsInstance.is_valid() AttributeError on missing agency_id #24

Open r-leyshon opened 1 year ago

r-leyshon commented 1 year ago

Describe the bug

gtfs_kit feed.validate() throws an error if agency_id is missing.

Environment

Steps to reproduce

No raise on gtfs_kit feed.validate() is needed. If the GTFS is not valid, then capturing this condition in the validity table is enough.

Additional context

Inspecting GTFS. agency_id is conditionally required. gtfs_kit code needs to be investigated to find where the dependency on agency_id creeps in and whether there is acceptable logic raising this problem (eg there ARE more than one agencies operating but no agency_id is found).

For the time being, this exception is not handled in the src code in branch 15-gtfs-validation-pipeline, but it is handled in pipeline/gtfs/01-validate-gtfs.py .

r-leyshon commented 1 year ago

Google maps grab of public transport in the area:

Pasted Graphic