-
Notifications
You must be signed in to change notification settings - Fork 100
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
Conversation
✅ Rule acceptance tests passed. |
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.
-
@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.
-
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)
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GtfsRouteNetworkSchema.java
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/table/GtfsRouteNetworkSchema.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/NetworkIdConsistencyValidator.java
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/NetworkIdConsistencyValidator.java
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/NetworkIdConsistencyValidator.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/NetworkIdConsistencyValidator.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/NetworkIdConsistencyValidator.java
Outdated
Show resolved
Hide resolved
✅ Rule acceptance tests passed. |
@cka-y Change to report table display for route_networks_specified_in_more_than_one_file: fieldName (network_id) | fileNameA | fileNameB |
✅ Rule acceptance tests passed. |
✅ Rule acceptance tests passed. |
✅ Rule acceptance tests passed. |
Pull Request Description
Summary:
Closes #1618
Introduces
NetworkIdConsistencyValidator
, 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:network_id
field is present in theroutes.txt
file, then neitherroute_networks.txt
nornetworks.txt
files should be present.Expected behavior:
Results using this modified feed
Please make sure these boxes are checked before submitting your pull request - thanks!
gradle test
to make sure you didn't break anything