bioimageio.spec.dataset.v0_2

 1from typing import Literal, Optional
 2
 3from .._internal.common_nodes import Node
 4from .._internal.io_basics import AbsoluteFilePath as AbsoluteFilePath
 5from .._internal.url import HttpUrl as HttpUrl
 6from ..generic.v0_2 import VALID_COVER_IMAGE_EXTENSIONS as VALID_COVER_IMAGE_EXTENSIONS
 7from ..generic.v0_2 import AttachmentsDescr as AttachmentsDescr
 8from ..generic.v0_2 import Author as Author
 9from ..generic.v0_2 import BadgeDescr as BadgeDescr
10from ..generic.v0_2 import CiteEntry as CiteEntry
11from ..generic.v0_2 import Doi as Doi
12from ..generic.v0_2 import GenericDescrBase, ResourceId
13from ..generic.v0_2 import LinkedResource as LinkedResource
14from ..generic.v0_2 import Maintainer as Maintainer
15from ..generic.v0_2 import OrcidId as OrcidId
16from ..generic.v0_2 import RelativeFilePath as RelativeFilePath
17from ..generic.v0_2 import Uploader as Uploader
18from ..generic.v0_2 import Version as Version
19
20
21class DatasetId(ResourceId):
22    pass
23
24
25class DatasetDescr(GenericDescrBase, title="bioimage.io dataset specification"):
26    """A bioimage.io dataset resource description file (dataset RDF) describes a dataset relevant to bioimage
27    processing.
28    """
29
30    type: Literal["dataset"] = "dataset"
31
32    id: Optional[DatasetId] = None
33    """bioimage.io-wide unique resource identifier
34    assigned by bioimage.io; version **un**specific."""
35
36    source: Optional[HttpUrl] = None
37    """"URL to the source of the dataset."""
38
39
40class LinkedDataset(Node):
41    """Reference to a bioimage.io dataset."""
42
43    id: DatasetId
44    """A valid dataset `id` from the bioimage.io collection."""
45
46    version_number: Optional[int] = None
47    """version number (n-th published version, not the semantic version) of linked dataset"""
class DatasetId(bioimageio.spec.generic.v0_2.ResourceId):
22class DatasetId(ResourceId):
23    pass

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

class DatasetDescr(bioimageio.spec.generic.v0_2.GenericDescrBase):
26class DatasetDescr(GenericDescrBase, title="bioimage.io dataset specification"):
27    """A bioimage.io dataset resource description file (dataset RDF) describes a dataset relevant to bioimage
28    processing.
29    """
30
31    type: Literal["dataset"] = "dataset"
32
33    id: Optional[DatasetId] = None
34    """bioimage.io-wide unique resource identifier
35    assigned by bioimage.io; version **un**specific."""
36
37    source: Optional[HttpUrl] = None
38    """"URL to the source of the dataset."""

A bioimage.io dataset resource description file (dataset RDF) describes a dataset relevant to bioimage processing.

type: Literal['dataset']
id: Optional[DatasetId]

bioimage.io-wide unique resource identifier assigned by bioimage.io; version unspecific.

source: Optional[bioimageio.spec._internal.url.HttpUrl]

"URL to the source of the dataset.

implemented_format_version: ClassVar[str] = '0.2.4'
implemented_format_version_tuple: ClassVar[Tuple[int, int, int]] = (0, 2, 4)
def model_post_init(self: pydantic.main.BaseModel, context: Any, /) -> None:
124                    def wrapped_model_post_init(self: BaseModel, context: Any, /) -> None:
125                        """We need to both initialize private attributes and call the user-defined model_post_init
126                        method.
127                        """
128                        init_private_attributes(self, context)
129                        original_model_post_init(self, context)

We need to both initialize private attributes and call the user-defined model_post_init method.

class LinkedDataset(bioimageio.spec._internal.node.Node):
41class LinkedDataset(Node):
42    """Reference to a bioimage.io dataset."""
43
44    id: DatasetId
45    """A valid dataset `id` from the bioimage.io collection."""
46
47    version_number: Optional[int] = None
48    """version number (n-th published version, not the semantic version) of linked dataset"""

Reference to a bioimage.io dataset.

id: DatasetId

A valid dataset id from the bioimage.io collection.

version_number: Optional[int]

version number (n-th published version, not the semantic version) of linked dataset