gtfs-validator icon indicating copy to clipboard operation
gtfs-validator copied to clipboard

Trigger warning for duplicated stop_code

Open antrim opened this issue 4 years ago • 5 comments

stops.stop_code is a free text field for passenger-facing IDs. In most cases, stop_code needs to be unique in a dataset. (There may be some exceptions, for example, if stops within a station all share the same ID?)

Requested solution: Warnings on non-unique stop_code values.

Related: "[REQUEST] Implement unique Stop ID verification (GTFS Rule)" #230

antrim avatar Oct 29 '20 17:10 antrim

Hi Aaron,

Alas, such thing varies a lot among data producers. I agree that this warning could be useful for many producers. But for another large set of data producers, stop codes are not unique, and it will be just generate a long list of warning that people will start ignoring.

I would therefore advocate to not apply such validation by default, and to not generate such warning.

If there is a large need in a specific part of the industry, we invite this part of the industry to contribute in kind as an op-in validation rule.

Thanks!

LeoFrachet avatar Nov 09 '20 18:11 LeoFrachet

We invite this part of the industry to contribute in kind as an op-in validation rule

What is the framework for parameterizing what rules are called?

e-lo avatar Nov 09 '20 18:11 e-lo

By default it's only spec. We can opt-in for more strict rules, with parameters passed in a JSON, like "Add Google rules". And therefore we invite stakeholders to add additional rules if they want and to define set of rules that they deeamed important. It is mostly useful for data consumers set of rules, but if Trillium wnats to define "Trillium rules" set they can.

LeoFrachet avatar Nov 09 '20 19:11 LeoFrachet

By default it's only spec.

What about https://gtfs.org/best-practices/ ?

antrim avatar Nov 09 '20 20:11 antrim

Hello,

Two pieces of information to add here:

  1. What about https://gtfs.org/best-practices/ ?

    -> They are planned on being part of the Canonical GTFS Schedule Validator.

  2. We are working on updating the validator to be able to add a rule that is specific to one stakeholder. A user will then be able to validate against it via a command-line parameter. Would you agree to participate by having a Trillium "profile" and adding a warning for duplicated stop_code under it @antrim?

isabelle-dr avatar Jul 07 '21 21:07 isabelle-dr