bioimageio.spec.application
implementaions of all released minor versions are available in submodules:
- application v0_2:
bioimageio.spec.application.v0_2.ApplicationDescr
- application v0_3:
bioimageio.spec.application.v0_3.ApplicationDescr
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
33class ApplicationDescr(GenericDescrBase): 34 """Bioimage.io description of an application.""" 35 36 implemented_type: ClassVar[Literal["application"]] = "application" 37 if TYPE_CHECKING: 38 type: Literal["application"] = "application" 39 else: 40 type: Literal["application"] 41 42 id: Optional[ApplicationId] = None 43 """bioimage.io-wide unique resource identifier 44 assigned by bioimage.io; version **un**specific.""" 45 46 parent: Optional[ApplicationId] = None 47 """The description from which this one is derived""" 48 49 source: Annotated[ 50 Optional[FileSource_], 51 Field(description="URL or path to the source of the application"), 52 ] = None 53 """The primary source of the application"""
Bioimage.io description of an application.
id: Optional[bioimageio.spec.application.v0_3.ApplicationId]
bioimage.io-wide unique resource identifier assigned by bioimage.io; version unspecific.
parent: Optional[bioimageio.spec.application.v0_3.ApplicationId]
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 0x7febd4d13c40>), PlainSerializer(func=<function _package_serializer at 0x7febd4daec00>, 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
model_config: ClassVar[pydantic.config.ConfigDict] =
{'extra': 'forbid', 'frozen': False, 'populate_by_name': True, 'revalidate_instances': 'never', 'validate_assignment': True, 'validate_default': False, 'validate_return': True, 'use_attribute_docstrings': True, 'model_title_generator': <function _node_title_generator>, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict
][pydantic.config.ConfigDict].
def
model_post_init(self: pydantic.main.BaseModel, context: Any, /) -> None:
337def init_private_attributes(self: BaseModel, context: Any, /) -> None: 338 """This function is meant to behave like a BaseModel method to initialise private attributes. 339 340 It takes context as an argument since that's what pydantic-core passes when calling it. 341 342 Args: 343 self: The BaseModel instance. 344 context: The context. 345 """ 346 if getattr(self, '__pydantic_private__', None) is None: 347 pydantic_private = {} 348 for name, private_attr in self.__private_attributes__.items(): 349 default = private_attr.get_default() 350 if default is not PydanticUndefined: 351 pydantic_private[name] = default 352 object_setattr(self, '__pydantic_private__', pydantic_private)
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that's what pydantic-core passes when calling it.
Arguments:
- self: The BaseModel instance.
- context: The context.
Inherited Members
- bioimageio.spec.generic.v0_3.GenericDescrBase
- implemented_format_version
- convert_from_old_format_wo_validation
- documentation
- badges
- config
- bioimageio.spec.generic.v0_3.GenericModelDescrBase
- name
- description
- covers
- id_emoji
- attachments
- cite
- license
- git_repo
- icon
- links
- uploader
- maintainers
- check_maintainers_exist
- warn_about_tag_categories
- version
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