Add a list of validators that meet the official GTFS requirements#1315
Add a list of validators that meet the official GTFS requirements#1315aababilov wants to merge 4 commits intoMobilityData:masterfrom
Conversation
ec85aba to
a35c231
Compare
* BlockTripsWithConsistentTypeValidator * FareAttributeAgencyIdValidator * FeedHasLanguageValidator * StationUsageValidator * StopNameLatLngRequiredValidator * StopTimeInSequenceOrderValidator * TransferFrequencyBasedTripValidator * TripShapeDistTraveledValidator
a35c231 to
f85c737
Compare
asvechnikov2
left a comment
There was a problem hiding this comment.
Thanks! LGTM.
Hi @isabelle-dr, could you please take a look at the proposed validations if they look good? Do you know if there are any open issues that could be closed by this change?
...ain/java/org/mobilitydata/gtfsvalidator/validator/BlockTripsWithConsistentTypeValidator.java
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/FeedHasLanguageValidator.java
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/StationUsageValidator.java
Show resolved
Hide resolved
.../src/main/java/org/mobilitydata/gtfsvalidator/validator/StopNameLatLngRequiredValidator.java
Show resolved
Hide resolved
...src/main/java/org/mobilitydata/gtfsvalidator/validator/StopTimeInSequenceOrderValidator.java
Outdated
Show resolved
Hide resolved
.../main/java/org/mobilitydata/gtfsvalidator/validator/TransferFrequencyBasedTripValidator.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/mobilitydata/gtfsvalidator/validator/TripShapeDistTraveledValidator.java
Outdated
Show resolved
Hide resolved
It partially overlaps with StopTimeIncreasingDistanceValidator, so we will move it to a separate pull request.
|
Thanks for the ping @asvechnikov2! (and.. wow @aababilov 🎉). |
|
The LGTM. However, you do need to update |
|
I'd also call out that issue #1304 is probably still blocking us from getting a clean acceptance test run. |
| public void validate(NoticeContainer noticeContainer) { | ||
| if (agencyTable.entityCount() <= 1) { | ||
| // fare_attributes.agency_id is not required when there is a single agency. | ||
| return; |
There was a problem hiding this comment.
@isabelle-dr @aababilov I've added similar logic as part of #1318 and added a best practice MissingRecommendedFieldNotice warning to recommend that agency_id be included even when there is only one agency.
|
Hello! Sorry it took a while. A few things here:
|
|
I suggest we split this PR between what's explicitly mentioned in spec VS what is not. |
BlockTripsWithConsistentTypeValidatorBlockTripsWithInconsistentRouteTypesNotice.FareAttributeAgencyIdValidatorfare_attributes.agency_idfield is defined for every row if there is more than 1 agency in the feed.MissingRequiredFieldNotice.FeedHasLanguageValidatorfeed_info.feed_langoragency.agency_lang. Note thatfeed_langis a required field: if there is afeed_infoentity, it must havefeed_langset.agency_lang, instead, is optional. The recommended way is to providefeed_langand omitagency_lang.FeedHasNoLanguageNotice.StationUsageValidatorlocation_type=1) instops.txthas child platforms (location_type=0). Note that a station that has child entrances (location_type=2) or generic nodes (location_type=3) is also reported.StationWithoutPlatformsNotice.StopLatLngRequiredValidatorstop_latandstop_lonare set depending onlocation_type.stop_latandstop_lonare required for stations (location_type=0), stops (location_type=1) and entrances (location_type=2) and optional for other types.MissingRequiredFieldError.StopTimeInSequenceOrderValidatorarrival_time,departure_timeandshape_dist_traveledare non-decreasing along each trip.TripWithOutOfOrderArrivalTimeNoticeTripWithOutOfOrderDepartureTimeNoticeTripWithOutOfOrderShapeDistTraveledNoticeTransferFrequencyBasedTripValidatorTransferForFrequencyBasedTripNotice.TripShapeDistTraveledValidatorstop_times.shape_dist_traveledvalues properly. Please see generated notices for details.TripWithShapeDistTraveledButNoShapeNoticeTripWithShapeDistTraveledButNoShapeDistancesNoticeTripWithPartialShapeDistTraveledNotice