Skip to content

Conversation

johanneskoester
Copy link
Contributor

@johanneskoester johanneskoester commented Sep 3, 2025

Wait for release of PR snakemake/snakemake-interface-executor-plugins#96

Summary by CodeRabbit

  • Bug Fixes

    • Corrected how executor settings are loaded, ensuring the plugin uses its own configured settings for execution.
    • Improves reliability and consistency when running tasks with custom executor configurations.
  • Chores

    • Internal initialization logic streamlined to reference the appropriate configuration source without altering public interfaces.

Copy link
Contributor

coderabbitai bot commented Sep 3, 2025

📝 Walkthrough

Walkthrough

The executor plugin initialization now reads executor settings from self.executor_settings instead of self.workflow.executor_settings. No other logic or public interfaces were changed.

Changes

Cohort / File(s) Summary
Executor plugin init
snakedeploy/templates/plugins/executor-plugins/init.py
In post_init, the source of executor settings was switched from self.workflow.executor_settings to self.executor_settings; remaining initialization logic unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/executor-settings

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
🪧 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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 4c0e78b and 4e05cf1.

📒 Files selected for processing (1)
  • snakedeploy/templates/plugins/executor-plugins/init.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

⚙️ CodeRabbit configuration file

**/*.py: Do not try to improve formatting.
Do not suggest type annotations for functions that are defined inside of functions or methods.
Do not suggest type annotation of the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

Files:

  • snakedeploy/templates/plugins/executor-plugins/init.py
🪛 Ruff (0.12.2)
snakedeploy/templates/plugins/executor-plugins/init.py

88-88: Found useless expression. Either assign it to a variable or remove it.

(B018)

⏰ 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 (2)
snakedeploy/templates/plugins/executor-plugins/init.py (2)

88-88: API switch to self.executor_settings looks correct.

Matches the stated PR objective to read executor settings from the executor instance, not the workflow.


84-90: Migration complete: no self.workflow.executor_settings references found.

Comment on lines 85 to 89
# access workflow
self.workflow
# access executor specific settings
self.workflow.executor_settings
self.executor_settings

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Fix Ruff B018: remove useless expressions in post_init.

Bare expressions self.workflow and self.executor_settings do nothing and trigger B018. Either remove them or bind to _ to demonstrate access without linter noise.

Apply one of the following diffs (Option A preferred).

Option A — minimal, linter-friendly:

@@
     def __post_init__(self):
-        # access workflow
-        self.workflow
-        # access executor specific settings
-        self.executor_settings
+        # Access to interfaces (kept for illustration without tripping linters)
+        _ = self.workflow
+        _ = self.executor_settings

Option B — just delete, the preceding comments already explain access:

@@
     def __post_init__(self):
-        # access workflow
-        self.workflow
-        # access executor specific settings
-        self.executor_settings
+        # access workflow / executor settings as needed
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# access workflow
self.workflow
# access executor specific settings
self.workflow.executor_settings
self.executor_settings
def __post_init__(self):
- # access workflow
- self.workflow
- # access executor specific settings
# Access to interfaces (kept for illustration without tripping linters)
_ = self.workflow
_ = self.executor_settings
🧰 Tools
🪛 Ruff (0.12.2)

86-86: Found useless expression. Either assign it to a variable or remove it.

(B018)


88-88: Found useless expression. Either assign it to a variable or remove it.

(B018)

🤖 Prompt for AI Agents
In snakedeploy/templates/plugins/executor-plugins/init.py around lines 85 to 89,
there are bare expressions `self.workflow` and `self.executor_settings` in
__post_init__ that trigger Ruff B018; replace them with a linter-friendly no-op
access by assigning to underscore (e.g., `_ = self.workflow` and `_ =
self.executor_settings`) or simply remove the lines if the preceding comments
already convey the intent — Option A (assign to `_`) is preferred to show
intentional access while avoiding linter noise.

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.

1 participant