etalab / transport-validator

GTFS validator
https://transport.data.gouv.fr/validation/
MIT License
37 stars 10 forks source link

New metadata: know if a file exist and is not empty #191

Open AntoineAugusti opened 7 months ago

AntoineAugusti commented 7 months ago

Add the following metadata, to know if these "extra files" are present and not empty:

Maybe consider adding, has_* metadata attributes for all structures/files?

https://github.com/etalab/transport-validator/blob/907efc055616aa4feb7e4c543547205cc3ec7c6e/src/metadatas.rs#L26-L28

antoine-de commented 7 months ago

I'm not really sure if we want to have this for all files, I think it's interesting to have some general capabilities like has_fare if there are one fare file and we can maybe add on top of that more statistics about the number of objects in the dataset?

For the moment we have:

stop_areas_count
stop_points_count
stops_with_wheelchair_info_count
lines_count
trips_count
trips_with_bike_info_count
trips_with_wheelchair_info_count
trips_with_shape_count
trips_with_trip_headsign_count
lines_with_custom_color_count

maybe we can put all those in a count object (keeping the old values for retrocompatibilities), and add more statistics ?

like the number of transfers, fare_rules and fare_attributes? (+routes_with_route_long_name_count asked in #190 and routes_with_route_short_name_count asked in #189 and trips_with_trip_headsign_count asked in #188 )

AntoineAugusti commented 7 months ago

@antoine-de Reading this after looking at your PR, that's a good move to introduce a stats object!