Repository navigation
feat!: update models to va-spec 1.1.0-ballot.2026-09.1 - #78
Merged
Merged
Conversation
Addresses two review findings from #78. Targets the `ballot-updates` branch so the fixes land in that PR. ## 1. Base-namespace fixtures were silently unvalidated The va-spec `1.1.0-ballot.2026-09` submodule labels core/base test fixtures with the namespace `va-spec` (no dot); profile fixtures use `va-spec.<profile>`. The fixture-discovery loop in `test_va_spec_fixtures_validation.py` only kept namespaces matching `startswith("va-spec.")`, so **all 39 base fixtures were dropped** and `test_va_spec_fixtures` validated only the 20 profile fixtures — while still passing green, hiding the loss of coverage. Fix: accept the bare `va-spec` namespace (routed to `VaSpecSchema.BASE`) and `continue` past any namespace `get_va_spec_schema` doesn't recognize (also removes a latent `KeyError` on `VA_SPEC_TEST_DEFINITIONS[None]`). Routing after the fix (verified against the pinned submodule's `test_definitions.yaml`): | schema | fixtures | |--------|----------| | BASE | 39 (was **0**) | | AAC_2017 | 11 | | ACMG_2015 | 5 | | CCV_2022 | 4 | | skipped (`vrs`) | 2 | ## 2. AAC `validate_tier_evidence_lines` crashed on non-dict input `VariantClinicalSignificanceStatement.validate_tier_evidence_lines` runs in pydantic `mode="before"` and called `values.get(...)` unconditionally, so validating from a non-dict input (e.g. `model_validate("propositions.json#/1")`) raised `AttributeError` instead of a normal validation error. Added an `isinstance(values, dict)` passthrough guard, matching the existing nested type guards in the same validator. ## Verification - `ruff` / `ruff-format` pre-commit hooks pass on both files. - Fixture routing table above reproduced with the real submodule namespaces. - Non-dict guard exercised (str / list / `None` pass through; dict still processed). Note: the local environment has stale dependency versions (vrs 2.0.0 / cat_vrs 0.5.0, no `ga4gh.core.metadata`), so the re-enabled base fixtures could not be executed here — CI on the updated deps should confirm they validate. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
) Two remaining cleanups from the review of #78. (The third — the duplicated `iriReference` member in `ExperimentalVariantFunctionalImpactProposition.object` — was already fixed on `ballot-updates` in "fix dup", so it's not included here.) ## 1. `VariantOncogenicityStatement.classification` was undocumented The field used `Field(...,)` with no `description`, so the `Field()` wrapper added nothing over a bare annotation and the field shipped undocumented (unlike its ACMG/AAC siblings and the base `Statement.classification`). Added a CCV-appropriate description mirroring the sibling profiles. ## 2. Method type resolved by mangled member NAME instead of value `_validate_method_type_evidence_outcome` did `cls.MethodType[method_type.upper()]`, looking the enum up by **member name**. That only works because every `MethodType` value happens to equal its lowercased member name — a coupling that silently breaks the day a value diverges from its identifier. `specifiedBy.methodType` holds the enum **value**, so it's now resolved with `cls.MethodType(method_type)` (value lookup), keeping the same friendly error message. ## Verification - `ruff` / `ruff-format` pre-commit hooks pass. - Value lookup resolves all 17 ACMG + 8 CCV method-type values (verified against the enum source); unknown strings raise `ValueError`, which the surrounding `except` still converts to the friendly message. Note: local dependency versions are stale (vrs 2.0.0 / cat_vrs 0.5.0, no `ga4gh.core.metadata`), so the full model suite could not be executed here — CI on the updated deps should confirm. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Changes: https://github.com/ga4gh/va-spec/compare/1.1.0-snapshot.2026-06.1..1.1.0-ballot.2026-09