From ea7a4898ba89a1eed7e8acfec9b5d2b52e65587a Mon Sep 17 00:00:00 2001 From: Ivy Raine Date: Wed, 26 Jul 2023 15:01:13 -0700 Subject: [PATCH] Add logging option for `get_envs()` --- kipoi_conda/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kipoi_conda/utils.py b/kipoi_conda/utils.py index 766bc09..48c92c4 100644 --- a/kipoi_conda/utils.py +++ b/kipoi_conda/utils.py @@ -172,13 +172,15 @@ def remove_env(env_name, dry_run=False): return _call_conda(cmd_list, use_stdout=True, dry_run=dry_run) -def get_envs(): +def get_envs(is_logging = False): """ Return all of the (named) environment (this does not include the root environment), as a list of absolute path to their prefixes. """ json_str = check_output(["conda", "info", "--json"]).decode() + logger.info("conda info --json: " + json_str) info = json.loads(json_str) + logger.info("conda info --json: " + str(info)) return info['envs']