Skip to content

Report Class for exporting Analyses #3

Description

@NilsHMeier

The framework should provide the option to generate HTML or PDF outputs of the created analysis, therefore we need a wrapper class the is capable of doing these things. The class could be implemented in a way, such that blocks / insights (text, images, tables, etc.) can be added and deleted. Finally, when all building blocks are added one of the export methods can be called and the output is generated accordingly (respecting the order te blocks were added).

Some methods the class needs to include may be:

  • add_content(self, key: str, content: Union[Text, Figure, Table]) -> bool
  • remove_content(self, key: str) -> bool
  • export_to_html(self, path: Union[str, Path], return_html: bool) -> Optional[str]
  • export_to_pdf(self, path: Union[str, Path])
  • ...

It might be useful to create content classes as well, if that would simpify the further handling of the contents. This might be done by a metaclass "Content" defining methods and properties and subclasses that inherit from the metaclass and implement the methods based on the respective type of content.

Dependencies
None.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions