rust-transit / gtfs-structure

Read a GTFS file
MIT License
61 stars 32 forks source link

Add TTS Stop Time and make route / stop names optional #158

Closed kylerchin closed 8 months ago

kylerchin commented 8 months ago

To the Rust Transit maintainer team,

According to the GTFS specification, route_short_name and route_long_name are optional if the other one is empty. Should we throw an error if both are empty?

Additionally, stops.txt defines tts_stop_name as a new optional field which is added for users who rely on screenreaders to navigate the world. A stop_name is not required for generic / boarding nodes, and a stop_desc is never required. Thus, these have also been made optional.

This small change is ready for production. Thank you for reviewing and considering this pull request in advance.

Cordially, Kyler Chin

Tristramg commented 8 months ago

Thank you!

Changing the names to Options is a breaking change and you need to change the version in Cargo.toml

I wouldn’t want to throw an error here. While it doesn’t respect the spec, one can still do lots of things with the data. There are validation tools that allow to spot problem: https://github.com/etalab/transport-validator

antoine-de commented 8 months ago

You just need to run rust fmt and we can merge