public-transport / ideas

How to make public transport more comfortable, more accessible, more transparent?
Creative Commons Attribution Share Alike 4.0 International
37 stars 0 forks source link

establish a cross-project test suite for GTFS libraries #17

Open derhuerst opened 4 years ago

derhuerst commented 4 years ago

From https://github.com/georust/transitfeed/issues/5#issuecomment-649095015:

reusability

Answering quite basic (but very relevant in practical usage of GTFS) questions like When does any vehicle depart at a bus stop? is surprisingly much work: GTFS Time values are inherently timezone-dependent, frequencies.txt with exact_times=1 defines "stop times" as well, etc. With the ever-growing number of optional parts and extensions, doing GTFS processing right is a lot of work, so we should make the implementation in this project as reusable/flexible as possible.

Also, a project- and language-independent test suite, i.e. a set of fixtures per "question"/operation, would be very helpful for this. Those have been very successful in other areas, e.g. for WebSocket implementations or for HTML5 parsers.

validation

There are a bazillion validation (i.e. "semantic checks on the actual data") cases; The best practices page is long, and the GTFS issue tracker and mailing lists are full of edge cases. There are at east 20 libs across languages doing some form of validation, but none of them cover all the issues that we see with GTFS feeds in the wild.

I'd dare to say that people don't care which language a GTFS validator is written in, but they strongly prefer a certain language for "questions"/analysis. Like the "questions"/analysis mentioned above, validation lends itself to a project- and language-independent set of fixtures, maintained by the wider GTFS community. I hope this will push the overall quality of GTFS feeds, and reduce the amount of duplicated work poured into all those GTFS validation libs. I therefore propose not to put too much effort into validation in this project (I'm obviously just a random stranger telling what to do 😬).

derhuerst commented 3 years ago

https://github.com/conveyal/gtfs-lib/tree/238b790fdfb65b1af730305e56ea2de032d8e1ea/src/test/resources

derhuerst commented 3 years ago

https://github.com/public-transport/gtfs-utils/tree/2828d0a4f82e3fbca51b7eb9324ea66da8e1870e/test/fixtures

derhuerst commented 2 years ago

https://github.com/derhuerst/gtfs-via-postgres/tree/bd23f33fb831f821b2a24dcfb3c083c3afebd57f/test/calendar-dates-only

derhuerst commented 2 years ago

related: https://github.com/MobilityData/gtfs-validator/issues/1098

barbeau commented 2 years ago

FWIW, OpenTripPlanner includes a few GTFS datasets in it's test suite: https://github.com/opentripplanner/OpenTripPlanner/tree/dev-2.x/src/test/resources/gtfs

derhuerst commented 2 years ago

https://github.com/ibi-group/datatools-server/tree/5b1906e60ba15b95581c3649a0ecb9943274a9ca/src/test/resources/com/conveyal/datatools/gtfs