diff --git a/README.md b/README.md index d12ca689..e45cf5a7 100644 --- a/README.md +++ b/README.md @@ -364,7 +364,7 @@ may be controlled with the `LOGURU_LEVEL` environment variable. ## Changelog -### 0.9.0 (coming soon) +### 0.9.0 - update to [bioimageio.spec 0.5.4.3](https://github.com/bioimage-io/spec-bioimage-io/blob/main/changelog.md#bioimageiospec-0543) diff --git a/bioimageio/core/VERSION b/bioimageio/core/VERSION index adc868c7..2069fe23 100644 --- a/bioimageio/core/VERSION +++ b/bioimageio/core/VERSION @@ -1,3 +1,3 @@ { - "version": "0.8.0" + "version": "0.9.0" } diff --git a/bioimageio/core/_resource_tests.py b/bioimageio/core/_resource_tests.py index 3beb3576..67843d7e 100644 --- a/bioimageio/core/_resource_tests.py +++ b/bioimageio/core/_resource_tests.py @@ -372,16 +372,38 @@ def _test_in_env( raise RuntimeError("Conda not available") from e working_dir.mkdir(parents=True, exist_ok=True) + summary_path = working_dir / "summary.json" try: run_command(["conda", "activate", env_name]) except Exception: path = working_dir / "env.yaml" - _ = path.write_bytes(encoded_env) - logger.debug("written conda env to {}", path) - run_command(["conda", "env", "create", f"--file={path}", f"--name={env_name}"]) - run_command(["conda", "activate", env_name]) + try: + _ = path.write_bytes(encoded_env) + logger.debug("written conda env to {}", path) + run_command( + ["conda", "env", "create", f"--file={path}", f"--name={env_name}"] + ) + run_command(["conda", "activate", env_name]) + except Exception as e: + summary = descr.validation_summary + summary.add_detail( + ValidationDetail( + name="Conda environment creation", + status="failed", + loc=("weights", weight_format), + recommended_env=conda_env, + errors=[ + ErrorEntry( + loc=("weights", weight_format), + msg=str(e), + type="conda", + with_traceback=True, + ) + ], + ) + ) + return summary - summary_path = working_dir / "summary.json" run_command( [ "conda",