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

fix: Added a validator for bad networkId foreign key in fareLegRules #1804

Closed jcpitre closed 2 months ago

jcpitre commented 2 months ago

Summary: Closes #1764

Added a validator that makes sure network id is either in networks.txt or routes.txt

You can tests with these datasets: 1764-test-invalid.zip 1764-test-networkid-in-network.zip 1764-test-networkid-in-route.zip

image

Expected behavior:

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

github-actions[bot] commented 2 months ago

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit 8766396986f270bdeec66df4f3c0c7c679b8bc22 Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (6 out of 1563 datasets, ~0%) ✅

Details of new errors due to code change, which is less than the provided threshold of 1%.

| Dataset | Notice Code | |---------|-------------| | us-california-gtrans-gtfs-616 | duplicate_key | | us-california-morro-bay-transit-gtfs-2059 | duplicate_key | | us-california-ventura-county-transportation-commission-gtfs-31 | duplicate_key | | us-california-yubasutter-transit-gtfs-79 | duplicate_key | | us-colorado-el-dorado-transit-gtfs-75 | duplicate_key | | us-massachusetts-massachusetts-bay-transportation-authority-mbta-gtfs-437 | duplicate_key |
Dropped Errors (0 out of 1563 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1563 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1563 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1563 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 | -- | 3.92 | 4.02 | ⬆️+0.10 | | Median | -- | 1.37 | 1.44 | ⬆️+0.07 | | Standard Deviation | -- | 11.63 | 11.58 | ⬇️-0.05 | | Minimum in References Reports | us-california-flex-v2-developer-test-feed-2-gtfs-1818 | 0.51 | 0.63 | ⬆️+0.12 | | Maximum in Reference Reports | gb-unknown-uk-aggregate-feed-gtfs-2014 | 335.54 | 330.04 | ⬇️-5.50 | | Minimum in Latest Reports | us-california-catalina-express-gtfs-299 | 0.52 | 0.56 | ⬆️+0.04 | | Maximum in Latest Reports | gb-unknown-uk-aggregate-feed-gtfs-2014 | 335.54 | 330.04 | ⬇️-5.50 |
github-actions[bot] commented 2 months ago

📝 Acceptance Test Report

📋 Summary

✅ The rule acceptance has passed for commit d6711f1f38cf162591de1c1cbad01a78dfce7036 Download the full acceptance test report here (report will disappear after 90 days).

📊 Notices Comparison

New Errors (6 out of 1564 datasets, ~0%) ✅

Details of new errors due to code change, which is less than the provided threshold of 1%.

| Dataset | Notice Code | |---------|-------------| | us-california-gtrans-gtfs-616 | duplicate_key | | us-california-morro-bay-transit-gtfs-2059 | duplicate_key | | us-california-ventura-county-transportation-commission-gtfs-31 | duplicate_key | | us-california-yubasutter-transit-gtfs-79 | duplicate_key | | us-colorado-el-dorado-transit-gtfs-75 | duplicate_key | | us-massachusetts-massachusetts-bay-transportation-authority-mbta-gtfs-437 | duplicate_key |
Dropped Errors (0 out of 1564 datasets, ~0%) ✅

No changes were detected due to the code change.

New Warnings (0 out of 1564 datasets, ~0%) ✅

No changes were detected due to the code change.

Dropped Warnings (0 out of 1564 datasets, ~0%) ✅

No changes were detected due to the code change.

🛡️ Corruption Check

0 out of 1564 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 | -- | 3.90 | 3.95 | ⬆️+0.04 | | Median | -- | 1.35 | 1.40 | ⬆️+0.05 | | Standard Deviation | -- | 11.46 | 11.35 | ⬇️-0.11 | | Minimum in References Reports | us-massachusetts-massachusetts-area-express-max-gtfs-431 | 0.48 | 0.55 | ⬆️+0.07 | | Maximum in Reference Reports | gb-unknown-uk-aggregate-feed-gtfs-2014 | 327.67 | 321.52 | ⬇️-6.15 | | Minimum in Latest Reports | ar-buenos-aires-subterraneos-de-buenos-aires-subte-gtfs-6 | 0.53 | 0.52 | ⬇️-0.01 | | Maximum in Latest Reports | gb-unknown-uk-aggregate-feed-gtfs-2014 | 327.67 | 321.52 | ⬇️-6.15 |
emmambd commented 2 months ago

I wanted to QA this one before it got merged ;) Will do this morning