-
Notifications
You must be signed in to change notification settings - Fork 59
Multiple queries for integration test #121
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
Changes from all commits
1bc1eda
615f7b9
841e293
db13f4d
f7bfeb3
f86adb6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,12 +4,29 @@ | |
| "input_pattern": "gs://gcp-variant-transforms-testfiles/small_tests/valid-4.2_VEP.vcf", | ||
| "annotation_field": "CSQ", | ||
| "runner": "DataflowRunner", | ||
| "validation_query": [ | ||
| "SELECT COUNT(DISTINCT CSQ.Feature) AS num_features ", | ||
| "FROM {TABLE_NAME} AS t, t.alternate_bases as alts, alts.CSQ as CSQ ", | ||
| "WHERE start_position = 1110695 AND alts.alt = 'G'" | ||
| ], | ||
| "expected_query_result": { | ||
| "num_features": 3 | ||
| } | ||
| "assertion_configs": [ | ||
| { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that we have the support, please add a second query to this config, just checking the aggregates like all other tests.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct. One of the next tasks is to design more test cases.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, but still it would have been nice to have at least one case that it does multiple queries in this very PR (specially because this one lacked the simple query in every other test). Anyways, up to you.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| "query": [ | ||
| "SELECT COUNT(0) AS num_rows, ", | ||
| " SUM(start_position) AS sum_start, ", | ||
| " SUM(end_position) AS sum_end ", | ||
| "FROM {TABLE_NAME}" | ||
| ], | ||
| "expected_result": { | ||
| "num_rows": 11, | ||
| "sum_start": 21801693, | ||
| "sum_end": 21802814 | ||
| } | ||
| }, | ||
| { | ||
| "query": [ | ||
| "SELECT COUNT(DISTINCT CSQ.Feature) AS num_features ", | ||
| "FROM {TABLE_NAME} AS t, t.alternate_bases as alts, alts.CSQ as CSQ ", | ||
| "WHERE start_position = 1110695 AND alts.alt = 'G'" | ||
| ], | ||
| "expected_result": { | ||
| "num_features": 3 | ||
| } | ||
| } | ||
| ] | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
Consider documenting the type (with
# type:, see next comment) for anything that is not "private". Since you already use IntelliJ with PyCharm, you should get nice warnings when there are type issues (we will enforce fixing these warnings later as a presubmit check). Check processed_variants.py for examples of these and what/how to add imports needed for type checking.