Skip to content

Commit 447bec4

Browse files
feat: add the metadata interface to the reporter class (#6)
This is required, to allow custom metadata in the report (snakemake/snakemake#3452). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added support for including optional metadata when creating reports. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Johannes Köster <[email protected]>
1 parent 282dc07 commit 447bec4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

snakemake_interface_report_plugins/reporter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
from abc import ABC, abstractmethod
8-
from typing import List, Mapping
8+
from typing import List, Mapping, Dict, Optional, Union
99
from snakemake_interface_report_plugins.interfaces import (
1010
CategoryInterface,
1111
ConfigFileRecordInterface,
@@ -28,6 +28,9 @@ def __init__(
2828
settings: ReportSettingsBase,
2929
workflow_description: str,
3030
dag: DAGReportInterface,
31+
metadata: Optional[
32+
Dict[str, Union[str, int, float, List[str], List[int], List[float]]]
33+
] = None,
3134
):
3235
self.rules = rules
3336
self.jobs = jobs
@@ -36,6 +39,7 @@ def __init__(
3639
self.settings = settings
3740
self.workflow_description = workflow_description
3841
self.dag = dag
42+
self.metadata = metadata
3943

4044
self.__post_init__()
4145

0 commit comments

Comments
 (0)