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

feat: load builtin snakemake executor plugins #73

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading