-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added default_open field to details section of datasets
- Loading branch information
Showing
3 changed files
with
210 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,51 @@ | ||
from __future__ import annotations | ||
from pydantic import Field | ||
from pydantic import Field, BaseModel | ||
from typing import List, Optional | ||
from bia_shared_datamodels import bia_data_model | ||
|
||
|
||
class Study(bia_data_model.Study): | ||
experimental_imaging_component: Optional[List[ExperimentalImagingDataset]] = Field(default_factory=list, description="""A dataset of that is associated with the study.""") | ||
experimental_imaging_component: Optional[List[ExperimentalImagingDataset]] = Field( | ||
default_factory=list, | ||
description="""A dataset of that is associated with the study.""", | ||
) | ||
|
||
|
||
class ExperimentalImagingDataset(bia_data_model.ExperimentalImagingDataset): | ||
acquisition_process: list[bia_data_model.ImageAcquisition] = Field( | ||
acquisition_process: list[ImageAcquisition] = Field( | ||
description="""Processes involved in the creation of the images and files in this dataset.""" | ||
) | ||
specimen_imaging_preparation_protocol: list[bia_data_model.SpecimenImagingPrepartionProtocol] = Field( | ||
description="""Processes involved in the preprapartion of the samples for imaged.""" | ||
specimen_imaging_preparation_protocol: list[SpecimenImagingPrepartionProtocol] = ( | ||
Field( | ||
description="""Processes involved in the preprapartion of the samples for imaged.""" | ||
) | ||
) | ||
biological_entity: list[bia_data_model.BioSample] = Field( | ||
biological_entity: list[BioSample] = Field( | ||
description="""The biological entity or entities that were imaged.""" | ||
) | ||
specimen_growth_protocol: Optional[list[bia_data_model.SpecimenGrowthProtocol]] = Field( | ||
description="""Processes involved in the growth of the samples that were then imaged.""" | ||
specimen_growth_protocol: Optional[list[SpecimenGrowthProtocol]] = Field( | ||
default_factory=list, | ||
description="""Processes involved in the growth of the samples that were then imaged.""", | ||
) | ||
|
||
|
||
class DetailSection(BaseModel): | ||
default_open: bool = Field() | ||
|
||
|
||
class ImageAcquisition(bia_data_model.ImageAcquisition, DetailSection): | ||
pass | ||
|
||
|
||
class BioSample(bia_data_model.BioSample, DetailSection): | ||
pass | ||
|
||
|
||
class SpecimenGrowthProtocol(bia_data_model.SpecimenGrowthProtocol, DetailSection): | ||
pass | ||
|
||
|
||
class SpecimenImagingPrepartionProtocol( | ||
bia_data_model.SpecimenImagingPrepartionProtocol, DetailSection | ||
): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters