snakemake-executor-plugin-slurm 0.5.2__tar.gz → 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of snakemake-executor-plugin-slurm might be problematic. Click here for more details.
- {snakemake_executor_plugin_slurm-0.5.2 → snakemake_executor_plugin_slurm-0.6.0}/PKG-INFO +1 -1
- {snakemake_executor_plugin_slurm-0.5.2 → snakemake_executor_plugin_slurm-0.6.0}/pyproject.toml +1 -1
- {snakemake_executor_plugin_slurm-0.5.2 → snakemake_executor_plugin_slurm-0.6.0}/snakemake_executor_plugin_slurm/__init__.py +14 -0
- {snakemake_executor_plugin_slurm-0.5.2 → snakemake_executor_plugin_slurm-0.6.0}/LICENSE +0 -0
- {snakemake_executor_plugin_slurm-0.5.2 → snakemake_executor_plugin_slurm-0.6.0}/README.md +0 -0
|
@@ -6,6 +6,7 @@ __license__ = "MIT"
|
|
|
6
6
|
import csv
|
|
7
7
|
from io import StringIO
|
|
8
8
|
import os
|
|
9
|
+
import re
|
|
9
10
|
import subprocess
|
|
10
11
|
import time
|
|
11
12
|
from datetime import datetime, timedelta
|
|
@@ -143,6 +144,7 @@ class Executor(RemoteExecutor):
|
|
|
143
144
|
call += f" --cpus-per-task={get_cpus_per_task(job)}"
|
|
144
145
|
|
|
145
146
|
if job.resources.get("slurm_extra"):
|
|
147
|
+
self.check_slurm_extra(job)
|
|
146
148
|
call += f" {job.resources.slurm_extra}"
|
|
147
149
|
|
|
148
150
|
exec_job = self.format_job_exec(job)
|
|
@@ -488,3 +490,15 @@ class Executor(RemoteExecutor):
|
|
|
488
490
|
"'slurm_partition=<your default partition>'."
|
|
489
491
|
)
|
|
490
492
|
return ""
|
|
493
|
+
|
|
494
|
+
def check_slurm_extra(self, job):
|
|
495
|
+
jobname = re.compile(r"--job-name[=?|\s+]|-J\s?")
|
|
496
|
+
if re.search(jobname, job.resources.slurm_extra):
|
|
497
|
+
raise WorkflowError(
|
|
498
|
+
"The '--job-name' option is not allowed in the 'slurm_extra' "
|
|
499
|
+
"parameter. The job name is set by snakemake and must not be "
|
|
500
|
+
"overwritten. It is internally used to check the stati of all "
|
|
501
|
+
"submitted jobs by this workflow."
|
|
502
|
+
"Please consult the documentation if you are unsure how to "
|
|
503
|
+
"query the status of your jobs."
|
|
504
|
+
)
|
|
File without changes
|
|
File without changes
|