From 739938f2150eded547b7f1abedf292f9f12ecb96 Mon Sep 17 00:00:00 2001 From: sherwoodf <161822064+sherwoodf@users.noreply.github.com> Date: Tue, 23 Jul 2024 16:49:23 +0100 Subject: [PATCH] removed dataset type enums for validation (#126) --- .../bia_shared_datamodels/bia_data_model.py | 21 ------------------- bia-shared-datamodels/test/utils.py | 2 -- 2 files changed, 23 deletions(-) diff --git a/bia-shared-datamodels/src/bia_shared_datamodels/bia_data_model.py b/bia-shared-datamodels/src/bia_shared_datamodels/bia_data_model.py index d1447059..730d7374 100644 --- a/bia-shared-datamodels/src/bia_shared_datamodels/bia_data_model.py +++ b/bia-shared-datamodels/src/bia_shared_datamodels/bia_data_model.py @@ -31,9 +31,6 @@ class FileReference( DocumentMixin, ): submission_dataset_uuid: UUID = Field() - submission_dataset_type: DatasetType = Field( - description="""The type of dataset in which this file was submitted to the BioImage Archive.""" - ) class ImageRepresentation( @@ -43,7 +40,6 @@ class ImageRepresentation( # We may want to store the FileReference -> Image(Represenation) rather than in the original_file_reference_uuid original_file_reference_uuid: Optional[List[UUID]] = Field() representation_of_uuid: UUID = Field() - abstract_image_type: AbstractImageType = Field() class ExperimentalImagingDataset( @@ -133,20 +129,3 @@ class AnnotationMethod( ): pass - -class DatasetType(str, Enum): - """ - The type of Dataset stored in the BIA. Used by File Referneces to - """ - - ExperimentalImagingDataset = "ExperimentalImagingDataset" - ImageAnnotationDataset = "ImageAnnotationDataset" - - -class AbstractImageType(str, Enum): - """ - The type of Abstract Image stored in the BIA. Used by Image representations to store - """ - - ExperimentallyDerivedImage = "ExperimentallyDerivedImage" - DerivedImage = "DerivedImage" diff --git a/bia-shared-datamodels/test/utils.py b/bia-shared-datamodels/test/utils.py index cc3fc54b..23f4013d 100644 --- a/bia-shared-datamodels/test/utils.py +++ b/bia-shared-datamodels/test/utils.py @@ -297,7 +297,6 @@ def get_template_file_reference() -> bia_data_model.FileReference: "uri": "https://dummy.uri.co", "attribute": {}, "submission_dataset_uuid": get_template_experimental_imaging_dataset().uuid, - "submission_dataset_type": bia_data_model.DatasetType.ExperimentalImagingDataset } ) return file_reference @@ -310,7 +309,6 @@ def get_template_image_representation() -> bia_data_model.ImageRepresentation: { "uuid": uuid4(), "representation_of_uuid": get_template_experimentally_captured_image().uuid, - "abstract_image_type": bia_data_model.AbstractImageType.DerivedImage, "original_file_reference_uuid": [ get_template_file_reference().uuid, ],