Conversation
-for Float and Integer types. Including range validation. -refactor String validation to expose only GTFS types to client code (id and text)
-add validation code -specified format HH:MM:SS or H:MM:SS -add unit testing of method
Errors are differentiated in the errorDescription field with the title always being the same (title = generic, description = specific). Do you think title should also be made specific ? |
Added to the test suite, seems to correctly reject |
Yep, I thought as well. Could you guide me as what would be a sensible cutoff value to make the distinction ? something like over 26:59:59 being suspicious ? |
-add test to check for HHH:MM:SS rejection
Yes, I'd make the title specific too. It makes it much easier to understand what the rule is when scanning a table like https://github.com/CUTR-at-USF/gtfs-realtime-validator/blob/master/RULES.md#table-of-errors. |
Choosing the threshold is the hard part :). When possible we tried to base the thresholds in GTFS-rt validator on real data. So the scientific way to do this would be to run a query against https://openmobilitydata.org/ and find the 95th percentile of times, and use this. You could ask Leo if it's ok to reach out to Matt at TransitScreen to ask if they could run this type of query (Drew at Interline for TransitLand would be the other option). Outside of this, though, you could post a question to GitHub google/transit, or the transit-developers group. My personal guess is that For any such thresholds, I would also suggest that we consider making them user-configurable via command-line parameters. |
hey @LeoFrachet , what do you think would be a sensible approach to defining the threshold value ? |
# Conflicts: # src/main/java/org/mobilitydata/gtfsvalidator/conversion/CSVtoProtoConverter.java # src/main/java/org/mobilitydata/gtfsvalidator/rules/ValidationRules.java # src/main/java/org/mobilitydata/gtfsvalidator/util/GTFSTypeValidationUtils.java # src/test/java/org/mobilitydata/gtfsvalidator/util/GTFSTypeValidationUtilsTest.java
-required changes after merging PR #19 to master
-add check for suspicious value leading to a warning -default set at >= 27:00:00
|
Merging this with a '27:00:00' warning threshold while opening a feature issue to fine tune the value |
Summary:
Add validation for Time GTFS type as defined in specification https://gtfs.org/reference/static/#field-types .
Relates to #14
Expected behavior:

Please make sure these boxes are checked before submitting your pull request - thanks!
gradle testto make sure you didn't break anything