Skip to content

fix: remove duplicate retrieval-source identifiers - #115

Merged
SkyeAv merged 1 commit into
mainfrom
fix/remove-retrieval-source-id
Aug 24, 2026
Merged

fix: remove duplicate retrieval-source identifiers#115
SkyeAv merged 1 commit into
mainfrom
fix/remove-retrieval-source-id

Conversation

@SkyeAv

@SkyeAv SkyeAv commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Generated sources entries now retain resource_id as their sole provenance identifier; the duplicate nested id is removed without changing legitimate study/result IDs. Validation remains compatible with the pinned Biolink model by adding the inherited alias only to an in-memory validation copy, and the migration is documented.

Fixes

  • Retrieval sources: emit resource_id, resource_role, and provenance URL/upstream fields without sources[].id.
  • Validation: preserve the KGX validation gate while the pinned model still requires inherited id.
  • Migration: update tests, configuration docs, and CHANGELOG.md.

Testing

  • uv run pytest tests/test_biolink.py tests/test_lib.py -k 'retrieval_sources or source_record_urls or compile_graph_emits_ndjson or build_pipeline_e2e_smoke or resource_id_only' -q → 5 passed
  • uv run pytest tests/test_lib.py tests/test_biolink.py tests/test_rig.py tests/test_cover_lib.py tests/test_e2e_smoke.py -q → 287 passed; 1 pre-existing QC-extra failure (scikit-learn/sentence-transformers unavailable)
  • uv run ruff check src/tablassert/lib.py src/tablassert/biolink.py tests/test_lib.py tests/test_biolink.py tests/test_rig.py tests/test_cover_lib.py → passed
  • uv run pyright src/tablassert/lib.py src/tablassert/biolink.py → 0 errors

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0adb8b46-aa60-413f-9bc7-c6592ce79cf2


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SkyeAv
SkyeAv merged commit 71423c1 into main Aug 24, 2026
5 checks passed
@SkyeAv
SkyeAv deleted the fix/remove-retrieval-source-id branch August 24, 2026 23:07
SkyeAv added a commit that referenced this pull request Aug 24, 2026
SkyeAv added a commit that referenced this pull request Aug 24, 2026
Cut 14.0.0 and bump the package version in pyproject.toml, uv.lock, and
CITATION.cff.

Major: one breaking change since 13.0.0. Generated edges no longer duplicate each
nested `sources` entry's provenance identifier into `sources[].id`; `resource_id`
is now the sole identifier on a retrieval-source entry (#115). The pinned Biolink
model still requires the inherited `Entity.id` on `RetrievalSource`, so the
validator supplies it to an in-memory compatibility copy only, and neither the
decoded record nor the written NDJSON carries it.

Also ships the explicit retrieval-`sources` template with `{edge_id}` record-URL
interpolation (#116) and the negative-log p-value un-logging fix (#114).

Changelog:
- The Unreleased section was missing #116 entirely; added it under `Added`, and
  gave the two existing entries their PR links plus a reader migration note for
  the `sources[].id` removal.

Docs:
- `docs/configuration/table.md`'s automatic-coercion section documented neither
  half of #114: added a `Negative-log P value` row to the recognition table and a
  bullet covering the un-logging (`p = 10 ** -x` on rename and on banding), the
  complete-token requirement, the deliberate pass on unmarked `log10` spellings,
  raw-beats-alias selection, and the Float64 underflow floor. Every documented
  spelling was checked against `is_neglog10_column` and `pvalue_target`.
- `docs/cli.md`'s validate-kgx section explained the pending-field count but not
  the mirror case #115 introduced; added the `RetrievalSource` compatibility
  alias, including that it stops being applied once a model release drops the
  requirement.
- Removed the five em-dashes #115 and #116 reintroduced into the two doc pages,
  restoring the docs-wide convention set in abb042a.

Known gap, deliberately not fixed here: `PVALUE_TOKEN_PATTERN` anchors on `\b`,
which does not fire after an underscore, so `raw_pvalue` / `adj_pvalue` /
`fdr_pvalue` / `negative_log10_pvalue` are not recognized as p-value columns at
all, even though the same names with a separated token (`gene_p_value`) and the
bare-P forms (`raw_p`) are. It predates this window and changing recognition
would shift behavior for existing configs, so it wants its own PR.

Testing:
- uv run pytest -q -> 1078 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

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RRefj7KvacA9PGQYMCt6wy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant