diff --git a/bioimageio/spec/_internal/node.py b/bioimageio/spec/_internal/node.py index c44cf0b47..921d75198 100644 --- a/bioimageio/spec/_internal/node.py +++ b/bioimageio/spec/_internal/node.py @@ -17,12 +17,12 @@ from .validation_context import ValidationContext, validation_context_var -def _node_title_generator(model: Type[Node]) -> str: +def _node_title_generator(node: Type[Node]) -> str: return ( - f"{model.implemented_type} {model.implemented_format_version}" # pyright: ignore[reportAttributeAccessIssue] - if hasattr(model, "implemented_type") - and hasattr(model, "implemented_format_version") - else model.__name__ + f"{node.implemented_type} {node.implemented_format_version}" # pyright: ignore[reportAttributeAccessIssue] + if hasattr(node, "implemented_type") + and hasattr(node, "implemented_format_version") + else f"{node.__module__.replace('bioimageio.spec.', '')}.{node.__name__}" ) @@ -38,7 +38,7 @@ class Node( use_attribute_docstrings=True, model_title_generator=_node_title_generator, ): - """Subpart of a resource description""" + """""" # empty docstring to remove all pydantic docstrings from the pdoc spec docs @classmethod def model_validate( diff --git a/bioimageio/spec/model/v0_5.py b/bioimageio/spec/model/v0_5.py index d00b2ee7b..98e811c9f 100644 --- a/bioimageio/spec/model/v0_5.py +++ b/bioimageio/spec/model/v0_5.py @@ -130,7 +130,6 @@ from .v0_4 import ZeroMeanUnitVarianceDescr as _ZeroMeanUnitVarianceDescr_v0_4 from .v0_4 import package_weights -# unit names from https://ngff.openmicroscopy.org/latest/#axes-md SpaceUnit = Literal[ "attometer", "angstrom", @@ -159,6 +158,7 @@ "zeptometer", "zettameter", ] +"""Space unit compatible to the [OME-Zarr axes specification 0.5](https://ngff.openmicroscopy.org/0.5/#axes-md)""" TimeUnit = Literal[ "attosecond", @@ -185,6 +185,7 @@ "zeptosecond", "zettasecond", ] +"""Time unit compatible to the [OME-Zarr axes specification 0.5](https://ngff.openmicroscopy.org/0.5/#axes-md)""" AxisType = Literal["batch", "channel", "index", "time", "space"] @@ -414,8 +415,6 @@ def _get_unit( return axis.unit -# this Axis definition is compatible with the NGFF draft from July 10, 2023 -# https://ngff.openmicroscopy.org/latest/#axes-md class AxisBase(NodeWithExplicitlySetFields): fields_to_set_explicitly: ClassVar[FrozenSet[LiteralString]] = frozenset({"type"})