|
3 | 3 | from types import ModuleType |
4 | 4 |
|
5 | 5 | import numpy |
6 | | -from marshmallow import RAISE, ValidationError, missing, pre_load, validates, validates_schema |
| 6 | +from marshmallow import ( |
| 7 | + RAISE, |
| 8 | + ValidationError, |
| 9 | + missing, |
| 10 | + pre_load, |
| 11 | + validates, |
| 12 | + validates_schema, |
| 13 | +) |
7 | 14 |
|
8 | 15 | from bioimageio.spec.dataset.v0_2.schema import Dataset as _Dataset |
9 | 16 | from bioimageio.spec.model.v0_3.schema import ( |
10 | 17 | KerasHdf5WeightsEntry as KerasHdf5WeightsEntry03, |
| 18 | +) |
| 19 | +from bioimageio.spec.model.v0_3.schema import ( |
11 | 20 | OnnxWeightsEntry as OnnxWeightsEntry03, |
| 21 | +) |
| 22 | +from bioimageio.spec.model.v0_3.schema import ( |
12 | 23 | Postprocessing as Postprocessing03, |
| 24 | +) |
| 25 | +from bioimageio.spec.model.v0_3.schema import ( |
13 | 26 | Preprocessing as Preprocessing03, |
| 27 | +) |
| 28 | +from bioimageio.spec.model.v0_3.schema import ( |
14 | 29 | TensorflowJsWeightsEntry as TensorflowJsWeightsEntry03, |
| 30 | +) |
| 31 | +from bioimageio.spec.model.v0_3.schema import ( |
15 | 32 | TensorflowSavedModelBundleWeightsEntry as TensorflowSavedModelBundleWeightsEntry03, |
16 | | - _WeightsEntryBase as _WeightsEntryBase03, |
| 33 | +) |
| 34 | +from bioimageio.spec.model.v0_3.schema import ( |
17 | 35 | _common_sha256_hint, |
18 | 36 | ) |
| 37 | +from bioimageio.spec.model.v0_3.schema import ( |
| 38 | + _WeightsEntryBase as _WeightsEntryBase03, |
| 39 | +) |
19 | 40 | from bioimageio.spec.rdf import v0_2 as rdf |
20 | 41 | from bioimageio.spec.shared import LICENSES, field_validators, fields |
21 | 42 | from bioimageio.spec.shared.common import get_args, get_args_flat |
22 | | -from bioimageio.spec.shared.schema import ImplicitOutputShape, ParametrizedInputShape, SharedBioImageIOSchema |
| 43 | +from bioimageio.spec.shared.schema import ( |
| 44 | + ImplicitOutputShape, |
| 45 | + ParametrizedInputShape, |
| 46 | + SharedBioImageIOSchema, |
| 47 | +) |
| 48 | + |
23 | 49 | from . import raw_nodes |
24 | 50 |
|
25 | 51 |
|
@@ -356,14 +382,7 @@ def warn_on_missing_cite(self, data: dict, **kwargs): |
356 | 382 | documentation = fields.Union( |
357 | 383 | [ |
358 | 384 | fields.URL(), |
359 | | - fields.Path( |
360 | | - validate=field_validators.Attribute( |
361 | | - "suffix", |
362 | | - field_validators.Equal( |
363 | | - ".md", error="{!r} is invalid; expected markdown file with '.md' extension." |
364 | | - ), |
365 | | - ) |
366 | | - ), |
| 385 | + fields.Path(), |
367 | 386 | ], |
368 | 387 | required=True, |
369 | 388 | bioimageio_description="Relative path or URL to file with additional documentation in markdown. " |
|
0 commit comments