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

@@ -217,12 +217,26 @@ class Executor(RemoteExecutor):
217
217
 
218
218
  self.logger.debug(f"sbatch call: {call}")
219
219
  try:
220
- out = subprocess.check_output(
221
- call, shell=True, text=True, stderr=subprocess.STDOUT
222
- ).strip()
220
+ process = subprocess.Popen(
221
+ call,
222
+ shell=True,
223
+ text=True,
224
+ stdout=subprocess.PIPE,
225
+ stderr=subprocess.PIPE,
226
+ )
227
+ out, err = process.communicate()
228
+ if process.returncode != 0:
229
+ raise subprocess.CalledProcessError(
230
+ process.returncode, call, output=err
231
+ )
223
232
  except subprocess.CalledProcessError as e:
224
233
  raise WorkflowError(
225
- f"SLURM job submission failed. The error message was {e.output}"
234
+ f"SLURM sbatch failed. The error message was {e.output}"
235
+ )
236
+ # any other error message indicating failure?
237
+ if "submission failed" in err:
238
+ raise WorkflowError(
239
+ f"SLURM job submission failed. The error message was {err}"
226
240
  )
227
241
 
228
242
  # multicluster submissions yield submission infos like
@@ -230,7 +244,9 @@ class Executor(RemoteExecutor):
230
244
  # --parsable option it simply yields "<id>;<name>".
231
245
  # To extract the job id we split by semicolon and take the first element
232
246
  # (this also works if no cluster name was provided)
233
- slurm_jobid = out.split(";")[0]
247
+ slurm_jobid = out.strip().split(";")[0]
248
+ if not slurm_jobid:
249
+ raise WorkflowError("Failed to retrieve SLURM job ID from sbatch output.")
234
250
  slurm_logfile = slurm_logfile.replace("%j", slurm_jobid)
235
251
  self.logger.info(
236
252
  f"Job {job.jobid} has been submitted with SLURM jobid {slurm_jobid} "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snakemake-executor-plugin-slurm
3
- Version: 0.11.0
3
+ Version: 0.11.2
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,6 +12,7 @@ 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
+ Classifier: Programming Language :: Python :: 3.13
15
16
  Requires-Dist: snakemake-executor-plugin-slurm-jobstep (>=0.2.0,<0.3.0)
16
17
  Requires-Dist: snakemake-interface-common (>=1.13.0,<2.0.0)
17
18
  Requires-Dist: snakemake-interface-executor-plugins (>=9.1.1,<10.0.0)
@@ -0,0 +1,6 @@
1
+ snakemake_executor_plugin_slurm/__init__.py,sha256=Ui5xbATI0VfB93GTyy8RPNu6dSyB0ArwfPV5PJA5b4U,25543
2
+ snakemake_executor_plugin_slurm/utils.py,sha256=DuJdFJsAmvFsrnpyb8kMoqxTEEmTsEVxroDS1t9qOGw,434
3
+ snakemake_executor_plugin_slurm-0.11.2.dist-info/LICENSE,sha256=YVc4xTLWMqGfFL36120k7rzXtsT6e4RkJsh68VVn12s,1076
4
+ snakemake_executor_plugin_slurm-0.11.2.dist-info/METADATA,sha256=fpd5ziYEmFkZkEwLrqYq2pJmGyeXfBDG7Xp-3pqMafA,1432
5
+ snakemake_executor_plugin_slurm-0.11.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
6
+ snakemake_executor_plugin_slurm-0.11.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: poetry-core 1.9.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,6 +0,0 @@
1
- snakemake_executor_plugin_slurm/__init__.py,sha256=FleQvFmJ6A2h2uCCTBD92T8cSb5Bcol-sgJ-ggs6ggA,24923
2
- snakemake_executor_plugin_slurm/utils.py,sha256=DuJdFJsAmvFsrnpyb8kMoqxTEEmTsEVxroDS1t9qOGw,434
3
- snakemake_executor_plugin_slurm-0.11.0.dist-info/LICENSE,sha256=YVc4xTLWMqGfFL36120k7rzXtsT6e4RkJsh68VVn12s,1076
4
- snakemake_executor_plugin_slurm-0.11.0.dist-info/METADATA,sha256=lUdtjmOC4hamB-4RiuWvExT5zyD1syFt_TYSK8gz-N0,1381
5
- snakemake_executor_plugin_slurm-0.11.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
6
- snakemake_executor_plugin_slurm-0.11.0.dist-info/RECORD,,