From ccd2b446bdbed5a9b064847f59fd37368a6023d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=B6rl?= Date: Tue, 8 Jul 2025 16:14:39 +0200 Subject: [PATCH 1/2] feat: prefix for uuid --- snakemake_executor_plugin_slurm/__init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/snakemake_executor_plugin_slurm/__init__.py b/snakemake_executor_plugin_slurm/__init__.py index d822ef8b..5734ff28 100644 --- a/snakemake_executor_plugin_slurm/__init__.py +++ b/snakemake_executor_plugin_slurm/__init__.py @@ -148,6 +148,14 @@ class ExecutorSettings(ExecutorSettingsBase): "required": False, }, ) + uuid_prefix: str = field( + default="", + metadata={ + "help": "Prefix that is added to the job names", + "env_var": False, + "required": False + } + ) # Required: @@ -181,7 +189,7 @@ def __post_init__(self, test_mode: bool = False): # run check whether we are running in a SLURM job context self.warn_on_jobcontext() self.test_mode = test_mode - self.run_uuid = str(uuid.uuid4()) + self.run_uuid = self.workflow.executor_settings.uuid_prefix + str(uuid.uuid4()) self.logger.info(f"SLURM run ID: {self.run_uuid}") self._fallback_account_arg = None self._fallback_partition = None From 81b9c80b42b49b6eea1e694cb680aa4ffdaca01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=B6rl?= Date: Tue, 8 Jul 2025 16:29:01 +0200 Subject: [PATCH 2/2] update name --- snakemake_executor_plugin_slurm/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snakemake_executor_plugin_slurm/__init__.py b/snakemake_executor_plugin_slurm/__init__.py index 5734ff28..3de1812c 100644 --- a/snakemake_executor_plugin_slurm/__init__.py +++ b/snakemake_executor_plugin_slurm/__init__.py @@ -148,7 +148,7 @@ class ExecutorSettings(ExecutorSettingsBase): "required": False, }, ) - uuid_prefix: str = field( + prefix: str = field( default="", metadata={ "help": "Prefix that is added to the job names", @@ -189,7 +189,7 @@ def __post_init__(self, test_mode: bool = False): # run check whether we are running in a SLURM job context self.warn_on_jobcontext() self.test_mode = test_mode - self.run_uuid = self.workflow.executor_settings.uuid_prefix + str(uuid.uuid4()) + self.run_uuid = self.workflow.executor_settings.prefix + str(uuid.uuid4()) self.logger.info(f"SLURM run ID: {self.run_uuid}") self._fallback_account_arg = None self._fallback_partition = None