bioimageio.spec.dataset.v0_2

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

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

implemented_type: ClassVar[Literal['dataset']] = 'dataset'
id: Optional[DatasetId] = None

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

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

"URL to the source of the dataset.

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

Reference to a bioimage.io dataset.

id: DatasetId = PydanticUndefined

A valid dataset id from the bioimage.io collection.

version_number: Optional[int] = None

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