[uss_qualifier/flight_data_resource] Validate flights, fix flight data, test flight validation#1457
Open
the-glu wants to merge 1 commit into
Open
[uss_qualifier/flight_data_resource] Validate flights, fix flight data, test flight validation#1457the-glu wants to merge 1 commit into
the-glu wants to merge 1 commit into
Conversation
b100889 to
65c9adb
Compare
…a, test flight validation
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.
This PR try to avoid cases likes #1443 by improving flight data validation on loading.
FlightDataResourcenow validates flights as much as possible, reusingRIDCommonDictionaryEvaluator.Existing validators are reused with minor tweaks. When injection validation runs without any observation, this is an expected case rather than a real error in the new case, signaled by raising
NoObservedFlight.A few invalid data points have been fixed:
generate_registration_numberinoperator_flight_details.pywas generating invalid registration numbers.(Has been also fixed in [uss_qualifier] Clean up NetRID automated testing #1446)kentland/rid.kmlhad an invalid serial number (original issue).dcdemo.kmlhad wrong serial numbers.Test cases have been added for as many situations as possible (missing fields / wrong fields), mainly using
ExternalFilewhich is more 'malleable'.Notice that the
test_invalid_recordtest was not correct: it was using KML files instead of JSON files, generating a different error, not caught since the test is usingException. We may want to start using an explicit exception.Notice that invalid flights may still pass validation, dues to difference between rid versions, but that probably acceptable: during load, we don't know how the flight will be used.