Skip to content

Commit

Permalink
removed dataset type enums for validation (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
sherwoodf authored and ctr26 committed Jul 31, 2024
1 parent 86e51a8 commit 739938f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
21 changes: 0 additions & 21 deletions bia-shared-datamodels/src/bia_shared_datamodels/bia_data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down Expand Up @@ -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"
2 changes: 0 additions & 2 deletions bia-shared-datamodels/test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
],
Expand Down

0 comments on commit 739938f

Please sign in to comment.