scneario management: reenable shared resources in one folder

This commit is contained in:
Fabian 2024-03-14 12:52:25 +01:00
parent f6f18e1868
commit f3eae37a02

View File

@ -66,19 +66,16 @@ def get_run_path(fn, dir, rdir, shared_resources):
"add_electricity" "add_electricity"
) )
is_shared = no_relevant_wildcards and no_elec_rule is_shared = no_relevant_wildcards and no_elec_rule
rdir = "" if is_shared else rdir
elif isinstance(shared_resources, str): elif isinstance(shared_resources, str):
rdir = shared_resources + "/" rdir = shared_resources + "/"
is_shared = False
elif isinstance(shared_resources, bool): elif isinstance(shared_resources, bool):
is_shared = shared_resources rdir = ""
else: else:
raise ValueError( raise ValueError(
"shared_resources must be a boolean, str, or 'base' for special handling." "shared_resources must be a boolean, str, or 'base' for special handling."
) )
if is_shared:
return f"{dir}{fn}"
else:
return f"{dir}{rdir}{fn}" return f"{dir}{rdir}{fn}"