CUTR-at-USF / transit-feed-quality-calculator

A tool that uses the gtfs-realtime-validator to calculate the quality of a large number of GTFS-realtime feeds
Other
7 stars 1 forks source link

Retrieve rule list dynamically from gtfs-rt-validator library #6

Closed barbeau closed 6 years ago

barbeau commented 6 years ago

Summary:

Currently we have two classes in this project, ErrorDescription and WarningDescription, that contain a list of all rules with their descriptions.

Instead of hard-coding this here, I'd like to pull it dynamically from the gtfs-realtime-validator library project, so we don't need to update this project each time we add a new rule in gtfs-realtime-validator.

I believe we should be able to use edu.usf.cutr.gtfsrtvalidator.validation.ValidationRules.getRules(), which will return a list of ValidationRule objects. The names of each object should be in the format of "E001", and for each ValidationRule, you can use ValidationRule.getErrorId() to get the same type of format "E001", and ValidationRule.getErrorDescription() to get the description that's currently defined in ErrorDescription and WarningDescription.

@Suryakandukoori Would you be able to tackle this issue?

barbeau commented 6 years ago

Reopening - we still need to address the "1-Rules" tab. This should add the entire list of rules that were used in validation, and then add another column that's named "Included in analysis", and the value will be "Yes" for rules that were included, and "No" for fields that were filtered out via the ResultsAnalyzer constructor via errorsToIgnore and warningsToIgnore parameters.

barbeau commented 6 years ago

@Suryakandukoori Turns out I wrote the description of this issue incorrectly - in the "Rules" tab and "Error Frequency" tab of the Excel spreadsheet, the ValidationRule.title should be written to the spreadsheet, not the ValidationRule.errorDescription. Would you be able to do a quick fix for this? If not I'll tackle it.

Suryakandukoori commented 6 years ago

@barbeau I will handle this

barbeau commented 6 years ago

Fixed in PR https://github.com/CUTR-at-USF/transit-feed-quality-calculator/pull/21.

barbeau commented 6 years ago

Fixed via https://github.com/CUTR-at-USF/transit-feed-quality-calculator/pull/21.