bioimageio.spec.application

implementaions of all released minor versions are available in submodules:

 1# autogen: start
 2"""
 3implementaions of all released minor versions are available in submodules:
 4- application v0_2: `bioimageio.spec.application.v0_2.ApplicationDescr`
 5- application v0_3: `bioimageio.spec.application.v0_3.ApplicationDescr`
 6"""
 7
 8from typing import Union
 9
10from pydantic import Discriminator, Field
11from typing_extensions import Annotated
12
13from . import v0_2, v0_3
14
15ApplicationDescr = v0_3.ApplicationDescr
16ApplicationDescr_v0_2 = v0_2.ApplicationDescr
17ApplicationDescr_v0_3 = v0_3.ApplicationDescr
18
19AnyApplicationDescr = Annotated[
20    Union[
21        Annotated[ApplicationDescr_v0_2, Field(title="application 0.2")],
22        Annotated[ApplicationDescr_v0_3, Field(title="application 0.3")],
23    ],
24    Discriminator("format_version"),
25    Field(title="application"),
26]
27"""Union of any released application desription"""
28# autogen: stop
class ApplicationDescr(bioimageio.spec.generic.v0_3.GenericDescrBase):
34class ApplicationDescr(GenericDescrBase):
35    """Bioimage.io description of an application."""
36
37    implemented_type: ClassVar[Literal["application"]] = "application"
38    if TYPE_CHECKING:
39        type: Literal["application"] = "application"
40    else:
41        type: Literal["application"]
42
43    id: Optional[ApplicationId] = None
44    """bioimage.io-wide unique resource identifier
45    assigned by bioimage.io; version **un**specific."""
46
47    parent: Optional[ApplicationId] = None
48    """The description from which this one is derived"""
49
50    source: Annotated[
51        Optional[ImportantFileSource],
52        Field(description="URL or path to the source of the application"),
53    ] = None
54    """The primary source of the application"""

Bioimage.io description of an application.

implemented_type: ClassVar[Literal['application']] = 'application'

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

The description from which this one is derived

source: Annotated[Optional[Annotated[Union[bioimageio.spec._internal.url.HttpUrl, bioimageio.spec._internal.io.RelativeFilePath, Annotated[pathlib.Path, PathType(path_type='file'), FieldInfo(annotation=NoneType, required=True, title='FilePath')]], FieldInfo(annotation=NoneType, required=True, metadata=[_PydanticGeneralMetadata(union_mode='left_to_right')]), AfterValidator(func=<function wo_special_file_name at 0x7f2602536ca0>), PlainSerializer(func=<function _package at 0x7f2602535e40>, return_type=PydanticUndefined, when_used='unless-none')]], FieldInfo(annotation=NoneType, required=True, description='URL or path to the source of the application')]

The primary source of the application

implemented_format_version_tuple: ClassVar[Tuple[int, int, int]] = (0, 3, 0)
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.

ApplicationDescr_v0_2 = <class 'bioimageio.spec.application.v0_2.ApplicationDescr'>
ApplicationDescr_v0_3 = <class 'ApplicationDescr'>
AnyApplicationDescr = typing.Annotated[typing.Union[typing.Annotated[bioimageio.spec.application.v0_2.ApplicationDescr, FieldInfo(annotation=NoneType, required=True, title='application 0.2')], typing.Annotated[ApplicationDescr, FieldInfo(annotation=NoneType, required=True, title='application 0.3')]], Discriminator(discriminator='format_version', custom_error_type=None, custom_error_message=None, custom_error_context=None), FieldInfo(annotation=NoneType, required=True, title='application')]

Union of any released application desription