snakemake-executor-plugin-slurm 0.4.2__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.2
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "snakemake-executor-plugin-slurm"
3
- version = "0.4.2"
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>",
@@ -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