Skip to content

Commit 0e2a225

Browse files
committed
do not add conda-forge channel to model env
1 parent aa6c75b commit 0e2a225

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

scripts/static_validation.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,13 @@ def get_env_from_deps(deps: Dependencies):
3636
dep_file_content = r.text
3737
if deps.manager == "conda":
3838
conda_env = yaml.load(dep_file_content)
39-
# add bioimageio.core if not present
40-
channels = conda_env.get("channels", [])
41-
if "conda-forge" not in channels:
42-
conda_env["channels"] = channels + ["conda-forge"]
4339

40+
# add bioimageio.core to dependencies
4441
deps = conda_env.get("dependencies", [])
4542
if not isinstance(deps, list):
4643
raise TypeError(f"expected dependencies in conda environment.yaml to be a list, but got: {deps}")
4744
if not any(isinstance(d, str) and d.startswith("bioimageio.core") for d in deps):
48-
conda_env["dependencies"] = deps + ["bioimageio.core"]
45+
conda_env["dependencies"] = deps + ["conda-forge::bioimageio.core"]
4946
elif deps.manager == "pip":
5047
pip_req = [d for d in dep_file_content.split("\n") if not d.strip().startswith("#")]
5148
conda_env["dependencies"].append("pip")

0 commit comments

Comments
 (0)