snakemake-executor-plugin-slurm 0.4.5__py3-none-any.whl → 0.5.1__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.

@@ -89,9 +89,13 @@ class Executor(RemoteExecutor):
89
89
  # generic part of a submission string:
90
90
  # we use a run_uuid as the job-name, to allow `--name`-based
91
91
  # filtering in the job status checks (`sacct --name` and `squeue --name`)
92
+ if wildcard_str == "":
93
+ comment_str = f"rule_{job.name}"
94
+ else:
95
+ comment_str = f"rule_{job.name}_wildcards_{wildcard_str}"
92
96
  call = (
93
97
  f"sbatch --job-name {self.run_uuid} --output {slurm_logfile} --export=ALL "
94
- f"--comment {job.name}"
98
+ f"--comment {comment_str}"
95
99
  )
96
100
 
97
101
  call += self.get_account_arg(job)
@@ -210,7 +214,7 @@ class Executor(RemoteExecutor):
210
214
 
211
215
  # We use this sacct syntax for argument 'starttime' to keep it compatible
212
216
  # with slurm < 20.11
213
- sacct_starttime = f"{datetime.now() - timedelta(days=2):%Y-%m-%dT%H:00}"
217
+ sacct_starttime = f"{datetime.now() - timedelta(days = 2):%Y-%m-%dT%H:00}"
214
218
  # previously we had
215
219
  # f"--starttime now-2days --endtime now --name {self.run_uuid}"
216
220
  # in line 218 - once v20.11 is definitively not in use any more,
@@ -289,7 +293,9 @@ class Executor(RemoteExecutor):
289
293
  elif status in fail_stati:
290
294
  msg = (
291
295
  f"SLURM-job '{j.external_jobid}' failed, SLURM status is: "
292
- f"'{status}'"
296
+ # message ends with '. ', because it is proceeded
297
+ # with a new sentence
298
+ f"'{status}'. "
293
299
  )
294
300
  self.report_job_error(j, msg=msg, aux_logs=[j.aux["slurm_logfile"]])
295
301
  active_jobs_seen_by_sacct.remove(j.external_jobid)
@@ -369,7 +375,7 @@ class Executor(RemoteExecutor):
369
375
  # here, we check whether the given or guessed account is valid
370
376
  # if not, a WorkflowError is raised
371
377
  self.test_account(job.resources.slurm_account)
372
- return f" -A {job.resources.slurm_account}"
378
+ return f" -A '{job.resources.slurm_account}'"
373
379
  else:
374
380
  if self._fallback_account_arg is None:
375
381
  self.logger.warning("No SLURM account given, trying to guess.")
@@ -436,7 +442,9 @@ class Executor(RemoteExecutor):
436
442
  f"'{account}' with sacctmgr: {e.stderr}"
437
443
  )
438
444
 
439
- accounts = accounts.split()
445
+ # The set() has been introduced during review to eliminate
446
+ # duplicates. They are not harmful, but disturbing to read.
447
+ accounts = set(_.strip() for _ in accounts.split("\n") if _)
440
448
 
441
449
  if account not in accounts:
442
450
  raise WorkflowError(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snakemake-executor-plugin-slurm
3
- Version: 0.4.5
3
+ Version: 0.5.1
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,5 @@
1
+ snakemake_executor_plugin_slurm/__init__.py,sha256=Ws-zsZP80iCC6q78M0mHea0fQhD0FtktpmfbxkC-4AQ,20551
2
+ snakemake_executor_plugin_slurm-0.5.1.dist-info/LICENSE,sha256=YVc4xTLWMqGfFL36120k7rzXtsT6e4RkJsh68VVn12s,1076
3
+ snakemake_executor_plugin_slurm-0.5.1.dist-info/METADATA,sha256=lkfe53yQkU9ZFupesBM4k8LG-lnx-U7pK5X8dl0E5XQ,1380
4
+ snakemake_executor_plugin_slurm-0.5.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
5
+ snakemake_executor_plugin_slurm-0.5.1.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- snakemake_executor_plugin_slurm/__init__.py,sha256=ny5nczaSrmyMvUf4ZQ4TXZ3s1bPWxJ0yo360fiXNIf4,20094
2
- snakemake_executor_plugin_slurm-0.4.5.dist-info/LICENSE,sha256=YVc4xTLWMqGfFL36120k7rzXtsT6e4RkJsh68VVn12s,1076
3
- snakemake_executor_plugin_slurm-0.4.5.dist-info/METADATA,sha256=I6-rHcNz7w-bm88yNAA0DQN2WFVQKgl4D6CLKUwmAwA,1380
4
- snakemake_executor_plugin_slurm-0.4.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
5
- snakemake_executor_plugin_slurm-0.4.5.dist-info/RECORD,,