Repository navigation
feat(schema): add donor_id + database_version catalog columns - #15
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15 +/- ##
==========================================
+ Coverage 91.67% 91.91% +0.24%
==========================================
Files 19 19
Lines 1429 1460 +31
==========================================
+ Hits 1310 1342 +32
+ Misses 119 118 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What
Adds two nullable
stringcolumns to the shared catalog contract (sddb._catalog_schema.CATALOG_COLUMNS):donor_id— a per-dataset donor identifier.database_version— the stable schema version an object was curated against (the lamin "Database Version"), so a consumer no longer has to infer a version from the lamin uid suffix.Why
First of a two-PR sequence. This PR lands the contract so the engine producer (
theislab/spatialdata-db) can populate both columns in a follow-up — the producer'sinventory_to_catalogcan only emit a column that already exists inCATALOG_COLUMNS. The companion engine PR adds the emission (database_versionfrom the Database Version feature;donor_idheuristically from the Replicate feature) and backfillsstudy_id.Scope / notes
REQUIRED_COLUMNS), non-faceted (not inFACETS), non-range (not inRANGE_COLUMNS). They flow throughCatalog.to_df()automatically — no reader change.freeze.py/compute_fingerprint:database_versionis informational, not part of cohort identity. The client keeps its existing internallamin_version(uid[16:]) unchanged — hence the distinct namedatabase_versionrather thanlamin_version.Testing
tests/test_catalog_schema.pycases: the two columns are present and typedstring, are absent from the required/facet/range sets, validate both populated and all-null, and round-trip through parquet.