Repository navigation
feat: infores registry validation and RIG schema drift tests - #212
Merged
Merged
Conversation
…nd off registry modes
…nits, mode-aware success message
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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
Oct 12, 2026
Cut 19.7.0 and bump the package version in pyproject.toml, CITATION.cff, and the uv.lock self-package entry. Minor: validate-infores checks every emitted knowledge-source identifier against the Translator information-resource registry (#212), and the pinned biolink-model is bumped to 4.4.6 so BIOLINK_VERSION registers accurately again and the absorbed population_context_qualifier grants are dropped (#213). Changelog: - Versioned the Unreleased section as 19.7.0 - 2026-10-12 and added the missing PR links to the #212 and #213 entries. Docs: none needed here; the shipped docs updates landed with their own PRs. Testing: - make check -> exit 0: ruff clean, pyright 0 errors, pytest 1726 passed / 52 skipped, cargo test 155 passed, clippy -D warnings clean.
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.
Closes two of the six validation gaps identified against
KozaandNCATSTranslator/translator-ingests: emittedinfores:CURIEs were only prefix-checked, and the RIG Pydantic mirror was never tested against the released LinkML schema.Infores Registry Validation
tablassert validate-inforesclassifies every emitted knowledge-source CURIE -- edgeprimary_knowledge_source,sources[].resource_id,sources[].upstream_resource_ids, nodeprovided_by, and with--rigthe RIG document -- againstbiolink/information-resource-registry'sinfores_catalog.yaml, the catalog translator-ingests' SOP points at but never checks programmatically.src/tablassert/data/infores_catalog.yamlis vendored from upstream commita72dbc3b55d5(2026-10-06), so the default path is offline and deterministic.--registry refreshfetches the live catalog through the bounded-retrynet.http_get_text, validates the identifier set BEFORE writing, and caches under the user cache dir;--registry offreports structure only.rig.infores()); repeatable--allow-inforesexempts them and--strictexits 1 while any remain, for CI gating. Missing input files exit non-zero in every mode, matching thevalidate-kgxcontract.src/tablassert/infores_registry.py(load_registry_snapshot,validate_infores) plus error codeinfores-registry-unreadableinsrc/tablassert/errors.py. Non-JSON NDJSON lines count as malformed and a corrupt--rigyaml raises the coded error; neither can crash the walk with a traceback.RIG Drift Tests
tests/fixtures/resource_ingest_guide_schema.yamlpins the upstreamresource-ingest-guide-schemaat commitf870823cfde8.tests/test_rig_schema_drift.pyproves everymodels.RIG*class matches its schema class field-for-field in both directions;RIGConfig's config-only keys (artifact_base_path,artifact_base_url,source_files,ui_explanation) are the documented exceptions, and any new mirror-only key now fails the test instead of drifting silently.tests/_rig_linkml.pyis a dependency-free LinkML-subset validator (required slots, unknown-slot rejection, enum membership, scalar types) that validates a realrig.build_rig_documentoutput against the vendored schema. Nolinkmldependency is added.Docs
docs/cli.mdgains the nine-command index and a full## validate-inforessection;llms.txtindexes the command andsrc/tablassert/infores_registry.py;CHANGELOG.mdcarries an Unreleased entry. Thetests/test_docs_cli_coverage.pyandtests/test_docs_source_of_truth.pySSOT mappings are updated with the live surface.Design
validate-kgxflags: the existing biolink gate's report shape and flags stay byte-stable for downstream consumers; the infores axis has its own input (the RIG) and its own failure policy.id_prefixeschecks, referential integrity, CURIE syntax invalidate_record, ingest-metadata emission) are separate layers.Testing
make check-> exit 0; pytest1726 passed, 52 skipped, cargo test 127+11+17+1 passed, clippy and ruff clean, pyright0 errors.uv run pytest tests/test_infores_registry.py tests/test_cli_validate_infores.py tests/test_rig_schema_drift.py -q->39 passed(snapshot loader error paths, classification units, CLI contract incl. refresh/caching, mirror lockstep, generated-RIG conformance, live staleness fetch).--strict --allow-inforesexits 0,--helprenders all seven flags.