Skip to content

Commit

Permalink
feat: load builtin snakemake report plugin (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester authored Oct 4, 2024
1 parent 1b5ddad commit d6aa345
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ snakemake-interface-common = "^1.16.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
snakemake = { git = "https://github.com/snakemake/snakemake.git", branch = "feat/report-plugins" }
snakemake = "^8.20.5"
black = "^24.2.0"
flake8 = "^7.0.0"
coverage = "^7.4.1"
Expand Down
12 changes: 12 additions & 0 deletions snakemake_interface_report_plugins/registry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,15 @@ 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.report import html_reporter
except ImportError:
# snakemake not present, proceed without adding builtin plugins
return

self.register_plugin("html", html_reporter)

0 comments on commit d6aa345

Please sign in to comment.