Skip to content

Commit

Permalink
fix _prepare_dynamic_test_cases
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Nov 19, 2024
1 parent 1a1fc0c commit ad66e49
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bioimageio_collection_backoffice/validate_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,16 @@ def _prepare_dynamic_test_cases(
pip_sections = [
d for d in wf_conda_env.dependencies if isinstance(d, PipDeps)
]
assert len(pip_sections) == 1, wf_conda_env
pip_section = pip_sections[0]
if len(pip_sections) == 0:
if "pip" not in wf_conda_env.dependencies:
wf_conda_env.dependencies.append("pip")

pip_section = PipDeps(pip=[])
wf_conda_env.dependencies.append(pip_section)
else:
assert len(pip_sections) == 1, wf_conda_env
pip_section = pip_sections[0]

if (
collection_main := "git+https://github.com/bioimage-io/collection.git@main"
) not in pip_section.pip:
Expand Down

0 comments on commit ad66e49

Please sign in to comment.