Skip to content

Conversation

@cmeesters
Copy link
Member

@cmeesters cmeesters commented Dec 15, 2025

This PR merely updates the documentation section and describes the --slurm-pass-command-as-script flag.

Summary by CodeRabbit

  • Documentation
    • Updated SLURM configuration documentation with details on the --slurm-pass-command-as-script option for submitting job commands via temporary shell scripts.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 15, 2025

Walkthrough

Added documentation for the --slurm-pass-command-as-script feature, explaining that it submits job commands via temporary shell scripts to sbatch instead of using the --wrap option, helping overcome SLURM submit line length limitations.

Changes

Cohort / File(s) Change Summary
SLURM Script Submission Documentation
docs/further.md
Added sections describing the --slurm-pass-command-as-script feature, explaining how it delegates job command content to a script file to work around SLURM submit line length or character limits imposed by slurm_max_submit_line_size

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • dlaehnemann
  • DrYak

Poem

🐰 A rabbit hops through further.md with glee,
Scripting secrets for sbatch to see!
No line length limits shall hold us back,
With scripts so swift on the SLURM attack! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: documentation updates about passing commands as a script, which aligns with the PR objective and the changes made to docs/further.md.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/passing_as_script

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cmeesters cmeesters requested a review from cademirch December 15, 2025 11:04
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
docs/further.md (2)

257-262: Improve clarity with usage examples and temporary script lifecycle.

The documentation explains the purpose and motivation clearly, but could be enhanced with practical details:

  1. Add a command-line usage example showing how to enable the flag (e.g., snakemake --executor slurm --slurm-pass-command-as-script ...)
  2. Briefly mention the lifecycle of temporary scripts—are they cleaned up automatically after job completion?
  3. Consider adding a concrete scenario when users would hit the line length limits in practice.

These additions would help users understand when and how to use this feature.


257-257: Consider consistent flag formatting in section headings.

The section heading uses backticks around the flag name (--slurm-pass-command-as-script), whereas nearby sections like "slurm_partition" (line 239) and "slurm_account" (line 245) use plain text without backticks. For consistency with the surrounding documentation style, consider removing the backticks:

-##### Passing Commands as Scripts: `--slurm-pass-command-as-script`
+##### Passing Commands as Scripts

Or, if you prefer to keep the flag name emphasized, consider using bold instead:

-##### Passing Commands as Scripts: `--slurm-pass-command-as-script`
+##### Passing Commands as Scripts: **--slurm-pass-command-as-script**
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ccde8ca and 55ddecd.

📒 Files selected for processing (1)
  • docs/further.md (1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: cmeesters
Repo: snakemake/snakemake-executor-plugin-slurm PR: 187
File: .github/workflows/post_to_mastodon.yml:0-0
Timestamp: 2025-01-17T17:27:32.446Z
Learning: In the mastodon publishing workflow for snakemake-executor-plugin-slurm, the PR_TITLE environment variable is required by the post_to_mastodon.sh script and should be preserved.
Learnt from: cmeesters
Repo: snakemake/snakemake-executor-plugin-slurm PR: 0
File: :0-0
Timestamp: 2025-01-13T09:54:22.950Z
Learning: PR #173 (adding gres resource specification) depends on PR #28 in snakemake-executor-plugin-slurm-jobstep repository, as changes were required in the cpu-settings function of the jobstep-Executor module.
Learnt from: cmeesters
Repo: snakemake/snakemake-executor-plugin-slurm PR: 0
File: :0-0
Timestamp: 2025-09-09T15:55:55.669Z
Learning: In the Snakemake SLURM executor plugin, Snakemake submits itself as a job using the --wrap parameter in the sbatch command, rather than creating or submitting a separate job.sh script file. The actual implementation uses `call += f' --wrap="{exec_job}"'` where exec_job is the formatted snakemake execution command.
📚 Learning: 2025-09-09T15:55:55.669Z
Learnt from: cmeesters
Repo: snakemake/snakemake-executor-plugin-slurm PR: 0
File: :0-0
Timestamp: 2025-09-09T15:55:55.669Z
Learning: In the Snakemake SLURM executor plugin, Snakemake submits itself as a job using the --wrap parameter in the sbatch command, rather than creating or submitting a separate job.sh script file. The actual implementation uses `call += f' --wrap="{exec_job}"'` where exec_job is the formatted snakemake execution command.

Applied to files:

  • docs/further.md
📚 Learning: 2025-03-31T11:52:05.373Z
Learnt from: cmeesters
Repo: snakemake/snakemake-executor-plugin-slurm PR: 249
File: snakemake_executor_plugin_slurm/submit_string.py:21-29
Timestamp: 2025-03-31T11:52:05.373Z
Learning: In the snakemake-executor-plugin-slurm project, account and partition parameters are validated in the submit function before reaching the get_submit_command function. By design, these parameters are either empty strings or already properly formatted with SLURM parameter tags, making additional validation in get_submit_command unnecessary.

Applied to files:

  • docs/further.md
📚 Learning: 2025-03-10T13:34:59.270Z
Learnt from: cmeesters
Repo: snakemake/snakemake-executor-plugin-slurm PR: 173
File: tests/tests.py:79-86
Timestamp: 2025-03-10T13:34:59.270Z
Learning: In the Snakemake executor plugin for SLURM, all GPU resources (even simple numeric ones) should be translated to the `--gpus` flag (plural) to match SLURM's expectations, not `--gpu` (singular).

Applied to files:

  • docs/further.md
📚 Learning: 2025-03-10T13:34:59.270Z
Learnt from: cmeesters
Repo: snakemake/snakemake-executor-plugin-slurm PR: 173
File: tests/tests.py:79-86
Timestamp: 2025-03-10T13:34:59.270Z
Learning: In the Snakemake executor plugin for SLURM, all GPU resources (both simple numeric values and model:number specifications) should be translated to the `--gpus` flag (plural form) to match SLURM's command line interface expectations.

Applied to files:

  • docs/further.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: testing
🔇 Additional comments (1)
docs/further.md (1)

259-261: Technical accuracy and placement look good.

The explanation of the feature—how it works and why it exists—is clear and accurate. The section placement within the SLURM-specific resources documentation is appropriate, and the terminology aligns well with the existing content.

@cademirch cademirch merged commit 66d9825 into main Dec 18, 2025
6 checks passed
@cademirch cademirch deleted the docs/passing_as_script branch December 18, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants