Coverage for src/bioimageio/spec/notebook/v0_3.py: 100%
37 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-18 09:17 +0000
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-18 09:17 +0000
1from __future__ import annotations
3from typing import TYPE_CHECKING, ClassVar, Literal
5from .._internal.io import FileDescr as FileDescr
6from .._internal.io_basics import Sha256 as Sha256
7from .._internal.url import HttpUrl as HttpUrl
8from ..generic.v0_3 import VALID_COVER_IMAGE_EXTENSIONS as VALID_COVER_IMAGE_EXTENSIONS
9from ..generic.v0_3 import Author as Author
10from ..generic.v0_3 import BadgeDescr as BadgeDescr
11from ..generic.v0_3 import BioimageioConfig as BioimageioConfig
12from ..generic.v0_3 import CiteEntry as CiteEntry
13from ..generic.v0_3 import Config as Config
14from ..generic.v0_3 import DeprecatedLicenseId as DeprecatedLicenseId
15from ..generic.v0_3 import Doi as Doi
16from ..generic.v0_3 import GenericDescrBase, LinkedResourceBase
17from ..generic.v0_3 import LicenseId as LicenseId
18from ..generic.v0_3 import LinkedResource as LinkedResource
19from ..generic.v0_3 import Maintainer as Maintainer
20from ..generic.v0_3 import OrcidId as OrcidId
21from ..generic.v0_3 import RelativeFilePath as RelativeFilePath
22from ..generic.v0_3 import ResourceId as ResourceId
23from ..generic.v0_3 import Uploader as Uploader
24from ..generic.v0_3 import Version as Version
25from .v0_2 import NotebookSource as NotebookSource
28class NotebookId(ResourceId):
29 pass
32class NotebookDescr(GenericDescrBase):
33 """Bioimage.io description of a Jupyter notebook."""
35 implemented_type: ClassVar[Literal["notebook"]] = "notebook"
36 if TYPE_CHECKING:
37 type: Literal["notebook"] = "notebook"
38 else:
39 type: Literal["notebook"]
41 id: NotebookId | None = None
42 """bioimage.io-wide unique resource identifier
43 assigned by bioimage.io; version **un**specific."""
45 parent: NotebookId | None = None
46 """The description from which this one is derived"""
48 source: NotebookSource
49 """The Jupyter notebook"""
52class LinkedNotebook(LinkedResourceBase):
53 """Reference to a bioimage.io notebook."""
55 id: NotebookId
56 """A valid notebook `id` from the bioimage.io collection."""