Repository navigation
feat!: re-home source record URLs onto the upstream entry and name inlined Study after config section - #220
Merged
Merged
Conversation
…orting entry Sections without a provenance.override now emit their source record URLs on the supporting entry of the publication repository (infores:pubmed-central for PMC sections) instead of the primary graph-infores entry. The primary knowledge source is the transforming resource, not the downloadable record; the --linkouts per-edge template stays on the primary entry and still resolves via the post-dedup sweep. Override sections are byte-identical: upstream_source_record_urls mappings re-home as specified, other overrides keep the legacy primary-entry emission.
… index The has_supporting_studies Study name now reads "<table-config.yaml> SECTION <n>" (document order) instead of the worksheet or source data filename, so edge provenance points back to the exact configuration that produced it. ingests.to_sections stamps the 1-based section_index into each expanded section; Tcode carries it and _provenance_ops composes the name. Section-level direct validation is unaffected: the stamp is a Tcode-only key, popped alongside the existing config stamp.
…utput BaseSource.url description, the table/graph configuration reference, and the advanced example now state that derived sections emit source record URLs on the upstream repository supporting entry (infores:pubmed-central for PMC sections), that --linkouts leaves only the per-edge template on the primary entry, and that the inlined Study name is the table config file plus the 1-based section index.
- retrieval_sources Args doc now matches the upstream_urls branch, which passes primary urls through (the --linkouts template). - Drop the dead study_name == study_id guard in _provenance_ops: a "<config> SECTION <n>" name can never equal the id. - Rename the flattened-results local in the build loop (flat_index) so it cannot be confused with the new per-file Tcode.section_index. - Pin the PMID re-homing branch and the override-section Study name in new tests.
|
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 15, 2026
Cut 21.0.0 and bump the package version in pyproject.toml, CITATION.cff, and uv.lock. Major: two breaking changes ship since 20.0.0. Derived-path builds emit section source record URLs on the upstream repository supporting sources entry (infores:pubmed-central for PMC sections) instead of the primary graph-infores entry, and the inlined supporting Study is named after the table config file plus its 1-based section index (#220); validate-infores is folded into validate-kgx as the knowledge-source identity half, and the standalone validate-infores command is gone (#218). Also adds no_map on NodeEncoding to pass subject/object CURIEs through verbatim (#219) and normalizes documentation prose to plain ASCII (#217). Changelog: - Versioned the Unreleased section as 21.0.0 - 2026-10-15. - Added the missing #218 (breaking, with migration note), #219, and #217 entries so no merged PR ships unmentioned. Docs: none needed here; the release commit only versions existing prose. Testing: - make check -> ruff clean, pyright 0 errors, pytest 1239 passed + 1 skipped, cargo test ok, cargo clippy --all-targets -- -D warnings clean - uv run mkdocs build --strict -> pass
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.
Derived builds now place a section's source record URLs on the upstream repository's supporting
sourcesentry (infores:pubmed-centralfor PMC sections) instead of the primary graph-infores entry, and the inlined supporting Study is named after the table config file plus its 1-based section index, so edge provenance names the exact repository record and configuration it came from.Source record URL placement
provenance.overrideemit theirsource.urlvalues assource_record_urlson the supporting entry matchingupstream_resource_ids(provenance.repo)(Tcode._provenance_opsinsrc/tablassert/lib.py):infores:pubmed-centralfor PMC sections,infores:pubmedfor PMID sections. The primary entry (the graph-level infores, e.g.infores:multiomics-kp) keepsupstream_resource_idsand gains no section record URLs: the primary is the transforming resource, not the downloadable record, the same rationale theupstream_source_record_urlsoverride already carried.build-kg --linkoutskeeps the per-edgehttps://linkouts.skyelanegoetz.com/edges/{edge_id}template on the primary entry;retrieval_sourcesnow passes primaryurlsthrough in theupstream_urlsbranch, and the post-dedup sweep still resolves{edge_id}in everysources[].source_record_urlsstring.override.upstream_source_record_urlsre-homes exactly as specified (the primary emits nothing),override.sourcesemits its template verbatim, any other override keeps the legacy primary-entry emission, and--linkoutsstill never injects into override sections.Study naming
Study.nameinhas_supporting_studiesis now<table-config.yaml> SECTION <n>(1-based position in document order) instead of the worksheet name or a source data filename likedata.parquet.ingests.to_sectionsstampssection_indexinto each expanded section andTcodecarries it as a field;Study.idis unchanged (publication CURIE, or the config stem when unidentified).Docs
docs/configuration/table.md,docs/configuration/advanced-example.md,src/tablassert/models.py: theBaseSource.urldescription, the threeurlfield rows, thesourcesderivation paragraph, and the Study naming prose are restated for the new behavior;CHANGELOG.mdgains Unreleased Breaking Changes entries.Testing
make check-> ruff clean,uv run pyright0 errors,uv run pytest1217 passed + 1 skipped,cargo testok,cargo clippy --all-targets -- -D warningsclean.uv run mkdocs build --strict-> pass.test_tcode_collect_rehomes_pmc_record_urls_onto_pubmed_central(the reportedPMC10010437S3 xlsx case),test_tcode_collect_rehomes_pmid_record_urls_onto_pubmed,test_tcode_collect_names_study_after_config_file_and_section_index,test_tcode_collect_names_override_study_after_config_section; override byte-identity stays pinned by the existingtest_production_patterns.pyandtest_models.pycorpus.Caveats
sources[primary].source_record_urlsfrom derived builds must read the upstream supporting entry instead; override-authored output is untouched.