Skip to content

feat(schema): add donor_id + database_version catalog columns - #15

Merged
timtreis merged 1 commit into
mainfrom
producer-fields-client
Oct 8, 2026
Merged

timtreis merged 1 commit into
mainfrom
producer-fields-client

Conversation

@timtreis

@timtreis timtreis commented Oct 8, 2026

Copy link
Copy Markdown
Member

What

Adds two nullable string columns 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's inventory_to_catalog can only emit a column that already exists in CATALOG_COLUMNS. The companion engine PR adds the emission (database_version from the Database Version feature; donor_id heuristically from the Replicate feature) and backfills study_id.

Scope / notes

  • Both columns are optional (not in REQUIRED_COLUMNS), non-faceted (not in FACETS), non-range (not in RANGE_COLUMNS). They flow through Catalog.to_df() automatically — no reader change.
  • Deliberately not wired into freeze.py / compute_fingerprint: database_version is informational, not part of cohort identity. The client keeps its existing internal lamin_version (uid[16:]) unchanged — hence the distinct name database_version rather than lamin_version.

Testing

  • New tests/test_catalog_schema.py cases: the two columns are present and typed string, are absent from the required/facet/range sets, validate both populated and all-null, and round-trip through parquet.
  • Full suite: 249 passed, 2 skipped; ruff + mypy clean on changed files.

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.91%. Comparing base (de9cb31) to head (f486619).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timtreis
timtreis merged commit 654a096 into main Oct 8, 2026
5 checks passed
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