emodpy.reporters.base module

class emodpy.reporters.base.BaseReporter[source]

Bases: object

abstract to_dict()[source]
from_dict(data)[source]

Function allowing to initialize a Reporter instance with data. This function is called when reading a custom_reports.json file.

class emodpy.reporters.base.CustomReporter(name: str | None = None, Enabled: bool = True, Reports: list = <factory>, dll_file: str | None = None)[source]

Bases: BaseReporter

This class represents a custom reporter. - name: Name that will be added to the custom_reports.json file and should match the DLL’s class name - Enabled: True/False to enable/disable the reporter - Reports: Default section present in the custom_reports.json file allowing to configure the reporter - dll_file: Filename of the dll containing the reporter. This file will be searched in the dll folder specified by the user on the EMODTask.reporters.

name: str = None
Enabled: bool = True
Reports: list
dll_file: str = None
to_dict() Dict[source]

Export the reporter to a dictionary. This function is called when serializing the reporter before writing the custom_reports.json file.

enable()[source]
disable()[source]
class emodpy.reporters.base.BuiltInReporter(class_name: str = None, parameters: dict = <factory>, Enabled: bool = True, Pretty_Format: bool = True)[source]

Bases: BaseReporter

class_name: str = None
parameters: dict
Enabled: bool = True
Pretty_Format: bool = True
to_dict()[source]
from_dict(data)[source]

Function allowing to initialize a Reporter instance with data. This function is called when reading a custom_reports.json file.

class emodpy.reporters.base.Reporters(relative_path='reporter_plugins')[source]

Bases: InputFilesList

add_reporter(reporter)[source]
property json
property empty
add_dll(dll_path: str)[source]

Add a dll file from a path

Parameters:

dll_path – Path to file

Returns:

add_dll_folder(dll_folder: str)[source]

Add all the dll files from a folder

Parameters:

dll_folder – Folder to add the dll file from

Returns:

read_custom_reports_file(custom_reports_path, extra_classes=[]) NoReturn[source]

Read from a custom reporter file

Parameters:

custom_reports_path – The custom reports file to add(single file).

set_task_config(task: EMODTask) NoReturn[source]

Set task config

Parameters:

task – Task to configure

Returns:

gather_assets(**kwargs) List[Asset][source]

Gather input files for Input File List

Returns: