Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,11 @@
],
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"python-envs.pythonProjects": [
{
"path": "",
"envManager": "ms-python.python:conda",
"packageManager": "ms-python.python:conda"
}
],
}
34 changes: 19 additions & 15 deletions bioimageio/core/_resource_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,21 +404,25 @@ def _test_in_env(
)
return summary

run_command(
[
"conda",
"run",
"-n",
env_name,
"bioimageio",
"test",
str(source),
f"--summary-path={summary_path}",
f"--determinism={determinism}",
]
+ ([f"--expected-type={expected_type}"] if expected_type else [])
+ (["--stop-early"] if stop_early else [])
)
for summary_path_arg_name in ("summary", "summary-path"):
run_command(
[
"conda",
"run",
"-n",
env_name,
"bioimageio",
"test",
str(source),
f"--{summary_path_arg_name}={summary_path.as_posix()}",
f"--determinism={determinism}",
]
+ ([f"--expected-type={expected_type}"] if expected_type else [])
+ (["--stop-early"] if stop_early else [])
)
if summary_path.exists():
break

return ValidationSummary.model_validate_json(summary_path.read_bytes())


Expand Down
9 changes: 4 additions & 5 deletions bioimageio/core/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from tqdm import tqdm
from typing_extensions import assert_never

import bioimageio.spec
from bioimageio.spec import (
AnyModelDescr,
InvalidDescr,
Expand Down Expand Up @@ -98,10 +99,8 @@ class ArgMixin(BaseModel, use_attribute_docstrings=True, cli_implicit_flags=True


class WithSummaryLogging(ArgMixin):
summary: Union[
Literal["display"], Path, Sequence[Union[Literal["display"], Path]]
] = Field(
"display",
summary: Sequence[Union[Literal["display"], Path]] = Field(
("display",),
examples=[
"display",
Path("summary.md"),
Expand Down Expand Up @@ -867,7 +866,7 @@ def run(self):

library versions:
bioimageio.core {VERSION}
bioimageio.spec {VERSION}
bioimageio.spec {bioimageio.spec.__version__}

spec format versions:
model RDF {ModelDescr.implemented_format_version}
Expand Down
Loading