Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/sddb/_catalog_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
"hne_image": "boolean",
"if_image": "boolean",
"ftu_annotation": "boolean",
"mpp": "Float64",
"image_width": "Int64",
"image_height": "Int64",
"magnification": "string",
"publication_date": "string",
# Publication verification (set by the engine's publication-verification gate): the resolved
# paper identifiers + the verify status (verified / provisional / no_associated_publication).
Expand Down
5 changes: 5 additions & 0 deletions tests/_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ def make_fixture_catalog() -> pd.DataFrame:
"study_id": [_STUDIES[i] if i < len(_STUDIES) else f"Study{i}" for i in range(n)],
"vitessce_url": [f"s3://scverse-spatial-eu-central-1/.lamindb/{r[0]}_vitessce.json" for r in _ROWS],
"flag_foo": [True] * n, # unknown extra column
# imaging metadata (typed nulls: not populated by the fixture)
"mpp": [None] * n,
"image_width": [None] * n,
"image_height": [None] * n,
"magnification": [None] * n,
# superset list columns, derived per-row so the fixture stays len(_ROWS)-agnostic
"collections": [[f"c-{i}"] if i % 3 else [] for i in range(n)],
"staining_method": [["H&E", "IF"] if i % 2 else None for i in range(n)],
Expand Down
10 changes: 10 additions & 0 deletions tests/test_catalog_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,13 @@ def test_collection_columns_include_study_fields():
assert all(cs.COLLECTION_COLUMNS[c] == "string" for c in expected)
# not newly required
assert expected.isdisjoint(set(cs.COLLECTION_REQUIRED))


def test_new_imaging_columns_present():
from sddb import _catalog_schema as schema

assert schema.CATALOG_COLUMNS["mpp"] == "Float64"
assert schema.CATALOG_COLUMNS["image_width"] == "Int64"
assert schema.CATALOG_COLUMNS["image_height"] == "Int64"
assert schema.CATALOG_COLUMNS["magnification"] == "string"
assert "mpp" in schema.RANGE_COLUMNS
Loading