Skip to content

feat: Add shapes.txt validator#2123

Open
cswilson252 wants to merge 23 commits intoMobilityData:masterfrom
cswilson252:noShapesNoDrt
Open

feat: Add shapes.txt validator#2123
cswilson252 wants to merge 23 commits intoMobilityData:masterfrom
cswilson252:noShapesNoDrt

Conversation

@cswilson252
Copy link
Copy Markdown
Contributor

@cswilson252 cswilson252 commented Mar 4, 2026

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!

  • Run the unit tests with gradle test to make sure you didn't break anything
  • 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

@cswilson252 cswilson252 marked this pull request as ready for review March 9, 2026 00:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 MissingShapesFileValidator and 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.

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.

Add shapes.txt as recommended file

2 participants