-
Notifications
You must be signed in to change notification settings - Fork 101
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
Implement #212 - Increasing distance stop times verification #350
Merged
Conversation
This file contains 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
- write new error and warning notices - export notices as pb and json - write test to verify said export
- write test to verify said implementation
lionel-nj
added
the
python validator
Rules implemented in the original Google Python Validator
label
Aug 25, 2020
barbeau
suggested changes
Aug 28, 2020
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.
Thanks @lionel-nj! Some comments in-line.
...r/exporter/src/main/java/org/mobilitydata/gtfsvalidator/exporter/ProtobufNoticeExporter.java
Outdated
Show resolved
Hide resolved
...litydata/gtfsvalidator/domain/entity/notice/error/DecreasingStopTimeDistanceErrorNotice.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/mobilitydata/gtfsvalidator/usecase/ValidateStopTimeIncreasingDistance.java
Outdated
Show resolved
Hide resolved
...litydata/gtfsvalidator/domain/entity/notice/error/DecreasingStopTimeDistanceErrorNotice.java
Outdated
Show resolved
Hide resolved
...litydata/gtfsvalidator/domain/entity/notice/error/DecreasingStopTimeDistanceErrorNotice.java
Outdated
Show resolved
Hide resolved
...test/java/org/mobilitydata/gtfsvalidator/usecase/ValidateStopTimeIncreasingDistanceTest.java
Show resolved
Hide resolved
- remove unused Notice - rework notice constructor for consistency and clarity - rename notice - update related tests - update rules docs - write additional test
- change error code for future merge to master
# Conflicts: # RULES.md # adapter/exporter/src/main/java/org/mobilitydata/gtfsvalidator/exporter/JsonNoticeExporter.java # adapter/exporter/src/main/java/org/mobilitydata/gtfsvalidator/exporter/ProtobufNoticeExporter.java # adapter/exporter/src/test/java/org/mobilitydata/gtfsvalidator/exporter/JsonNoticeExporterTest.java # adapter/exporter/src/test/java/org/mobilitydata/gtfsvalidator/exporter/ProtobufNoticeExporterTest.java # domain/src/main/java/org/mobilitydata/gtfsvalidator/domain/entity/notice/NoticeExporter.java # domain/src/main/java/org/mobilitydata/gtfsvalidator/domain/entity/notice/base/ErrorNotice.java # domain/src/main/java/org/mobilitydata/gtfsvalidator/domain/entity/notice/base/Notice.java
barbeau
approved these changes
Sep 4, 2020
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.
LGTM!
# Conflicts: # adapter/exporter/src/main/java/org/mobilitydata/gtfsvalidator/exporter/JsonNoticeExporter.java # adapter/exporter/src/main/java/org/mobilitydata/gtfsvalidator/exporter/ProtobufNoticeExporter.java # adapter/exporter/src/test/java/org/mobilitydata/gtfsvalidator/exporter/JsonNoticeExporterTest.java # adapter/exporter/src/test/java/org/mobilitydata/gtfsvalidator/exporter/ProtobufNoticeExporterTest.java # domain/src/main/java/org/mobilitydata/gtfsvalidator/domain/entity/notice/NoticeExporter.java # domain/src/main/java/org/mobilitydata/gtfsvalidator/domain/entity/notice/base/Notice.java # domain/src/main/java/org/mobilitydata/gtfsvalidator/domain/entity/notice/base/WarningNotice.java
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:
This PR provides support to verify that for each stop time of a trip have increasing
shape_dist_travelled
valuedExpected behavior:
The Python validator code treats this rule as follows:
shape_dist_travelled
-> this is an errorshape_dist_travelled
not ordered by ascending order -> this is an errorCode fro the Python valdiator https://github.com/MobilityData/transitfeed/blob/54a4081b59bfa015d5f0405b68203e61762d4a52/transitfeed/trip.py#L594
Tests from the python validator
https://github.com/MobilityData/transitfeed/blob/54a4081b59bfa015d5f0405b68203e61762d4a52/tests/transitfeed/testtrip.py#L357
Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).
Please make sure these boxes are checked before submitting your pull request - thanks!
gradle test
to make sure you didn't break anything