Skip to content

Commit

Permalink
feat: load builtin snakemake executor plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Oct 4, 2024
1 parent 56b8c84 commit c7198a6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions snakemake_interface_executor_plugins/registry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,18 @@ def expected_attributes(self) -> Mapping[str, AttributeType]:
kind=AttributeKind.CLASS,
),
}

def collect_plugins(self):
"""Collect plugins and call register_plugin for each."""
super().collect_plugins()

try:
from snakemake.executors import local as local_executor
from snakemake.executors import dryrun as dryrun_executor
from snakemake.executors import touch as touch_executor
except ImportError:
# snakemake not present, proceed without adding these plugins
return

for executor in [local_executor, dryrun_executor, touch_executor]:
self.register_plugin(executor.__name__, executor)

0 comments on commit c7198a6

Please sign in to comment.