Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix headings in further.md #168

Merged
merged 5 commits into from
Nov 8, 2024
Merged

docs: fix headings in further.md #168

merged 5 commits into from
Nov 8, 2024

Conversation

johanneskoester
Copy link
Contributor

@johanneskoester johanneskoester commented Nov 7, 2024

Summary by CodeRabbit

  • Documentation
    • Enhanced clarity and usability of the SLURM executor plugin documentation for Snakemake.
    • Updated section headers for better hierarchy and organization.
    • Expanded instructions for using SLURM, including detailed SMP and MPI job configurations.
    • Introduced new sections on advanced resource specifications and additional command line flags.
    • Refined the retries section to improve understanding of job failure handling and automatic resubmission.
    • Provided examples of YAML configurations for default resources and job settings.
    • Concluded with a summary of typical command line usage for Snakemake with SLURM, including syntax corrections and clarifications.

Copy link
Contributor

coderabbitai bot commented Nov 7, 2024

Walkthrough

The pull request involves significant modifications to the documentation for the SLURM executor plugin in Snakemake. Changes include reformatting section headers, expanding content for clarity, and introducing new sections that provide detailed instructions on various aspects of SLURM usage. Key areas enhanced include resource specifications, job configurations, and handling job failures. The document aims to improve usability and understanding for users working with SLURM in Snakemake workflows.

Changes

File Change Summary
docs/further.md - Reformatted section headers from "##" to "###".
- Expanded explanations on SLURM executor usage, including accounts, partitions, and job handling.
- Added examples for defining resources in "Ordinary SMP jobs".
- Clarified "MPI jobs" section with srun usage and configuration examples.
- Introduced "Advanced Resource Specifications" and "Additional Command Line Flags" sections.
- Refined "Retries" section for job failure handling.
- Added YAML configuration examples and a summary of command line usage.

Possibly related PRs

  • docs: requeue #153: The changes in this PR also enhance the documentation for the SLURM executor plugin, specifically addressing the retries section and command line flags, which align with the main PR's focus on improving clarity and usability in the SLURM documentation.

Suggested reviewers

  • dlaehnemann
  • johanneskoester

🐰 In the garden of code, I hop with glee,
With clearer paths for all to see.
SLURM's secrets now unfold,
In structured lines, the tales are told.
From threads to flags, we weave the lore,
A joyful guide for users, evermore! 🌼

Warning

Tool Failures:

Tool Failure Count:


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

🧹 Outside diff range and nitpick comments (5)
docs/further.md (5)

404-404: Remove trailing colon from Summary header

The heading "Summary:" contains a trailing colon which violates markdown best practices. Consider removing it to maintain consistency with other headers.

-### Summary:
+### Summary
🧰 Tools
🪛 Markdownlint

404-404: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)


Line range hint 278-278: Remove development note

The line contains a development note that should not be present in the final documentation:

-==This is ongoing development. Eventually you will be able to annotate different file access patterns.==
+<!-- TODO: Document file access pattern annotation once implemented -->

Line range hint 307-385: Remove duplicate sections

The sections "Retries" and "Dynamic Parameterization" appear twice in the document. The duplicate sections starting at line 307 should be removed to avoid confusion and maintain document clarity.


Line range hint 62-89: Enhance MPI example with additional context

The MPI example would benefit from additional comments explaining:

  1. Why srun is recommended over other MPI starters
  2. The significance of the tasks resource parameter
  3. The relationship between tasks and cpus_per_task in hybrid applications

Consider adding comments to the code example:

rule calc_pi:
    output:
        "pi.calc",
    log:
        "logs/calc_pi.log",
    resources:
        # Number of MPI ranks to launch
        tasks=10,
        # Use srun for SLURM-optimized MPI launch
        mpi="srun",
    shell:
        # {resources.mpi} will be replaced with srun
        "{resources.mpi} -n {resources.tasks} calc-pi-mpi > {output} 2> {log}"

1-1: Consider adding a table of contents

The document would benefit from a table of contents at the beginning to help readers navigate through the various sections. This is especially important given the length and depth of the documentation.

Example:

### Table of Contents

1. [The General Idea](#the-general-idea)
2. [Specifying Account and Partition](#specifying-account-and-partition)
3. [Ordinary SMP Jobs](#ordinary-smp-jobs)
4. [MPI Jobs](#mpi-jobs)
...
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between a10d7d7 and ffec70b.

📒 Files selected for processing (1)
  • docs/further.md (5 hunks)
🧰 Additional context used
🪛 Markdownlint
docs/further.md

404-404: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

Copy link
Member

@cmeesters cmeesters left a comment

Choose a reason for hiding this comment

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

should be fine, now

@cmeesters
Copy link
Member

@dlaehnemann may I ask you to exercise the 4 eyes principle?

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: 1

🧹 Outside diff range and nitpick comments (3)
docs/further.md (3)

314-314: Fix typo in dynamic parameterization section.

The word "different" is repeated.

-Using dynamic parameterization we can react on different different inputs and prevent our HPC jobs from failing.
+Using dynamic parameterization we can react on different inputs and prevent our HPC jobs from failing.
🧰 Tools
🪛 LanguageTool

[duplication] ~314-~314: Possible typo: you repeated a word
Context: ...ynamic parameterization we can react on different different inputs and prevent our HPC jobs from fa...

(ENGLISH_WORD_REPEAT_RULE)


282-282: Remove development note from documentation.

Development notes should be tracked in issues or development documentation rather than in user-facing documentation.

-==This is ongoing development. Eventually you will be able to annotate different file access patterns.==
+Note: Future versions will support annotation of different file access patterns.

354-354: Remove trailing punctuation from heading.

According to Markdown best practices, headings should not end with punctuation marks.

-### Summary:
+### Summary
🧰 Tools
🪛 Markdownlint

354-354: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between ffec70b and b9ea4fb.

📒 Files selected for processing (1)
  • docs/further.md (14 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/further.md

[duplication] ~314-~314: Possible typo: you repeated a word
Context: ...ynamic parameterization we can react on different different inputs and prevent our HPC jobs from fa...

(ENGLISH_WORD_REPEAT_RULE)

🪛 Markdownlint
docs/further.md

354-354: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

🔇 Additional comments (3)
docs/further.md (3)

1-4: LGTM: Improved document structure and clarity.

The header restructuring and expanded content provide better organization and clearer context for users.


Line range hint 101-160: LGTM: Comprehensive resource specifications documentation.

The resource specifications table and examples provide clear guidance for mapping Snakemake resources to SLURM parameters.


Line range hint 1-363: LGTM: Overall documentation improvements.

The documentation has been significantly improved with:

  • Better hierarchical structure
  • Comprehensive coverage of SLURM integration
  • Clear examples and use cases
  • Detailed resource specifications
🧰 Tools
🪛 Markdownlint

354-354: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

docs/further.md Outdated Show resolved Hide resolved
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

🧹 Outside diff range and nitpick comments (4)
docs/further.md (4)

354-354: Remove trailing colon from heading

According to Markdown best practices, headings should not end with punctuation.

-### Summary:
+### Summary
🧰 Tools
🪛 Markdownlint

354-354: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)


281-281: Remove development note from documentation

The line enclosed in "==" markers appears to be a development note that should be removed from the final documentation.

-==This is ongoing development. Eventually you will be able to annotate different file access patterns.==

173-173: Add missing comma for better readability

Add a comma after "scheduling" to improve sentence structure.

-For reasons of scheduling multicluster support is provided by the `clusters` flag
+For reasons of scheduling, multicluster support is provided by the `clusters` flag
🧰 Tools
🪛 LanguageTool

[uncategorized] ~173-~173: Possible missing comma found.
Context: ...## Multicluster Support For reasons of scheduling multicluster support is provided by the...

(AI_HYDRA_LEO_MISSING_COMMA)


314-314: Fix word repetition

Remove the repeated word "different".

-Using dynamic parameterization we can react on different different inputs
+Using dynamic parameterization we can react on different inputs
🧰 Tools
🪛 LanguageTool

[duplication] ~314-~314: Possible typo: you repeated a word
Context: ...ynamic parameterization we can react on different different inputs and prevent our HPC jobs from fa...

(ENGLISH_WORD_REPEAT_RULE)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b9ea4fb and e0624ae.

📒 Files selected for processing (1)
  • docs/further.md (14 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/further.md

[uncategorized] ~173-~173: Possible missing comma found.
Context: ...## Multicluster Support For reasons of scheduling multicluster support is provided by the...

(AI_HYDRA_LEO_MISSING_COMMA)


[duplication] ~314-~314: Possible typo: you repeated a word
Context: ...ynamic parameterization we can react on different different inputs and prevent our HPC jobs from fa...

(ENGLISH_WORD_REPEAT_RULE)

🪛 Markdownlint
docs/further.md

354-354: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

🔇 Additional comments (1)
docs/further.md (1)

360-363: Command line example needs correction

The command example still contains the issues identified in the previous review:

  1. Duplicate --workflow-profile parameter
  2. Typo in the parameter name

Copy link
Contributor

@dlaehnemann dlaehnemann left a comment

Choose a reason for hiding this comment

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

I just have one question, feel free to address either way. Other than that, this looks good to me!

docs/further.md Show resolved Hide resolved
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: 1

🧹 Outside diff range and nitpick comments (4)
docs/further.md (4)

354-354: Remove trailing colon from heading.

For consistency with other headings in the document, remove the trailing colon.

-### Summary:
+### Summary
🧰 Tools
🪛 Markdownlint

354-354: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)


314-314: Fix grammatical issues in dynamic parameterization section.

The sentence has a repeated word and incorrect preposition usage.

-Using dynamic parameterization we can react on different different inputs and prevent our HPC jobs from failing.
+Using dynamic parameterization we can react to different inputs and prevent our HPC jobs from failing.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~314-~314: The preposition “to” seems more likely in this position.
Context: ...g dynamic parameterization we can react on different different inputs and prevent ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[duplication] ~314-~314: Possible typo: you repeated a word
Context: ...ynamic parameterization we can react on different different inputs and prevent our HPC jobs from fa...

(ENGLISH_WORD_REPEAT_RULE)


282-282: Remove development note from documentation.

The line contains a development note that should be removed or converted to proper documentation.

-==This is ongoing development. Eventually you will be able to annotate different file access patterns.==
+Note: Future versions will support annotation of different file access patterns.

Line range hint 1-363: Consider restructuring advanced topics.

The documentation is comprehensive but could benefit from better organization of advanced topics:

  1. Consider grouping related sections:
    • Move "Dynamic Parameterization" near "Advanced Resource Specifications"
    • Group "Retries" and "Nesting Jobs" under a "Troubleshooting" section
  2. Consider adding a table of contents at the beginning for better navigation
🧰 Tools
🪛 Markdownlint

354-354: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between e0624ae and 7893038.

📒 Files selected for processing (1)
  • docs/further.md (14 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/further.md

[uncategorized] ~173-~173: A comma might be missing here.
Context: ...## Multicluster Support For reasons of scheduling multicluster support is provided by the...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~173-~173: You might be missing the article “the” here.
Context: ...t is provided by the clusters flag in resources sections. Note, that you have to write ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~314-~314: The preposition “to” seems more likely in this position.
Context: ...g dynamic parameterization we can react on different different inputs and prevent ...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[duplication] ~314-~314: Possible typo: you repeated a word
Context: ...ynamic parameterization we can react on different different inputs and prevent our HPC jobs from fa...

(ENGLISH_WORD_REPEAT_RULE)

🪛 Markdownlint
docs/further.md

354-354: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

Comment on lines 359 to +363
$ snakemake --workflow-profile <path> \
> -j unlimited \ # assuming an unlimited number of jobs
> --default-resources slurm_account=<account> slurm_partition=<default partition> \
> --workflow-profile <profile directory with a `config.yaml`>
> --configfile config/config.yaml \
> --directory <path> # assuming a data path not relative to the workflow
> --directory <path> # assuming a data path on a different file system than the workflow
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Remove duplicate --workflow-profile parameter

The command example in docs/further.md shows --workflow-profile being used twice with different descriptions (<path> and <profile directory with a config.yaml>), which is redundant and confusing. Only one instance of this parameter should be used since they serve the same purpose.

🔗 Analysis chain

Verify command line example consistency.

The command example still shows --workflow-profile being used twice. If this is intentional, consider adding a comment explaining why both parameters are needed. Otherwise, one of them should be removed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are other examples in the documentation using --workflow-profile
rg --type md "workflow-profile" 

Length of output: 277

@cmeesters cmeesters merged commit 531ebc6 into main Nov 8, 2024
5 checks passed
@cmeesters cmeesters deleted the johanneskoester-patch-2 branch November 8, 2024 14:28
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