File tree Expand file tree Collapse file tree 5 files changed +40
-8
lines changed
snakemake_interface_report_plugins Expand file tree Collapse file tree 5 files changed +40
-8
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,13 @@ readme = "README.md"
9
9
python = " ^3.11"
10
10
snakemake-interface-common = " ^1.16.0"
11
11
12
- [tool .poetry .dev-dependencies ]
12
+ [tool .poetry .group .dev .dependencies ]
13
+ pytest = " ^8.0.0"
14
+ snakemake = { git = " https://github.com/snakemake/snakemake.git" , branch = " feat/report-plugins" }
13
15
black = " ^24.2.0"
14
16
flake8 = " ^7.0.0"
15
17
coverage = " ^7.4.1"
16
18
17
- [tool .poetry .group .dev .dependencies ]
18
- pytest = " ^8.0.0"
19
-
20
19
[build-system ]
21
20
requires = [" poetry-core" ]
22
21
build-backend = " poetry.core.masonry.api"
Original file line number Diff line number Diff line change 8
8
from snakemake_interface_report_plugins .settings import (
9
9
ReportSettingsBase ,
10
10
)
11
- from snakemake_interface_storage_plugins import common
11
+ from snakemake_interface_report_plugins import common
12
12
13
13
from snakemake_interface_common .plugin_registry .plugin import PluginBase
14
14
@@ -25,7 +25,7 @@ def name(self):
25
25
26
26
@property
27
27
def cli_prefix (self ):
28
- return "report-" + self .name .replace (common .storage_plugin_module_prefix , "" )
28
+ return "report-" + self .name .replace (common .report_plugin_module_prefix , "" )
29
29
30
30
@property
31
31
def settings_cls (self ):
Original file line number Diff line number Diff line change 6
6
7
7
from abc import ABC , abstractmethod
8
8
from typing import List , Mapping
9
- from snakemake_interface_report_plugin .interfaces import (
9
+ from snakemake_interface_report_plugins .interfaces import (
10
10
CategoryInterface ,
11
11
ConfigFileRecordInterface ,
12
12
JobRecordInterface ,
13
13
RuleRecordInterface ,
14
14
)
15
- from snakemake_interface_report_plugin .settings import ReportSettingsBase
15
+ from snakemake_interface_report_plugins .settings import ReportSettingsBase
16
16
from snakemake_interface_report_plugins .interfaces import DAGReportInterface
17
17
18
18
Original file line number Diff line number Diff line change
1
+ from typing import List
2
+ from snakemake_interface_report_plugins .registry import ReportPluginRegistry
3
+ from snakemake_interface_common .plugin_registry .tests import TestRegistryBase
4
+ from snakemake_interface_common .plugin_registry .plugin import PluginBase , SettingsBase
5
+ from snakemake_interface_common .plugin_registry import PluginRegistryBase
6
+
7
+ from snakemake .report import html_reporter
8
+
9
+
10
+ class TestRegistry (TestRegistryBase ):
11
+ __test__ = True
12
+
13
+ def get_registry (self ) -> PluginRegistryBase :
14
+
15
+ # ensure that the singleton is reset
16
+ ReportPluginRegistry ._instance = None
17
+ registry = ReportPluginRegistry ()
18
+ registry .register_plugin ("html" , html_reporter )
19
+
20
+ return registry
21
+
22
+ def get_test_plugin_name (self ) -> str :
23
+ return "html"
24
+
25
+ def validate_plugin (self , plugin : PluginBase ):
26
+ assert plugin ._report_settings_cls is not None
27
+ assert plugin .reporter is not None
28
+
29
+ def validate_settings (self , settings : SettingsBase , plugin : PluginBase ):
30
+ assert isinstance (settings , plugin ._report_settings_cls )
31
+
32
+ def get_example_args (self ) -> List [str ]:
33
+ return ["--report-html-path" , "report.zip" ]
You can’t perform that action at this time.
0 commit comments