-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72c3397
commit 0ed4c16
Showing
5 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from typing import List | ||
from snakemake_interface_report_plugins.registry import ReportPluginRegistry | ||
from snakemake_interface_common.plugin_registry.tests import TestRegistryBase | ||
from snakemake_interface_common.plugin_registry.plugin import PluginBase, SettingsBase | ||
from snakemake_interface_common.plugin_registry import PluginRegistryBase | ||
|
||
from snakemake.report import html_reporter | ||
|
||
|
||
class TestRegistry(TestRegistryBase): | ||
__test__ = True | ||
|
||
def get_registry(self) -> PluginRegistryBase: | ||
|
||
# ensure that the singleton is reset | ||
ReportPluginRegistry._instance = None | ||
registry = ReportPluginRegistry() | ||
registry.register_plugin("html", html_reporter) | ||
|
||
return registry | ||
|
||
def get_test_plugin_name(self) -> str: | ||
return "html" | ||
|
||
def validate_plugin(self, plugin: PluginBase): | ||
assert plugin._report_settings_cls is not None | ||
assert plugin.reporter is not None | ||
|
||
def validate_settings(self, settings: SettingsBase, plugin: PluginBase): | ||
assert isinstance(settings, plugin._report_settings_cls) | ||
|
||
def get_example_args(self) -> List[str]: | ||
return ["--report-html-path", "report.zip"] |