snakemake-executor-plugin-slurm 0.5.0__tar.gz → 0.5.1__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snakemake-executor-plugin-slurm
3
- Version: 0.5.0
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "snakemake-executor-plugin-slurm"
3
- version = "0.5.0"
3
+ version = "0.5.1"
4
4
  description = "A Snakemake executor plugin for submitting jobs to a SLURM cluster."
5
5
  authors = [
6
6
  "Christian Meesters <meesters@uni-mainz.de>",
@@ -214,7 +214,7 @@ class Executor(RemoteExecutor):
214
214
 
215
215
  # We use this sacct syntax for argument 'starttime' to keep it compatible
216
216
  # with slurm < 20.11
217
- 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}"
218
218
  # previously we had
219
219
  # f"--starttime now-2days --endtime now --name {self.run_uuid}"
220
220
  # in line 218 - once v20.11 is definitively not in use any more,
@@ -293,7 +293,9 @@ class Executor(RemoteExecutor):
293
293
  elif status in fail_stati:
294
294
  msg = (
295
295
  f"SLURM-job '{j.external_jobid}' failed, SLURM status is: "
296
- f"'{status}'"
296
+ # message ends with '. ', because it is proceeded
297
+ # with a new sentence
298
+ f"'{status}'. "
297
299
  )
298
300
  self.report_job_error(j, msg=msg, aux_logs=[j.aux["slurm_logfile"]])
299
301
  active_jobs_seen_by_sacct.remove(j.external_jobid)
@@ -373,7 +375,7 @@ class Executor(RemoteExecutor):
373
375
  # here, we check whether the given or guessed account is valid
374
376
  # if not, a WorkflowError is raised
375
377
  self.test_account(job.resources.slurm_account)
376
- return f" -A {job.resources.slurm_account}"
378
+ return f" -A '{job.resources.slurm_account}'"
377
379
  else:
378
380
  if self._fallback_account_arg is None:
379
381
  self.logger.warning("No SLURM account given, trying to guess.")
@@ -440,7 +442,9 @@ class Executor(RemoteExecutor):
440
442
  f"'{account}' with sacctmgr: {e.stderr}"
441
443
  )
442
444
 
443
- 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 _)
444
448
 
445
449
  if account not in accounts:
446
450
  raise WorkflowError(