Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ga4gh/va_spec/base/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,8 +989,8 @@ class Statement(InformationEntity, BaseModelForbidExtra):
...,
description="A possible fact, the validity of which is assessed and reported by the Statement. A Statement can put forth the proposition as being true, false, or uncertain, and may provide an assessment of the level of confidence/evidence supporting this claim.",
)
direction: Direction | None = Field(
default=None,
direction: Direction = Field(
...,
description="A term indicating whether the Statement supports, disputes, or remains neutral w.r.t. the validity of the Proposition it evaluates.",
)
strength: MappableConcept | iriReference | None = Field(
Expand Down
4 changes: 3 additions & 1 deletion tests/test_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ def test_public_modules_import_and_resolve_recursive_models():
import ga4gh.va_spec.acmg_2015
import ga4gh.va_spec.base
import ga4gh.va_spec.ccv_2022
from ga4gh.va_spec.base import Statement
from ga4gh.va_spec.base import Direction, Statement

Statement(
direction=Direction.SUPPORTS,
proposition={"type": "Proposition", "subject": {}, "predicate": "relatedTo", "object": {}},
hasEvidence=[
{
"type": "Statement",
"direction": "supports",
"proposition": {"type": "Proposition", "subject": {}, "predicate": "relatedTo", "object": {}},
}
],
Expand Down
9 changes: 7 additions & 2 deletions tests/validation/test_va_spec_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ def test_variant_pathogenicity_stmt(pathogenicity_evidence_line_params):

def test_statement_proposition_accepts_iri_reference():
"""Statements may reference a proposition instead of embedding one."""
statement = Statement(proposition="propositions.json#/1")
statement = Statement(
proposition="propositions.json#/1", direction=Direction.SUPPORTS
)

assert statement.proposition == iriReference(root="propositions.json#/1")

Expand All @@ -495,7 +497,7 @@ def test_base_statement_and_evidence_line_accept_generic_propositions():
type="Proposition", subject={}, predicate="relatedTo", object={}
)

statement = Statement(proposition=proposition)
statement = Statement(proposition=proposition, direction=Direction.SUPPORTS)
evidence_line = EvidenceLine(
directionOfEvidenceProvided="neutral", targetProposition=proposition
)
Expand Down Expand Up @@ -656,6 +658,7 @@ def test_pathogenicity_profile_accepts_schema_permitted_references():
strengthOfEvidenceProvided="strengths.json#/1",
)
statement = VariantPathogenicityStatement(
direction=Direction.SUPPORTS,
proposition="propositions.json#/1",
strength="strengths.json#/1",
classification="classifications.json#/1",
Expand Down Expand Up @@ -799,6 +802,7 @@ def test_oncogenicity_profile_accepts_schema_permitted_references():
strengthOfEvidenceProvided="strengths.json#/1",
)
statement = VariantOncogenicityStatement(
direction=Direction.SUPPORTS,
proposition="propositions.json#/1",
strength="strengths.json#/1",
classification="classifications.json#/1",
Expand Down Expand Up @@ -844,6 +848,7 @@ def test_variant_onco_el_no_evidence_outcome():
def test_aac_profile_accepts_schema_permitted_references():
"""AAC models accept opaque classification and strength IRIs."""
statement = VariantClinicalSignificanceStatement(
direction=Direction.SUPPORTS,
proposition="propositions.json#/1",
strength="strengths.json#/1",
classification="classifications.json#/1",
Expand Down
Loading