From 6c24569fc3012c0ce84ed98f63cb8e35ec8e00ec Mon Sep 17 00:00:00 2001 From: Jessica Gadling Date: Tue, 22 Oct 2024 11:42:26 -0400 Subject: [PATCH 1/2] fix: support multi tomos in v1 ingestion --- ingestion_tools/scripts/importers/db/tomogram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ingestion_tools/scripts/importers/db/tomogram.py b/ingestion_tools/scripts/importers/db/tomogram.py index c55a306e8..0396ee9ca 100644 --- a/ingestion_tools/scripts/importers/db/tomogram.py +++ b/ingestion_tools/scripts/importers/db/tomogram.py @@ -39,7 +39,7 @@ def get_data_map(self) -> dict[str, Any]: @classmethod def get_id_fields(cls) -> list[str]: - return ["name", "tomogram_voxel_spacing_id"] + return ["tomogram_voxel_spacing_id", "deposition_id", "processing", "reconstruction_method"] @classmethod def get_db_model_class(cls) -> type[BaseModel]: From 2389c626422730d82af0ced9eeccabfd0507c909 Mon Sep 17 00:00:00 2001 From: Jessica Gadling Date: Tue, 22 Oct 2024 12:07:29 -0400 Subject: [PATCH 2/2] make sure our unique keys are correct in tests. --- ingestion_tools/scripts/tests/db_import/populate_db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ingestion_tools/scripts/tests/db_import/populate_db.py b/ingestion_tools/scripts/tests/db_import/populate_db.py index ee30a0009..7c8a91220 100644 --- a/ingestion_tools/scripts/tests/db_import/populate_db.py +++ b/ingestion_tools/scripts/tests/db_import/populate_db.py @@ -224,13 +224,14 @@ def populate_tomograms() -> None: size_y=25, size_z=25, fiducial_alignment_status="foo", - reconstruction_method="", + reconstruction_method="WBP", reconstruction_software="", tomogram_version="0.5", scale0_dimensions="", scale1_dimensions="", scale2_dimensions="", - processing="", + processing="raw", + deposition_id=DEPOSITION_ID1, offset_x=0, offset_y=0, offset_z=0,