Skip to content
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: validation rules for networks and route_networks #1671

Merged
merged 7 commits into from
Mar 5, 2024
Merged

Conversation

cka-y
Copy link
Contributor

@cka-y cka-y commented Feb 13, 2024

Pull Request Description

Summary:
Closes #1618

IntroducesNetworkIdConsistencyValidator, a new validation rule in the GTFS validator suite that ensures consistency in network ID usage across the feed. This validator checks for one condition:

  • Conditional Forbidden File Presence: If the network_id field is present in the routes.txt file, then neither route_networks.txt nor networks.txt files should be present.

Expected behavior:
Results using this modified feed
image

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

  • Run the unit tests with gradle test to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

Copy link
Contributor

✅ Rule acceptance tests passed.
New Errors: 0 out of 1450 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1450 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
New Warnings: 0 out of 1450 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Warnings: 0 out of 1450 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
24 out of 1474 sources (~2 %) are corrupted.
Corrupted sources:
ar-buenos-aires-subterraneos-de-buenos-aires-subte-gtfs-6
at-unknown-bean-shuttle-gtfs-859
au-queensland-bus-queensland-toowoomba-bus-qld-toowoomba-gtfs-653
au-queensland-polleys-coaches-gtfs-671
au-queensland-sunbus-rockhampton-gtfs-907
au-queensland-sunbus-townsville-gtfs-677
au-queensland-townsville-gtfs-1166
au-queensland-translink-brisbane-gtfs-1214
au-tasmania-metrotas-hobart-gtfs-665
be-vlaams-gewest-de-lijn-gtfs-684
be-wallonne-tec-gtfs-1868
ca-alberta-edmonton-transit-system-gtfs-714
ca-british-columbia-bc-ferries-gtfs-690
ca-british-columbia-bc-transit-whistler-transit-system-gtfs-702
ca-british-columbia-prince-george-transit-gtfs-708
ca-british-columbia-south-okanagan-similkameen-gtfs-762
ca-british-columbia-translink-west-coast-express-gtfs-696
ca-ontario-belleville-transit-gtfs-1858
ca-ontario-durham-region-transit-gtfs-726
ca-ontario-london-transit-commission-gtfs-2
ca-ontario-ottawa-carleton-regional-transit-commission-oc-transpo-gtfs-738
ca-quebec-societe-de-transport-de-sherbrooke-gtfs-756
fr-bourgogne-franche-comte-region-bourgogne-franche-comte-gtfs-659
it-lombardia-trenord-gtfs-855
Commit: 10ce4da
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

Copy link
Contributor

@emmambd emmambd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. @tzujenchanmbd taking a look at the spec, it looks like this is the only use case where we have conditionally forbidden files, but it's something I'll be mindful of in the future as well for other use cases.

  2. Should change to duplicate_route_network_association as notice name to follow convention of our other duplicate notices: https://gtfs-validator.mobilitydata.org/rules.html (e.g duplicate_key, duplicate_column)

Copy link
Contributor

✅ Rule acceptance tests passed.
New Errors: 0 out of 1486 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1486 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
New Warnings: 0 out of 1486 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Warnings: 0 out of 1486 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
0 out of 1486 sources (~0 %) are corrupted.
Commit: 9b31e46
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

@emmambd
Copy link
Contributor

emmambd commented Feb 21, 2024

@cka-y Change to report table display for route_networks_specified_in_more_than_one_file:

fieldName (network_id) | fileNameA | fileNameB

Copy link
Contributor

✅ Rule acceptance tests passed.
New Errors: 0 out of 1483 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1483 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
New Warnings: 0 out of 1483 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Warnings: 0 out of 1483 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
3 out of 1486 sources (~0 %) are corrupted.
Corrupted sources:
at-wien-wiener-lokalbahnen-wlb-gtfs-648
br-ceara-etufor-gtfs-1863
ca-british-columbia-south-okanagan-similkameen-gtfs-762
Commit: 77d4680
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

Copy link
Contributor

✅ Rule acceptance tests passed.
New Errors: 0 out of 1504 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1504 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
New Warnings: 0 out of 1504 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Warnings: 0 out of 1504 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
2 out of 1506 sources (~0 %) are corrupted.
Corrupted sources:
dz-unknown-societe-nationale-des-transports-ferroviaires-sntf-algeria-gtfs-1199
us-massachusetts-freedom-cruise-line-gtfs-425
Commit: 6f69f45
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

@emmambd emmambd requested a review from jcpitre February 29, 2024 21:14
Copy link
Contributor

github-actions bot commented Mar 5, 2024

✅ Rule acceptance tests passed.
New Errors: 0 out of 1520 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1520 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
New Warnings: 0 out of 1520 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Warnings: 0 out of 1520 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
0 out of 1520 sources (~0 %) are corrupted.
Commit: 4d6475b
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

@cka-y cka-y merged commit 3ba27d9 into master Mar 5, 2024
333 checks passed
@cka-y cka-y deleted the feat/1618 branch March 5, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New validation rules for networks and route_networks
4 participants