snakemake-executor-plugin-slurm 0.4.1__tar.gz → 0.4.3__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.1
3
+ Version: 0.4.3
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
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Requires-Dist: snakemake-executor-plugin-slurm-jobstep (>=0.1.10,<0.2.0)
16
16
  Requires-Dist: snakemake-interface-common (>=1.13.0,<2.0.0)
17
- Requires-Dist: snakemake-interface-executor-plugins (>=8.2.0,<9.0.0)
17
+ Requires-Dist: snakemake-interface-executor-plugins (>=9.0.0,<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
@@ -22,4 +22,6 @@ Description-Content-Type: text/markdown
22
22
 
23
23
  # Snakemake executor plugin: slurm
24
24
 
25
+ [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/snakemake/snakemake-executor-plugin-slurm)
26
+
25
27
  For documentation, see the [Snakemake plugin catalog](https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html).
@@ -1,3 +1,5 @@
1
1
  # Snakemake executor plugin: slurm
2
2
 
3
+ [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/snakemake/snakemake-executor-plugin-slurm)
4
+
3
5
  For documentation, see the [Snakemake plugin catalog](https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html).
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "snakemake-executor-plugin-slurm"
3
- version = "0.4.1"
3
+ version = "0.4.3"
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,7 +16,7 @@ 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 = "^8.2.0"
19
+ snakemake-interface-executor-plugins = "^9.0.0"
20
20
  snakemake-executor-plugin-slurm-jobstep = "^0.1.10"
21
21
  throttler = "^1.2.2"
22
22
 
@@ -65,7 +65,7 @@ class Executor(RemoteExecutor):
65
65
  # with job_info being of type
66
66
  # snakemake_interface_executor_plugins.executors.base.SubmittedJobInfo.
67
67
 
68
- log_folder = f"group_{job.name}" if job.is_group() else f"rule_{job.name}"
68
+ group_or_rule = f"group_{job.name}" if job.is_group() else f"rule_{job.name}"
69
69
 
70
70
  try:
71
71
  wildcard_str = f"_{'_'.join(job.wildcards)}" if job.wildcards else ""
@@ -73,9 +73,17 @@ class Executor(RemoteExecutor):
73
73
  wildcard_str = ""
74
74
 
75
75
  slurm_logfile = os.path.abspath(
76
- f".snakemake/slurm_logs/{log_folder}/%j{wildcard_str}.log"
76
+ f".snakemake/slurm_logs/{group_or_rule}/{wildcard_str}/%j.log"
77
77
  )
78
- os.makedirs(os.path.dirname(slurm_logfile), exist_ok=True)
78
+ logdir = os.path.dirname(slurm_logfile)
79
+ # this behavior has been fixed in slurm 23.02, but there might be plenty of
80
+ # older versions around, hence we should rather be conservative here.
81
+ assert "%j" not in logdir, (
82
+ "bug: jobid placeholder in parent dir of logfile. This does not work as "
83
+ "we have to create that dir before submission in order to make sbatch "
84
+ "happy. Otherwise we get silent fails without logfiles being created."
85
+ )
86
+ os.makedirs(logdir, exist_ok=True)
79
87
 
80
88
  # generic part of a submission string:
81
89
  # we use a run_uuid as the job-name, to allow `--name`-based