diff --git a/orchestra/config.py b/orchestra/config.py index 5f49cac5b62c76206d3a87bf615b8a57f230e2ec..52384a2908a2a99a8f655a419afa74f7b6fa9127 100644 --- a/orchestra/config.py +++ b/orchestra/config.py @@ -4,13 +4,13 @@ import os def gen_yaml(config_dir, use_cache=True): + # TODO: this method of obtaining the orchestra directory is a hack and is duplicated in environment.py orchestra_dir = os.path.dirname(os.path.realpath(__file__ + "/..")) config_cache_dir = f"{orchestra_dir}/.orchestra/config_cache" if use_cache: hash_script = f"""find "{config_dir}" -type f -print0 | sort -z | xargs -0 sha1sum | sha1sum""" config_hash = subprocess.check_output(hash_script, shell=True).decode("utf-8").strip().partition(" ")[0] - # TODO: this method of obtaining the orchestra directory is a hack and is duplicated in environment.py config_cache_file = f"{config_cache_dir}/{config_hash}.yml" if os.path.exists(config_cache_file):