move prefix from Snakefile to get_dir function

This commit is contained in:
Philipp Glaum 2024-04-10 12:23:28 +02:00
parent 74185560e0
commit 05a3c43c30
2 changed files with 6 additions and 7 deletions

View File

@ -22,13 +22,7 @@ configfile: "config/config.yaml"
run = config["run"] run = config["run"]
scenarios = get_scenarios(run) scenarios = get_scenarios(run)
prefix = run.get("prefix", "") RDIR = get_rdir(run)
rdir = get_rdir(run)
if prefix:
RDIR = f"{prefix}/{rdir}"
else:
RDIR = rdir
logs = path_provider("logs/", RDIR, run["shared_resources"]) logs = path_provider("logs/", RDIR, run["shared_resources"])
benchmarks = path_provider("benchmarks/", RDIR, run["shared_resources"]) benchmarks = path_provider("benchmarks/", RDIR, run["shared_resources"])

View File

@ -59,6 +59,11 @@ def get_rdir(run):
RDIR = run["name"] + "/" RDIR = run["name"] + "/"
else: else:
RDIR = "" RDIR = ""
prefix = run.get("prefix", "")
if prefix:
RDIR = f"{prefix}/{RDIR}"
return RDIR return RDIR