snakemake-executor-plugin-slurm 0.10.1__py3-none-any.whl → 0.11.0__py3-none-any.whl

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.

@@ -42,6 +42,18 @@ class ExecutorSettings(ExecutorSettingsBase):
42
42
  "required": False,
43
43
  },
44
44
  )
45
+ requeue: bool = field(
46
+ default=False,
47
+ metadata={
48
+ "help": """
49
+ Allow requeuing preempted of failed jobs,
50
+ if no cluster default. Results in `sbatch ... --requeue ...`
51
+ This flag has no effect, if not set.
52
+ """,
53
+ "env_var": False,
54
+ "required": False,
55
+ },
56
+ )
45
57
 
46
58
 
47
59
  # Required:
@@ -79,8 +91,6 @@ class Executor(RemoteExecutor):
79
91
  self._fallback_account_arg = None
80
92
  self._fallback_partition = None
81
93
  self._preemption_warning = False # no preemption warning has been issued
82
- # providing a short-hand, even if subsequent calls seem redundant
83
- self.settings: ExecutorSettings = self.workflow.executor_settings
84
94
 
85
95
  def warn_on_jobcontext(self, done=None):
86
96
  if not done:
@@ -145,6 +155,9 @@ class Executor(RemoteExecutor):
145
155
  call += self.get_account_arg(job)
146
156
  call += self.get_partition_arg(job)
147
157
 
158
+ if self.workflow.executor_settings.requeue:
159
+ call += " --requeue"
160
+
148
161
  if job.resources.get("clusters"):
149
162
  call += f" --clusters {job.resources.clusters}"
150
163
 
@@ -361,6 +374,7 @@ needs to restart this job upon a Snakemake restart.
361
374
 
362
375
  We leave it to SLURM to resume your job(s)"""
363
376
  )
377
+ yield j
364
378
  elif status == "UNKNOWN":
365
379
  # the job probably does not exist anymore, but 'sacct' did not work
366
380
  # so we assume it is finished
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snakemake-executor-plugin-slurm
3
- Version: 0.10.1
3
+ Version: 0.11.0
4
4
  Summary: A Snakemake executor plugin for submitting jobs to a SLURM cluster.
5
5
  Home-page: https://github.com/snakemake/snakemake-executor-plugin-slurm
6
6
  License: MIT
@@ -0,0 +1,6 @@
1
+ snakemake_executor_plugin_slurm/__init__.py,sha256=FleQvFmJ6A2h2uCCTBD92T8cSb5Bcol-sgJ-ggs6ggA,24923
2
+ snakemake_executor_plugin_slurm/utils.py,sha256=DuJdFJsAmvFsrnpyb8kMoqxTEEmTsEVxroDS1t9qOGw,434
3
+ snakemake_executor_plugin_slurm-0.11.0.dist-info/LICENSE,sha256=YVc4xTLWMqGfFL36120k7rzXtsT6e4RkJsh68VVn12s,1076
4
+ snakemake_executor_plugin_slurm-0.11.0.dist-info/METADATA,sha256=lUdtjmOC4hamB-4RiuWvExT5zyD1syFt_TYSK8gz-N0,1381
5
+ snakemake_executor_plugin_slurm-0.11.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
+ snakemake_executor_plugin_slurm-0.11.0.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- snakemake_executor_plugin_slurm/__init__.py,sha256=GaX4hpsnNtX6pM6lRncupCGv_9q_rKEmdgHWo9nB6dw,24561
2
- snakemake_executor_plugin_slurm/utils.py,sha256=DuJdFJsAmvFsrnpyb8kMoqxTEEmTsEVxroDS1t9qOGw,434
3
- snakemake_executor_plugin_slurm-0.10.1.dist-info/LICENSE,sha256=YVc4xTLWMqGfFL36120k7rzXtsT6e4RkJsh68VVn12s,1076
4
- snakemake_executor_plugin_slurm-0.10.1.dist-info/METADATA,sha256=sFVmrUiTiqZLAjD5jKElcIuipus1rlz5bd4pLIiF1jI,1381
5
- snakemake_executor_plugin_slurm-0.10.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
- snakemake_executor_plugin_slurm-0.10.1.dist-info/RECORD,,