phenome_core.core.base.base_exporter module

class BaseExporter(config)

Bases: object

Base class responsible for exporting data from the Results collector object

build_metric(results, kpi, key, value, object_id, model_id)
build_metric_collection(pattern, collector)

Returns a dictionary of metrics (key:value) pairs according to pattern that various exporters can process in their own ways

Parameters
  • pattern – String containing pattern for metric to output

  • collector – Results collector containing all the object results to export

Returns

dict of results (pattern_key: value) ready to export

abstract export(collector)

Exports data in the collector object according to the SubClass impl Optionally stores the exported EDRs into a new list

get_exported_records()
class ExportDataRecord(metric, key, value, value_type, units, object_id, model_id)

Bases: object

Creates a base record to use when exporting data

key = None
metric = None
model_id = 0
object_id = 0
units = None
value = None
value_type = None