Skip to content

Commit

Permalink
feat: wildcards in comment string #85 (#88)
Browse files Browse the repository at this point in the history
Small change to include wildcards in the comment strings (re #85). 

I tested it locally on my Slurm instance, and it works well. 

I also prefixed the rule name with `rule_` to match the formatting of
the slurm log path.

Cheers,
Mitchell
  • Loading branch information
mrvollger committed May 6, 2024
1 parent 912df83 commit 730cac0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion snakemake_executor_plugin_slurm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@ def run_job(self, job: JobExecutorInterface):
# generic part of a submission string:
# we use a run_uuid as the job-name, to allow `--name`-based
# filtering in the job status checks (`sacct --name` and `squeue --name`)
if wildcard_str == "":
comment_str = f"rule_{job.name}"
else:
comment_str = f"rule_{job.name}_wildcards_{wildcard_str}"
call = (
f"sbatch --job-name {self.run_uuid} --output {slurm_logfile} --export=ALL "
f"--comment {job.name}"
f"--comment {comment_str}"
)

call += self.get_account_arg(job)
Expand Down

0 comments on commit 730cac0

Please sign in to comment.