diff --git a/leda/gen/base.py b/leda/gen/base.py index 5030385..43bf1a2 100644 --- a/leda/gen/base.py +++ b/leda/gen/base.py @@ -22,6 +22,7 @@ class Report: name: str + html_title: str | None = None tag: str | None = None params: Mapping[str, Any] | None = None @@ -105,7 +106,7 @@ class ReportArtifact: class ReportGenerator: @abc.abstractmethod def generate( - self, nb_contents: nbformat.NotebookNode, nb_name: str | None = None + self, nb_contents: nbformat.NotebookNode, html_title: str | None = None ) -> bytes: ... diff --git a/leda/gen/generators.py b/leda/gen/generators.py index 90034c1..3a2f2a5 100644 --- a/leda/gen/generators.py +++ b/leda/gen/generators.py @@ -144,7 +144,7 @@ def _get_exporter_kwargs(self) -> dict: def generate( self, nb_contents: nbformat.NotebookNode, - nb_name: str | None = None, + html_title: str | None = None, ) -> bytes: logger.info("Generating notebook") preprocessor = self._get_preprocessor() @@ -158,9 +158,9 @@ def generate( body, _ = exporter.from_notebook_node(nb_contents) logger.info("Modifying HTML") - if nb_name: + if html_title: body = body.replace( - "