-
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: modified MissingPickupDropOffBookingRuleIdNotice logic #2001
Conversation
📝 Acceptance Test Report📋 Summary❌ The rule acceptance test has failed for commit ffd0e53 📊 Notices ComparisonNew Errors (0 out of 1824 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Errors (0 out of 1824 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1824 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (125 out of 1824 datasets, ~7%) ❌Details of new errors due to code change, which is above the provided threshold of 1%.
🛡️ Corruption Check0 out of 1824 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
📜 Memory Consumption
|
📝 Acceptance Test Report📋 Summary❌ The rule acceptance test has failed for commit e5b8734 📊 Notices ComparisonNew Errors (0 out of 1824 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Errors (0 out of 1824 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1824 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (125 out of 1824 datasets, ~7%) ❌Details of new errors due to code change, which is above the provided threshold of 1%.
🛡️ Corruption Check0 out of 1824 sources (~0 %) are corrupted. ⏱️ Performance Assessment📈 Validation TimeAssess the performance in terms of seconds taken for the validation process.
📜 Memory Consumption
|
Expected spec behavior here :) |
📝 Acceptance Test Report📋 Summary❌ The rule acceptance test has failed for commit 6bce44d 📊 Notices ComparisonNew Errors (0 out of 1824 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Errors (0 out of 1824 datasets, ~0%) ✅No changes were detected due to the code change. New Warnings (0 out of 1824 datasets, ~0%) ✅No changes were detected due to the code change. Dropped Warnings (125 out of 1824 datasets, ~7%) ❌Details of new errors due to code change, which is above the provided threshold of 1%.
🛡️ Corruption Check0 out of 1824 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
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/PickupBookingRuleIdValidator.java
Show resolved
Hide resolved
@@ -25,6 +25,7 @@ public PickupBookingRuleIdValidator( | |||
public void validate(GtfsStopTime entity, NoticeContainer noticeContainer) { | |||
if (entity.hasPickupType() | |||
&& entity.pickupType() == GtfsPickupDropOff.MUST_PHONE | |||
&& entity.hasStartPickupDropOffWindow() |
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.
I might misunderstand this comment: #1821 (comment)
But shouldn't it also check for entity.hasEndPickupDropOffWindow() here?
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.
I don't think so based on the revised logic:
- GtfsStopTime has a pickupType of 2, includes StartPickupDropOffWindow AND has a missing pickupBookingRuleId.
- GtfsStopTime has a dropOffType of 2 and includes EndPickupDropOffWindow AND has a missing dropOffBookingRuleId.
If one of the conditions is met, it should trigger MissingPickupDropOffBookingRuleIdNotice.
@@ -34,6 +35,7 @@ public void validate(GtfsStopTime entity, NoticeContainer noticeContainer) { | |||
} | |||
if (entity.hasDropOffType() | |||
&& entity.dropOffType() == GtfsPickupDropOff.MUST_PHONE | |||
&& entity.hasEndPickupDropOffWindow() |
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.
Same as above
Summary:
Closes #1821
Expected behavior:

I've checked some feeds listed in the New Warnings #1966 in this PR, for instance, ca-quebec-exo-laurentides-gtfs-744, the dataset doesn't have a booking rules file and its report doesn't contain MissingPickupDropOffBookingRuleIdNotice. https://mobilitydatabase.org/feeds/gtfs/mdb-744
Please make sure these boxes are checked before submitting your pull request - thanks!
gradle test
to make sure you didn't break anything