|
7 | 7 | import xarray as xr |
8 | 8 | from marshmallow import ValidationError |
9 | 9 |
|
10 | | -from bioimageio.core import load_resource_description |
| 10 | +from bioimageio.core import __version__ as bioimageio_core_version, load_resource_description |
11 | 11 | from bioimageio.core.prediction import predict |
12 | 12 | from bioimageio.core.prediction_pipeline import create_prediction_pipeline |
13 | 13 | from bioimageio.core.resource_io.nodes import ( |
|
17 | 17 | ResourceDescription, |
18 | 18 | URI, |
19 | 19 | ) |
| 20 | +from bioimageio.spec import __version__ as bioimageio_spec_version |
20 | 21 | from bioimageio.spec.model.raw_nodes import WeightsFormat |
21 | 22 | from bioimageio.spec.shared.raw_nodes import ResourceDescription as RawResourceDescription |
22 | 23 |
|
@@ -87,11 +88,11 @@ def test_resource( |
87 | 88 | ): |
88 | 89 | """Test RDF dynamically |
89 | 90 |
|
90 | | - Returns summary dict with "error" and "traceback" key; summary["error"] is None if no errors were encountered. |
| 91 | + Returns: summary dict with keys: name, status, error, traceback, bioimageio_spec_version, bioimageio_core_version |
91 | 92 | """ |
92 | 93 | error: Optional[str] = None |
93 | 94 | tb: Optional = None |
94 | | - test_name: Optional[str] = None |
| 95 | + test_name: str = "load resource description" |
95 | 96 |
|
96 | 97 | try: |
97 | 98 | rd = load_resource_description( |
@@ -147,7 +148,14 @@ def test_resource( |
147 | 148 |
|
148 | 149 | # todo: add tests for non-model resources |
149 | 150 |
|
150 | | - return {"error": error, "traceback": tb, "name": test_name} |
| 151 | + return dict( |
| 152 | + name=test_name, |
| 153 | + status="passed" if error is None else "failed", |
| 154 | + error=error, |
| 155 | + traceback=tb, |
| 156 | + bioimageio_spec_version=bioimageio_spec_version, |
| 157 | + bioimageio_core_version=bioimageio_core_version, |
| 158 | + ) |
151 | 159 |
|
152 | 160 |
|
153 | 161 | def debug_model( |
|
0 commit comments