-
Notifications
You must be signed in to change notification settings - Fork 20
Wrap import methods in validation #881
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
Conversation
…s into benb/wrap_import_methods_in_validation
…s into benb/wrap_import_methods_in_validation
…s into benb/wrap_import_methods_in_validation
@@ -19,6 +23,29 @@ | |||
FEMALE = 'Female' | |||
|
|||
|
|||
def validated_hl_function( |
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.
Idea here is to wrap function with a call to "checkpoint", forcing evaluation. If one of the assigned regexes matches, we throw a validation error with the paired message.
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.
Additionally, I don't think any of the exceptions added in this PR can contribute to our expected "support for multiple validation errors"... any of these generally preclude further hail operations.
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.
I like this apporach!
This improves the quality of the validation errors thrown during our first import task, trying to disambiguate hail error thrown by issues with the VCF rather than Hail/Dataproc/bugs in our code.