Skip to content

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

Merged
merged 11 commits into from
Sep 19, 2024

Conversation

bpblanken
Copy link
Collaborator

@bpblanken bpblanken commented Aug 29, 2024

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.

@bpblanken bpblanken changed the title Benb/wrap import methods in validation Wrap import methods in validation Sep 18, 2024
@@ -19,6 +23,29 @@
FEMALE = 'Female'


def validated_hl_function(
Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

@bpblanken bpblanken marked this pull request as ready for review September 18, 2024 14:19
@bpblanken bpblanken requested a review from a team as a code owner September 18, 2024 14:19
Copy link
Collaborator

@hanars hanars left a 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!

@bpblanken bpblanken merged commit 209d834 into dev Sep 19, 2024
3 checks passed
@bpblanken bpblanken deleted the benb/wrap_import_methods_in_validation branch September 19, 2024 10:46
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.

2 participants