generate_report

Attributes

Classes

Module Contents

logger
ENCODING = 'utf-8'
CONTEXT_FOLDER = 'by-model-context'
TOP_N = 20
TOP_K = 20
FROM_DATE_DEFAULT = 'N/A'
TO_DATE_DEFAULT = 'N/A'
CONTRIBUTION_TYPE_DEFAULT = 'contribution'
CONTRIBUTION_TEXT_DEFAULT = 'average contribution'
VERBOSE_DEFAULT = False
DATA_FOLDER = 'aggregated_data'
UNIQUE_CONTEXTS_FILENAME = 'unique_contexts.json'
PLOTS_FOR_BATCH = 'plots_for_batch'
PARAMS_FILENAME = 'params.yml'
TEMPLATES_FOLDER = './assets/templates'
INTRODUCTION_FILENAME = 'getting-started.qmd'
OVERVIEW_FILENAME = 'overview.qmd'
ALL_CONTEXT_HEADER_TEMPLATE = 'all_context_header.qmd'
ALL_CONTEXT_CONTENT_TEMPLATE = 'all_context_content.qmd'
SINGLE_CONTEXT_TEMPLATE = 'context.qmd'
class ReportGenerator
report_folder
root_dir = ''
data_folder = ''
top_n = None
top_k = None
from_date = None
to_date = None
contribution_type = None
contribution_text = None
by_context_folder = 'Uninferable/by-model-context'
plots_for_batch_filepath = 'Uninferable/by-model-context/plots_for_batch'
contexts = None
_log_params()
_read_params()
static _get_context_dict(context_info: str) dict
Parameters:

context_info (str)

Return type:

dict

_get_context_string(context_info: str) str
Parameters:

context_info (str)

Return type:

str

static _read_template(template_filename: str) str

Read a template file and return its content.

Parameters:

template_filename (str)

Return type:

str

_write_single_context_file(embed_path_for_batch: str, filename: str, template: str, context_str: str, context_label: str)
Parameters:
  • embed_path_for_batch (str)

  • filename (str)

  • template (str)

  • context_str (str)

  • context_label (str)

_write_header_to_file(file_batch_nb: str, filename: str)
Parameters:
  • file_batch_nb (str)

  • filename (str)

_append_content_to_file(filename: str, template: str, context_dict: dict, context_label: str)
Parameters:
  • filename (str)

  • template (str)

  • context_dict (dict)

  • context_label (str)

_get_unique_contexts()
_generate_by_context_qmds()
_generate_overview_qmd()
_generate_introduction_qmd()
run()

Main method to generate the report files.

generator