feat: Add shapes.txt validator#2123
Open
cswilson252 wants to merge 23 commits intoMobilityData:masterfrom
Open
feat: Add shapes.txt validator#2123cswilson252 wants to merge 23 commits intoMobilityData:masterfrom
cswilson252 wants to merge 23 commits intoMobilityData:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new validator intended to warn when shapes.txt is missing unless the feed appears to use zone-based or fixed-stop DRT (per #1792).
Changes:
- Introduces
MissingShapesFileValidatorand a corresponding test class. - Adds unit tests covering shapes present + DRT present scenarios (and a no-shapes/no-DRT scenario).
- Adds an extra import in
ShapeUsageValidator.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| main/src/main/java/org/mobilitydata/gtfsvalidator/validator/MissingShapesFileValidator.java | New multi-file validator for warning on missing shapes.txt unless DRT indicators are present. |
| main/src/test/java/org/mobilitydata/gtfsvalidator/validator/MissingShapesFileValidatorTest.java | New unit tests for the validator behavior. |
| main/src/main/java/org/mobilitydata/gtfsvalidator/validator/ShapeUsageValidator.java | Adds an import for a nested notice type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/MissingShapesFileValidator.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/MissingShapesFileValidator.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/MissingShapesFileValidator.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/MissingShapesFileValidator.java
Outdated
Show resolved
Hide resolved
main/src/test/java/org/mobilitydata/gtfsvalidator/validator/MissingShapesFileValidatorTest.java
Show resolved
Hide resolved
main/src/test/java/org/mobilitydata/gtfsvalidator/validator/MissingShapesFileValidatorTest.java
Outdated
Show resolved
Hide resolved
main/src/test/java/org/mobilitydata/gtfsvalidator/validator/MissingShapesFileValidatorTest.java
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/MissingShapesFileValidator.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/ShapeUsageValidator.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Add validator that checks if either a shapes.txt and/or a fixed or zone-based DRT service is present (as per #1792)
DRT functionality added as per this reference
Fixes #1792
Expected behavior:
Validator will print WARNING if shapes.txt and signs of a DRT feature are not found.
Please make sure these boxes are checked before submitting your pull request - thanks!
gradle testto make sure you didn't break anything