feat!: derive ccv evidence atrs from outcome strings - #69
Merged
Conversation
close #68 * Allow `derive_onco_evidence_attributes` to accept either a criterion enum or valid ccv evidence outcome string and dervie corresponding evidence line attributes
There was a problem hiding this comment.
Pull request overview
This PR expands CCV 2022 derived-evidence helpers so derive_onco_evidence_attributes can accept either a criterion enum or a full CCV evidence outcome string (including modifiers like _moderate / _not_met) and derive the evidence line attributes accordingly.
Changes:
- Add parsing/validation of CCV outcome strings (including modifier normalization) and derive
directionOfEvidenceProvided,strengthOfEvidenceProvided, andscoreOfEvidenceProvidedfrom the parsed outcome. - Promote the CCV evidence-outcome regex into a shared
CCV_CODE_PATTERNconstant and reuse it for validation. - Extend tests to cover adjusted-strength outcomes, modifier normalization, and
not_metbehavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_ccv_derived_evidence.py | Adds assertions and new test cases for direction, adjusted strength modifiers, normalization, and not_met. |
| src/ga4gh/va_spec/ccv_2022/models.py | Extracts CCV outcome regex into CCV_CODE_PATTERN and reuses it in model validation. |
| src/ga4gh/va_spec/ccv_2022/derived_evidence.py | Implements outcome-string parsing and derives direction/strength/score based on modifiers. |
| src/ga4gh/va_spec/ccv_2022/init.py | Narrows exports to derive_onco_evidence_attributes (removes map exports). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
larrybabb
approved these changes
Aug 5, 2026
larrybabb
left a comment
Contributor
There was a problem hiding this comment.
this looks pretty clean to me. nice job.
Collaborator
Author
Thanks Codex! |
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.
close #68
derive_onco_evidence_attributesto accept either a criterion enum or valid ccv evidence outcome string and dervie corresponding evidence line attributes