From 35faf0267f5d1c3c2665441359c47a37004335a9 Mon Sep 17 00:00:00 2001 From: vuillaut Date: Sat, 15 Apr 2023 13:23:30 +0200 Subject: [PATCH] the dependencies afterok should be given with : --- lstmcpipe/tests/test_utils.py | 2 +- lstmcpipe/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lstmcpipe/tests/test_utils.py b/lstmcpipe/tests/test_utils.py index 79577572..505671e4 100644 --- a/lstmcpipe/tests/test_utils.py +++ b/lstmcpipe/tests/test_utils.py @@ -86,7 +86,7 @@ def test_sbatch_lst_mc_stage(): sbatch.extra_slurm_options = None sbatch.slurm_dependencies = "123,243,345,456" - assert sbatch._construct_slurm_dependencies() == "--dependency=afterok:123,243,345,456" + assert sbatch._construct_slurm_dependencies() == "--dependency=afterok:123:243:345:456" sbatch.compose_wrap_command( wrap_command="python args", diff --git a/lstmcpipe/utils.py b/lstmcpipe/utils.py index 6ab30635..723c7eaa 100644 --- a/lstmcpipe/utils.py +++ b/lstmcpipe/utils.py @@ -285,7 +285,7 @@ def _construct_slurm_dependencies(self): if slurm_deps is None or slurm_deps == "": return "" elif all(items != "" for items in slurm_deps.split(",")): - return f"--dependency={dependency_type}:{slurm_deps}" + return f"--dependency={dependency_type}:{slurm_deps.replace(',',':')}" else: raise ValueError("Slurm dependencies contain an empty value between commas, i.e.; ,'', ")