{"id":8652,"library":"snakemake-interface-executor-plugins","title":"Snakemake Executor Plugins Interface","description":"This package provides a stable, versioned interface for interactions between Snakemake and its executor plugins. It defines the abstract base classes and data structures that plugin developers must implement to integrate custom execution backends with Snakemake. The current version is 9.4.0, and its release cadence is closely tied to major Snakemake releases, ensuring compatibility and stability for plugin development.","status":"active","version":"9.4.0","language":"en","source_language":"en","source_url":"https://github.com/snakemake/snakemake-interface-executor-plugins","tags":["snakemake","plugins","interface","workflow","executor","development"],"install":[{"cmd":"pip install snakemake-interface-executor-plugins","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"symbol":"ExecutorSettingsBase","correct":"from snakemake_interface_executor_plugins.settings import ExecutorSettingsBase"},{"symbol":"CommonExecutorSettings","correct":"from snakemake_interface_executor_plugins.settings import CommonExecutorSettings"},{"note":"The 'base' module is the canonical import path; 'base_executor' might be an internal or deprecated path.","wrong":"from snakemake_interface_executor_plugins.executors.base_executor import ExecutorBase","symbol":"ExecutorBase","correct":"from snakemake_interface_executor_plugins.executors.base import ExecutorBase"},{"symbol":"RemoteExecutor","correct":"from snakemake_interface_executor_plugins.executors.base import RemoteExecutor"},{"symbol":"ExecutorWorkflowArgs","correct":"from snakemake_interface_executor_plugins.workflow import ExecutorWorkflowArgs"}],"quickstart":{"code":"from snakemake_interface_executor_plugins.settings import ExecutorSettingsBase\nfrom typing import Optional\n\n# Define custom settings for a hypothetical executor plugin\nclass MyCustomExecutorSettings(ExecutorSettingsBase):\n    \"\"\"\n    Settings for MyCustomExecutor.\n    \"\"\"\n    my_custom_param: str = \"default_value\"\n    another_setting: Optional[int] = None\n\n    def __post_init__(self):\n        # Optional: Add validation or post-initialization logic\n        if not self.my_custom_param:\n            raise ValueError(\"my_custom_param cannot be empty\")\n        print(f\"MyCustomExecutorSettings initialized: {self.my_custom_param}\")\n\n# Example of creating an instance of the custom settings\nif __name__ == \"__main__\":\n    try:\n        settings = MyCustomExecutorSettings(my_custom_param=\"special_value\")\n        print(f\"Custom param: {settings.my_custom_param}\")\n        \n        invalid_settings = MyCustomExecutorSettings(my_custom_param=\"\")\n    except ValueError as e:\n        print(f\"Caught expected error for empty param: {e}\")","lang":"python","description":"This quickstart demonstrates how to define custom executor settings by subclassing `ExecutorSettingsBase`. This is a common first step for developing a Snakemake executor plugin, allowing the plugin to expose configurable parameters."},"warnings":[{"fix":"Consult the official Snakemake release notes and the `snakemake-interface-executor-plugins` changelog for specific migration instructions when upgrading Snakemake.","message":"Breaking changes in the interface can occur between major Snakemake versions (e.g., Snakemake 8 to 9). Existing plugins might require updates to adapt to new abstract methods or altered data structures.","severity":"breaking","affected_versions":"All versions across major Snakemake releases"},{"fix":"Ensure all abstract methods (marked with `@abstractmethod` in the base class) are implemented in your concrete plugin class. Use `mypy` or similar type checkers during development to catch these issues early.","message":"When subclassing `ExecutorBase`, `ExecutorSettingsBase`, or other abstract classes, you must implement all abstract methods defined in the base class. Failure to do so will result in a `TypeError`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Understand that this package is a dependency for *plugin development*, defining the contract between Snakemake and a plugin. It's not intended for end-user interaction with Snakemake.","message":"This package provides *interfaces* for Snakemake plugins, not a standalone executor. It should only be used by developers creating Snakemake executor plugins, not for general Snakemake usage or direct execution.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always install the `snakemake-interface-executor-plugins` version recommended or bundled with your `snakemake` installation, or check the official Snakemake documentation for compatibility matrix.","message":"The version of `snakemake-interface-executor-plugins` must be compatible with your installed `snakemake` version. Using an incompatible version might lead to runtime errors or unexpected behavior.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Run `pip install snakemake-interface-executor-plugins` to install the package.","cause":"The `snakemake-interface-executor-plugins` package is not installed in your Python environment.","error":"ModuleNotFoundError: No module named 'snakemake_interface_executor_plugins'"},{"fix":"Ensure that your concrete executor plugin class (e.g., `MyCustomExecutor`) implements all abstract methods defined in `ExecutorBase` (or `ExecutorSettingsBase` if you're subclassing that).","cause":"You are trying to instantiate an abstract base class or a subclass that has not implemented all required abstract methods.","error":"TypeError: Can't instantiate abstract class ExecutorBase with abstract methods cleanup, exec_job, ..."},{"fix":"Ensure your executor plugin's `__init__` method correctly receives and stores the `workflow_args` parameter, typically passed by Snakemake when initializing the plugin.","cause":"The `ExecutorWorkflowArgs` object or its attributes were not correctly initialized or assigned within your custom executor plugin's `__init__` or `run` methods.","error":"AttributeError: 'MyCustomExecutor' object has no attribute 'workflow_args'"}]}