fix: leave number_of_cases alone instead of coercing it to study_size - #119
Merged
Conversation
number_of_cases is a legitimate Biolink Association slot (cases carrying the phenotype/disease), but STUDY_SIZE_PREFIX_PATTERN matched it via 'number of cases' and coerce_study_size_columns renamed it to study_size, destroying the edge field. Add STUDY_SIZE_EXEMPT_PATTERN so study_size_target returns None for the exact slot.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
SkyeAv
added a commit
that referenced
this pull request
Aug 25, 2026
Cut 15.1.0 and bump the package version in pyproject.toml, uv.lock, and CITATION.cff. Minor: one feature and one fix since 15.0.0, no breaking changes. A class-scoped policy override (CLASS_FIELD_OVERRIDES) grants disease_context_qualifier to the EntityToDisease / EntityToPhenotypicFeature edge classes DAKP pins via category_override, so prune_to_class keeps the qualifier instead of nulling and rescuing it, with a tripwire test that fails the suite once an upstream Biolink widening makes the grant stale (#120). Also fixes number_of_cases being matched by STUDY_SIZE_PREFIX_PATTERN and coerced into study_size, destroying the edge field; a new STUDY_SIZE_EXEMPT_PATTERN leaves the exact Biolink slot alone (#119). Changelog: - Versioned the Unreleased section as 15.1.0, gave the #120 entry its PR link, and added a Fixed entry for the number_of_cases coercion fix. Docs: none needed here. #120 shipped with no docs changes and #119 is a coercion fix with no user-facing surface. Testing: - uv run pytest -q -> 1092 passed, 15 skipped (94% coverage) - uv run ruff check . && uv run ruff format --check . && uv run pyright -> clean / 0 errors - uv lock --check -> up to date - uv run mkdocs build --strict -> clean
SkyeAv
added a commit
to glusman-team/dakp
that referenced
this pull request
Aug 25, 2026
…, move FAERS count to number_of_cases - Bump tablassert[qc] floor to >=15.1.0. - Un-TODO the contraindication disease_context_qualifier: 15.1's CLASS_FIELD_OVERRIDES (SkyeAv/Tablassert#120) grants the slot to the pinned EntityToDisease/EntityToPhenotypicFeature classes, so the nullable Disease-guarded qualifier survives prune_to_class on the edge. - Migrate the FAERS case count annotation from the evidence_count alias to the literal Biolink slot number_of_cases: 15.1's STUDY_SIZE_EXEMPT_PATTERN (SkyeAv/Tablassert#119) stops the study-size classifier from renaming the column onto Study.study_size; the kgx_end_to_end tripwire fired as designed. legacy_tsv N_cases reads number_of_cases accordingly. - Regenerate tables/*.yaml from the generator; update RIG target consideration to note the grant pending upstream Biolink widening.
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.
Bugfix
number_of_casesis a legitimate BiolinkAssociationslot (declared onEntityToDiseaseAssociation/EntityToPhenotypicFeatureAssociation) that counts cases carrying the phenotype/disease — it is not the study population size.However,
STUDY_SIZE_PREFIX_PATTERNinsrc/tablassert/coerce.pymatched it via the "number of cases" quantity+unit form, socoerce_study_size_columnsrenamed the column tostudy_sizeduring the clean phase, silently destroying the edge field.Fix
STUDY_SIZE_EXEMPT_PATTERN(src/tablassert/coerce.py): a whole-name, separator-tolerant match on the exactnumber_of_casesslot.study_size_targetnow returnsNonefor it before any study-size pattern runs, so the column passes through untouched.Tests
test_study_size_target_leaves_number_of_cases_alonecovering underscored/spaced/hyphenated/fused spellings and the fullcoerce_study_size_columnspath.tests/test_lib.py+tests/test_biolink.py: 284 passed.