-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Added a validator for forbidden shape_distance #1896
Conversation
…d or location_group_id
.../main/java/org/mobilitydata/gtfsvalidator/validator/StopTimeIncreasingDistanceValidator.java
Outdated
Show resolved
Hide resolved
return header.hasColumn(GtfsStopTime.SHAPE_DIST_TRAVELED_FIELD_NAME) | ||
&& (header.hasColumn(GtfsStopTime.LOCATION_ID_FIELD_NAME) | ||
|| header.hasColumn(GtfsStopTime.LOCATION_GROUP_ID_FIELD_NAME)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐
📝 Acceptance Test Report📋 Summary✅ The rule acceptance has passed for commit 653e196 📊 Notices ComparisonNew Errors (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Errors (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. 🛡️ Corruption Check0 out of 1602 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
📜 Memory Consumption
|
…d StopTimeIncreasingDistanceValidator
📝 Acceptance Test Report📋 Summary✅ The rule acceptance has passed for commit 4f009ba 📊 Notices ComparisonNew Errors (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Errors (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. 🛡️ Corruption Check0 out of 1602 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
📜 Memory Consumption
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
📝 Acceptance Test Report📋 Summary✅ The rule acceptance has passed for commit 97741e7 📊 Notices ComparisonNew Errors (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Errors (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (0 out of 1602 datasets, ~0%) ✅No changes were detected due to the code change. 🛡️ Corruption Check0 out of 1602 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
📜 Memory Consumption
|
Summary:
Closes #1885
Added a validator that checks for stopTime entries with location_id or location_group_id values that also have shape_dist_traveled value. If found, add a ForbiddenShapeDistTraveledNotice notice.
Expected behavior:
Used http://data.trilliumtransit.com/gtfs/thurston-wa-us/thurston-wa-us--flex-v2.zip as a test dataset.
Report before the change:
Report after the change:
Essentially we created 156 forbidden_shape_dist_traveled notices.
#1895 should take care of removing the 156 decreasing_or_equal_stop_time_distance notices.
Please make sure these boxes are checked before submitting your pull request - thanks!
gradle test
to make sure you didn't break anything