Skip to content

Commit d6aa345

Browse files
feat: load builtin snakemake report plugin (#2)
1 parent 1b5ddad commit d6aa345

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ snakemake-interface-common = "^1.16.0"
1111

1212
[tool.poetry.group.dev.dependencies]
1313
pytest = "^8.0.0"
14-
snakemake = { git = "https://github.com/snakemake/snakemake.git", branch = "feat/report-plugins" }
14+
snakemake = "^8.20.5"
1515
black = "^24.2.0"
1616
flake8 = "^7.0.0"
1717
coverage = "^7.4.1"

snakemake_interface_report_plugins/registry/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,15 @@ def expected_attributes(self) -> Mapping[str, AttributeType]:
4848
kind=AttributeKind.CLASS,
4949
),
5050
}
51+
52+
def collect_plugins(self):
53+
"""Collect plugins and call register_plugin for each."""
54+
super().collect_plugins()
55+
56+
try:
57+
from snakemake.report import html_reporter
58+
except ImportError:
59+
# snakemake not present, proceed without adding builtin plugins
60+
return
61+
62+
self.register_plugin("html", html_reporter)

0 commit comments

Comments
 (0)