snakemake-executor-plugin-slurm 0.4.3__tar.gz → 0.4.5__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.4.3
3
+ Version: 0.4.5
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
@@ -12,9 +12,9 @@ Classifier: License :: OSI Approved :: MIT License
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
- Requires-Dist: snakemake-executor-plugin-slurm-jobstep (>=0.1.10,<0.2.0)
15
+ Requires-Dist: snakemake-executor-plugin-slurm-jobstep (>=0.2.0,<0.3.0)
16
16
  Requires-Dist: snakemake-interface-common (>=1.13.0,<2.0.0)
17
- Requires-Dist: snakemake-interface-executor-plugins (>=9.0.0,<10.0.0)
17
+ Requires-Dist: snakemake-interface-executor-plugins (>=9.1.1,<10.0.0)
18
18
  Requires-Dist: throttler (>=1.2.2,<2.0.0)
19
19
  Project-URL: Documentation, https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html
20
20
  Project-URL: Repository, https://github.com/snakemake/snakemake-executor-plugin-slurm
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "snakemake-executor-plugin-slurm"
3
- version = "0.4.3"
3
+ version = "0.4.5"
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>",
@@ -16,8 +16,8 @@ keywords = ["snakemake", "plugin", "executor", "cluster", "slurm"]
16
16
  [tool.poetry.dependencies]
17
17
  python = "^3.11"
18
18
  snakemake-interface-common = "^1.13.0"
19
- snakemake-interface-executor-plugins = "^9.0.0"
20
- snakemake-executor-plugin-slurm-jobstep = "^0.1.10"
19
+ snakemake-interface-executor-plugins = "^9.1.1"
20
+ snakemake-executor-plugin-slurm-jobstep = "^0.2.0"
21
21
  throttler = "^1.2.2"
22
22
 
23
23
  [tool.poetry.group.dev.dependencies]
@@ -18,6 +18,7 @@ from snakemake_interface_executor_plugins.jobs import (
18
18
  JobExecutorInterface,
19
19
  )
20
20
  from snakemake_interface_common.exceptions import WorkflowError
21
+ from snakemake_executor_plugin_slurm_jobstep import get_cpus_per_task
21
22
 
22
23
 
23
24
  # Required:
@@ -68,7 +69,7 @@ class Executor(RemoteExecutor):
68
69
  group_or_rule = f"group_{job.name}" if job.is_group() else f"rule_{job.name}"
69
70
 
70
71
  try:
71
- wildcard_str = f"_{'_'.join(job.wildcards)}" if job.wildcards else ""
72
+ wildcard_str = "_".join(job.wildcards) if job.wildcards else ""
72
73
  except AttributeError:
73
74
  wildcard_str = ""
74
75
 
@@ -126,18 +127,7 @@ class Executor(RemoteExecutor):
126
127
  # fixes #40 - set ntasks regarlless of mpi, because
127
128
  # SLURM v22.05 will require it for all jobs
128
129
  call += f" --ntasks={job.resources.get('tasks', 1)}"
129
-
130
- cpus_per_task = job.threads
131
- if job.resources.get("cpus_per_task"):
132
- if not isinstance(cpus_per_task, int):
133
- raise WorkflowError(
134
- f"cpus_per_task must be an integer, but is {cpus_per_task}"
135
- )
136
- cpus_per_task = job.resources.cpus_per_task
137
- # ensure that at least 1 cpu is requested
138
- # because 0 is not allowed by slurm
139
- cpus_per_task = max(1, cpus_per_task)
140
- call += f" --cpus-per-task={cpus_per_task}"
130
+ call += f" --cpus-per-task={get_cpus_per_task(job)}"
141
131
 
142
132
  if job.resources.get("slurm_extra"):
143
133
  call += f" {job.resources.slurm_extra}"