feat: add opt-in taxon-filtered fullmaps and InChIKey support - #149
Merged
Conversation
Adds an opt-in top-100 experimental taxon allowlist for fullmap builds and preserves InChIKey terms during ingestion. Default fullmap builds and existing Python callers remain unchanged.\n\n### Taxon-filtered fullmaps\n- **Checked-in allowlist:** Adds src/tablassert/data/experimental_taxa.yaml containing 100 deterministic NCBI taxon IDs ranked from observed frequencies across the MultiomicsNext and MultiomicsHarness corpora.\n- **Rust filtering:** Adds optional taxon_allowlist support to rust/src/fullmap.rs, filtering non-OrganismTaxon rows before interning.\n- **Retention semantics:** Retains taxonless rows, including NCBITaxon:0 and malformed taxon values; retains rows with any allowlisted taxon; retains all rows whose categories include OrganismTaxon.\n- **Build identity:** Records a deterministic META.taxon_allowlist identity for filtered databases.\n- **CLI behavior:** Adds --taxon-allowlist to tablassert build-fullmap. This mode always builds from BABEL sources and never reuses an unfiltered prebuilt database.\n\n### InChIKey support\n- **Token QC:** Removes the inchikey rejection from Rust fullmap token validation while preserving newline, tab, hypothetical, uncharacterized, and dead-token filtering.\n- **Normalization:** Verifies both raw normalized terms such as abc-def and CURIE-form terms such as inchikey:abc-def.\n\n### Tests and documentation\n- **Coverage:** Adds Python and Rust coverage for allowlist filtering, taxonless sentinels, malformed taxa, multi-taxon rows, multi-category OrganismTaxon rows, deterministic metadata, CLI prebuilt bypass behavior, and InChIKey lookup.\n- **Documentation:** Updates docs/cli.md and docs/fullmap.md with the allowlist workflow, retention semantics, and metadata behavior.\n- **Packaging:** Explicitly includes the allowlist data file in the maturin package.\n- **Compatibility:** Updates src/tablassert/rs.pyi and existing Rust call sites while preserving the default unfiltered build path.\n\n### Testing\n- uv run pytest -q -> 1327 passed, 43 skipped\n- uv run pytest -n 0 tests/test_cover_fullmap.py tests/test_cover_cli.py tests/test_docs_source_of_truth.py tests/test_docs_cli_coverage.py -q -> 198 passed\n- cargo test --manifest-path rust/Cargo.toml --no-fail-fast -> passed\n- cargo check --manifest-path rust/Cargo.toml -> passed\n- cargo fmt --manifest-path rust/Cargo.toml --check -> passed\n- uv run ruff check . -> passed\n- uv run ruff format --check . -> passed\n- uv build --wheel --out-dir /tmp/taxon-wheel-final -> passed; wheel contains tablassert/data/experimental_taxa.yaml\n- uv run pyright -> only pre-existing optional-import diagnostics remain for logger/loguru
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced 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 |
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.
Adds an opt-in top-100 experimental taxon allowlist for fullmap builds and preserves InChIKey terms during ingestion. Default fullmap builds and existing Python callers remain unchanged.
Taxon-filtered fullmaps
src/tablassert/data/experimental_taxa.yamlcontaining 100 deterministic NCBI taxon IDs ranked from observed frequencies across theMultiomicsNextandMultiomicsHarnesscorpora.taxon_allowlistsupport torust/src/fullmap.rs, filtering non-OrganismTaxonrows before interning.NCBITaxon:0and malformed taxon values; retains rows with any allowlisted taxon; retains all rows whose categories includeOrganismTaxon.META.taxon_allowlistidentity for filtered databases.--taxon-allowlisttotablassert build-fullmap. This mode always builds from BABEL sources and never reuses an unfiltered prebuilt database.InChIKey support
inchikeyrejection from Rust fullmap token validation while preserving newline, tab, hypothetical, uncharacterized, and dead-token filtering.abc-defand CURIE-form terms such asinchikey:abc-def.Tests and documentation
OrganismTaxonrows, deterministic metadata, CLI prebuilt bypass behavior, and InChIKey lookup.docs/cli.mdanddocs/fullmap.mdwith the allowlist workflow, retention semantics, and metadata behavior.src/tablassert/rs.pyiand existing Rust call sites while preserving the default unfiltered build path.Testing
uv run pytest -q→1327 passed, 43 skippeduv run pytest -n 0 tests/test_cover_fullmap.py tests/test_cover_cli.py tests/test_docs_source_of_truth.py tests/test_docs_cli_coverage.py -q→198 passedcargo test --manifest-path rust/Cargo.toml --no-fail-fast→ passedcargo check --manifest-path rust/Cargo.toml→ passedcargo fmt --manifest-path rust/Cargo.toml --check→ passeduv run ruff check .→ passeduv run ruff format --check .→ passeduv build --wheel --out-dir /tmp/taxon-wheel-final→ passed; wheel containstablassert/data/experimental_taxa.yamluv run pyright→ only pre-existing optional-import diagnostics remain forlogger/loguru