This package provides a stable interface for interactions between Snakemake and its executor plugins.
Project description
Stable interfaces and functionality for Snakemake executor plugins
This package provides a stable interface for interactions between Snakemake and its executor plugins (WIP).
Plugins should implement the following skeleton to comply with this interface:
from snakemake_interface_executor_plugins.executors.remote import RemoteExecutor
from snakemake_interface_executor_plugins import ExecutorSettingsBase, CommonSettings
# Optional:
# define additional settings for your executor
# They will occur in the Snakemake CLI as --<executor-name>-<param-name>
# Omit this class if you don't need any.
@dataclass
class ExecutorSettings:
myparam: int=field(default=None, metadata={"help": "Some help text"})
# Optional:
# specify common settings shared by various executors.
# Omit this statement if you don't need any and want
# to rely on the defaults (highly recommended unless
# you are very sure what you do).
common_settings = CommonSettings(
use_threads=True
)
# Required:
# Implementation of your executor
class Executor(RemoteExecutor)
def __init__(
self,
workflow: WorkflowExecutorInterface,
dag: DAGExecutorInterface,
stats: StatsExecutorInterface,
logger: LoggerExecutorInterface,
executor_settings: Optional[ExecutorSettings], # if no ExecutorSettings are defined above, this will receive None
):
super().__init__(
workflow,
dag,
stats,
logger,
executor_settings,
# configure behavior of RemoteExecutor below
max_status_checks_per_second=1, # how many status checks should be performed per second
disable_default_remote_provider_args=False, # whether arguments for setting the remote provider shall not be passed to jobs
disable_default_resources_args=False, # whether arguments for setting default resources shall not be passed to jobs
disable_envvar_declarations=False, # whether environment variables shall not be passed to jobs
)
# access executor specific settings
self.executor_settings
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for snakemake_interface_executor_plugins-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffb166468cdbf73a2e7ccdff081bd63f3863a2da0965b4ec26c23a76be15bba1 |
|
MD5 | bb5b5a84016cfa2db5a4f65b40f3652a |
|
BLAKE2b-256 | b89453722834abf29e00306dd70a371577dd88ced7009b7f1ad5737a4fd9b3e7 |
Close
Hashes for snakemake_interface_executor_plugins-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02283af20f028da69645bccf3d21749882056a83d648dc55f358a5f05c4c1189 |
|
MD5 | 6c36d67cf0d3471181e1b27f22ab4c38 |
|
BLAKE2b-256 | ba7f4340a646b58c4a76b9d1768376ec6bf4ccae6f16b53b95255ee51adba6c5 |