Skip to content

feat!: derive ccv evidence atrs from outcome strings - #69

Merged
korikuzma merged 2 commits into
1.1.0-snapshot.2026-06from
issue-68
Aug 6, 2026
Merged

feat!: derive ccv evidence atrs from outcome strings#69
korikuzma merged 2 commits into
1.1.0-snapshot.2026-06from
issue-68

Conversation

@korikuzma

Copy link
Copy Markdown
Collaborator

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

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
@korikuzma
korikuzma requested a review from larrybabb August 4, 2026 19:00
@korikuzma korikuzma self-assigned this Aug 4, 2026
@korikuzma
korikuzma marked this pull request as ready for review August 4, 2026 19:42
@korikuzma korikuzma linked an issue Aug 4, 2026 that may be closed by this pull request
@larrybabb
larrybabb requested a lite review from Copilot August 5, 2026 18:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and scoreOfEvidenceProvided from the parsed outcome.
  • Promote the CCV evidence-outcome regex into a shared CCV_CODE_PATTERN constant and reuse it for validation.
  • Extend tests to cover adjusted-strength outcomes, modifier normalization, and not_met behavior.

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.

Comment thread src/ga4gh/va_spec/ccv_2022/derived_evidence.py
Comment thread src/ga4gh/va_spec/ccv_2022/derived_evidence.py

@larrybabb larrybabb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks pretty clean to me. nice job.

@korikuzma

Copy link
Copy Markdown
Collaborator Author

this looks pretty clean to me. nice job.

Thanks Codex!

@korikuzma
korikuzma merged commit 22eba78 into 1.1.0-snapshot.2026-06 Aug 6, 2026
9 checks passed
@korikuzma
korikuzma deleted the issue-68 branch August 6, 2026 00:29
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.

Support strength overrides in derivde_onco_evidence_attributes

3 participants