Skip to content

Commit 03ee96b

Browse files
feat: load builtin snakemake executor plugins (#73)
1 parent 56b8c84 commit 03ee96b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ version = "9.2.0"
1111
argparse-dataclass = "^2.0.0"
1212
python = "^3.11"
1313
throttler = "^1.2.2"
14-
snakemake-interface-common = "^1.12.0"
14+
snakemake-interface-common = "^1.17.4"
1515

1616
[tool.poetry.dev-dependencies]
1717
black = "^24.0.0"

snakemake_interface_executor_plugins/registry/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,18 @@ def expected_attributes(self) -> Mapping[str, AttributeType]:
5757
kind=AttributeKind.CLASS,
5858
),
5959
}
60+
61+
def collect_plugins(self):
62+
"""Collect plugins and call register_plugin for each."""
63+
super().collect_plugins()
64+
65+
try:
66+
from snakemake.executors import local as local_executor
67+
from snakemake.executors import dryrun as dryrun_executor
68+
from snakemake.executors import touch as touch_executor
69+
except ImportError:
70+
# snakemake not present, proceed without adding these plugins
71+
return
72+
73+
for executor in [local_executor, dryrun_executor, touch_executor]:
74+
self.register_plugin(executor.__name__, executor)

0 commit comments

Comments
 (0)