-
Notifications
You must be signed in to change notification settings - Fork 1
[GEN-1717] Throwing warning for invalid oncotree codes in clinical #149
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
|
| ids=["all_invalid", "some_invalid"], | ||
| ) | ||
| def test_that_check_oncotree_codes_gives_expected_warning_when_invalid_codes( | ||
| caplog, input_data, oncotree_dict, expected_warning |
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.
TIL: caplog! Is that a pytest thing?
Seems like a cool thing to post about in #dpe-topics
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.
Yup it is: https://docs.pytest.org/en/6.2.x/logging.html#caplog-fixture. I think we used this in recover, (a little in ) main genie (but mainly because we have our own logging there) and I saw it in the synapse python client.
thomasyu888
left a comment
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.
🔥 LGTM!



Purpose: Currently there are known invalid
ONCOTREE_CODEvalues in the cohort's clinical file (for certain sites). This will be fixed upstream in the processing pipeline. Meanwhile the original ticket has been repurposed to throw a warning explicitly stating which codes are invalid prior to the code erroring due to said invalid codes (because we should be catching the invalid codes upstream but while we don't have that automation in place, we will have this here as a backup).See GEN-1717 for more BG info on this.

Testing: Tested on RENAL cohort in staging pipeline which has the invalid codes in the uploads and threw the expected warning: