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

Configure Implemented Rules Using Parameter Config File

Open dancesWithCycles opened this issue 3 years ago • 2 comments

Feature request

Dear folks, Thank you so much for providing and maintaining this repository!

I am interested in the business rules in general and especially in FeedExpirationDateNotice. This and maybe other rules have hard coded thresholds like ...next 7 days.... I am wondering if you see value in making this or other rules more flexible by making thresholds accessible through user-defined parameter in a configuration file.

I do value it. What do you think? Has this idea been around already?

Is your feature request related to a problem? Please describe.

My feature request is not related to a problem. However, having this feature is opening doors for new use cases.

Proposed solution

Read business rule thresholds from parameter configuration file.

{
FeedExpirationDateNotice:{
MinimalDatasetFutureValidity:7,
MinimalServiceTimeCoverage:30,
},
}

I appreciate any feedback.

Cheers!

dancesWithCycles avatar Mar 24 '22 14:03 dancesWithCycles

Hi @dancesWithCycles , thanks for opening this issue! There have been discussions in #930 and #886 about the FeedExpirationDateNotice. We talked about having two different rules for the 7day and the 30day threshold, but we didn't talk about having configuration there.

Do you have use cases with user-configured thresholds for this rule? How would you use it?

isabelle-dr avatar Mar 28 '22 00:03 isabelle-dr

Do you have use cases with user-configured thresholds for this rule? How would you use it?

Hi @isabelle-dr , Yes, indeed. I have a use case that is IMHO not covered by any validator that I have found yet.

Please correct me, if I am wrong. My understanding is, that start_date and end_date in calendar.txt defines the time frame GTFS data is available in the corresponding feed. Due to exceptions in calender_dated.txt, a trip can have it's last day/data in the GTFS feed way earlier than defined in calendar.txt.

I know at least one linked transport system, that is constantly asked by customers why trips are missing in the passenger information system (PIS). Reason: The transport authority is aware of the general start and end date of routes due to the route -> trip -> service -> calendar link. But they are not aware that most trips of a certain route do not have GTFS data anymore way earlier due to exceptions in the calendar_dates.txt file.

A solution would be a business rule looking for the date most trips of a route do not have GTFS data in the current feed anymore. Being aware of this time, the authority could be triggered to get hold of a new GTFS feed to cover this gap.

I do not know if this authority is the only one that is using exceptions in calendar_dates.txt in an extend leading to this issue and producing this use case.

Was my description clear? Is this a (common) issue you have heard of?

Cheers!

dancesWithCycles avatar May 03 '22 13:05 dancesWithCycles