|
23 | 23 | no_type_check, |
24 | 24 | ) |
25 | 25 |
|
| 26 | +import annotated_types |
26 | 27 | import markdown |
27 | 28 | import rich.console |
28 | 29 | import rich.markdown |
|
36 | 37 | model_validator, |
37 | 38 | ) |
38 | 39 | from pydantic_core.core_schema import ErrorType |
39 | | -from typing_extensions import Self, assert_never |
| 40 | +from typing_extensions import Annotated, Self, assert_never |
40 | 41 |
|
41 | 42 | from bioimageio.spec._internal.type_guards import is_dict |
42 | 43 |
|
@@ -241,25 +242,32 @@ class ValidationSummary(BaseModel, extra="allow"): |
241 | 242 | for one specific `ResourceDescr` instance.""" |
242 | 243 |
|
243 | 244 | name: str |
244 | | - """name of the validation""" |
| 245 | + """Name of the validation""" |
245 | 246 | source_name: str |
246 | | - """source of the validated bioimageio description""" |
| 247 | + """Source of the validated bioimageio description""" |
247 | 248 | id: Optional[str] = None |
248 | 249 | """ID of the resource being validated""" |
249 | 250 | type: str |
250 | | - """type of the resource being validated""" |
| 251 | + """Type of the resource being validated""" |
251 | 252 | format_version: str |
252 | | - """format version of the resource being validated""" |
| 253 | + """Format version of the resource being validated""" |
253 | 254 | status: Literal["passed", "valid-format", "failed"] |
254 | 255 | """overall status of the bioimageio validation""" |
| 256 | + metadata_completeness: Annotated[float, annotated_types.Interval(ge=0, le=1)] = 0.0 |
| 257 | + """Estimate of completeness of the metadata in the resource description. |
| 258 | +
|
| 259 | + Note: This completeness estimate may change with subsequent releases |
| 260 | + and should be considered bioimageio.spec version specific. |
| 261 | + """ |
| 262 | + |
255 | 263 | details: List[ValidationDetail] |
256 | | - """list of validation details""" |
| 264 | + """List of validation details""" |
257 | 265 | env: Set[InstalledPackage] = Field( |
258 | 266 | default_factory=lambda: { |
259 | 267 | InstalledPackage(name="bioimageio.spec", version=VERSION) |
260 | 268 | } |
261 | 269 | ) |
262 | | - """list of selected, relevant package versions""" |
| 270 | + """List of selected, relevant package versions""" |
263 | 271 |
|
264 | 272 | saved_conda_list: Optional[str] = None |
265 | 273 |
|
|
0 commit comments