Skip to content

Commit e7a248f

Browse files
authored
fix: account and partition settings corrected (#249)
quick fix for a minor glitch in the account and partition settings <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Streamlined the submission command creation process by directly incorporating pre-validated parameters, resulting in a simpler and more efficient operation. - This update enhances the overall reliability and consistency of the submission workflow, providing users with improved performance during command execution and a smoother experience managing submissions. - These changes are part of ongoing efforts to optimize the system for better usability and reduced errors. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent c8cdfc4 commit e7a248f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

snakemake_executor_plugin_slurm/submit_string.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ def get_submit_command(job, params):
1818
f'--comment "{params.comment_str}"'
1919
)
2020

21-
# check whether an account is set
22-
if hasattr(params, "account"):
23-
call += f" --account={params.account}"
24-
# check whether a partition is set
25-
if hasattr(params, "partition"):
26-
call += f" --partition={params.partition}"
21+
# No accout or partition checking is required, here.
22+
# Checking is done in the submit function.
23+
24+
# here, only the string is used, as it already contains
25+
# '-A {account_name}'
26+
call += f" {params.account}"
27+
# here, only the string is used, as it already contains
28+
# '- p {partition_name}'
29+
call += f" {params.partition}"
2730

2831
if job.resources.get("clusters"):
2932
call += f" --clusters {job.resources.clusters}"

0 commit comments

Comments
 (0)