MobilityData / gtfs-validator

Canonical GTFS Validator project for schedule (static) files.
https://gtfs-validator.mobilitydata.org/
Apache License 2.0
288 stars 101 forks source link

feat: added `forbidden_prior_day_booking_field_value`, `invalid_prior_notice_duration_min` and `forbidden_prior_notice_start_day` notices #1860

Closed cka-y closed 1 month ago

cka-y commented 1 month ago

Summary:

This PR introduces three new validation notices: forbidden_prior_day_booking_field_value, invalid_prior_notice_duration_min, and forbidden_prior_notice_start_day.

Expected Behavior:

A validation notice with ERROR severity is generated when any of the above conditions are met for each specific notice.

Using this modified feed, the following validation results were obtained:
Screenshot 2024-10-02 at 11 18 38β€―AM

Please make sure these boxes are checked before submitting your pull request - thanks!

github-actions[bot] commented 1 month ago

πŸ“ Acceptance Test Report

πŸ“‹ Summary

βœ… The rule acceptance has passed for commit 208afa452a32d54eef9f5df21fd4013f14f72143 Download the full acceptance test report here (report will disappear after 90 days).

πŸ“Š Notices Comparison

New Errors (0 out of 1588 datasets, ~0%) βœ…

No changes were detected due to the code change.

Dropped Errors (0 out of 1588 datasets, ~0%) βœ…

No changes were detected due to the code change.

New Warnings (0 out of 1588 datasets, ~0%) βœ…

No changes were detected due to the code change.

Dropped Warnings (0 out of 1588 datasets, ~0%) βœ…

No changes were detected due to the code change.

πŸ›‘οΈ Corruption Check

0 out of 1588 sources (~0 %) are corrupted.

⏱️ Performance Assessment

πŸ“ˆ Validation Time

Assess the performance in terms of seconds taken for the validation process.

| Time Metric | Dataset ID | Reference (s) | Latest (s) | Difference (s) | |-----------------------------|-------------------|----------------|----------------|----------------| | Average | -- | 4.06 | 4.11 | ⬆️+0.05 | | Median | -- | 1.40 | 1.45 | ⬆️+0.05 | | Standard Deviation | -- | 11.61 | 11.61 | ⬇️-0.00 | | Minimum in References Reports | us-california-city-of-wasco-gtfs-1788 | 0.50 | 0.53 | ⬆️+0.03 | | Maximum in Reference Reports | gb-unknown-uk-aggregate-feed-gtfs-2014 | 292.43 | 291.18 | ⬇️-1.25 | | Minimum in Latest Reports | us-oregon-hut-airport-shuttle-gtfs-635 | 0.54 | 0.52 | ⬇️-0.02 | | Maximum in Latest Reports | gb-unknown-uk-aggregate-feed-gtfs-2014 | 292.43 | 291.18 | ⬇️-1.25 |
emmambd commented 1 month ago

@cka-y On a QA side, works as expected!

emmambd commented 1 month ago

@cka-y For forbidden_prior_notice_start_day, I just realized the "invalid value" language might be confusing, since the field itself is forbidden in cases where prior_notice_duration_max is provided, not just that there's an invalid specific inputted value for it.

Suggested change: "prior_notice_start_day is forbidden when prior_notice_duration_max is set"

cka-y commented 1 month ago

done @emmambd -- waiting for @tzujenchanmbd approval before merging

tzujenchanmbd commented 1 month ago

LGTM on columns displayed, notice names, and description.

github-actions[bot] commented 1 month ago

πŸ“ Acceptance Test Report

πŸ“‹ Summary

βœ… The rule acceptance has passed for commit 566fa52d8d72236bb79346181abb7db8b49ec87e Download the full acceptance test report here (report will disappear after 90 days).

πŸ“Š Notices Comparison

New Errors (0 out of 1588 datasets, ~0%) βœ…

No changes were detected due to the code change.

Dropped Errors (0 out of 1588 datasets, ~0%) βœ…

No changes were detected due to the code change.

New Warnings (0 out of 1588 datasets, ~0%) βœ…

No changes were detected due to the code change.

Dropped Warnings (0 out of 1588 datasets, ~0%) βœ…

No changes were detected due to the code change.

πŸ›‘οΈ Corruption Check

0 out of 1588 sources (~0 %) are corrupted.

⏱️ Performance Assessment

πŸ“ˆ Validation Time

Assess the performance in terms of seconds taken for the validation process.

| Time Metric | Dataset ID | Reference (s) | Latest (s) | Difference (s) | |-----------------------------|-------------------|----------------|----------------|----------------| | Average | -- | 4.10 | 4.19 | ⬆️+0.08 | | Median | -- | 1.46 | 1.51 | ⬆️+0.05 | | Standard Deviation | -- | 11.63 | 11.60 | ⬇️-0.02 | | Minimum in References Reports | au-tasmania-merseylink-gtfs-1251 | 0.52 | 0.60 | ⬆️+0.08 | | Maximum in Reference Reports | gb-unknown-uk-aggregate-feed-gtfs-2014 | 294.81 | 291.40 | ⬇️-3.41 | | Minimum in Latest Reports | ar-buenos-aires-subterraneos-de-buenos-aires-subte-gtfs-6 | 0.58 | 0.54 | ⬇️-0.04 | | Maximum in Latest Reports | gb-unknown-uk-aggregate-feed-gtfs-2014 | 294.81 | 291.40 | ⬇️-3.41 |