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
3 changes: 3 additions & 0 deletions src/ga4gh/va_spec/aac_2017/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ class VariantClinicalSignificanceStatement(
@classmethod
def validate_tier_evidence_lines(cls, values: dict) -> dict:
"""Validate tier I and II evidence-line types before base coercion."""
if not isinstance(values, dict):
return values

classification = values.get("classification")
if not isinstance(classification, dict):
return values
Expand Down
12 changes: 9 additions & 3 deletions tests/validation/test_va_spec_fixtures_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@


for test_def in test_definitions:
if test_def["namespace"].startswith("va-spec."):
schema = get_va_spec_schema(test_def["namespace"].split("va-spec.")[-1])
VA_SPEC_TEST_DEFINITIONS[schema].append(test_def)
namespace = test_def["namespace"]
# Base (core) fixtures use the namespace ``va-spec``; profiles use
# ``va-spec.<profile>``. Anything else (e.g. ``vrs``) is out of scope.
if namespace != "va-spec" and not namespace.startswith("va-spec."):
continue
schema = get_va_spec_schema(namespace.split("va-spec.")[-1])
if schema is None:
continue
VA_SPEC_TEST_DEFINITIONS[schema].append(test_def)


def test_va_spec_fixtures():
Expand Down
Loading