diff --git a/popmon/config.py b/popmon/config.py index c9d90261..c7cf86b1 100644 --- a/popmon/config.py +++ b/popmon/config.py @@ -96,7 +96,7 @@ class HistogramSectionModel(SectionModel): top_n: int = 20 """plot heatmap for top 'n' categories. default is 20 (optional)""" - cmap: str = "autumn_r" + cmap: str = "ylorrd" """colormap for histogram heatmaps""" diff --git a/popmon/pipeline/report_pipelines.py b/popmon/pipeline/report_pipelines.py index eb13fc9f..b8edf65c 100644 --- a/popmon/pipeline/report_pipelines.py +++ b/popmon/pipeline/report_pipelines.py @@ -251,7 +251,9 @@ def __init__( settings=settings, ), # generate report - ReportGenerator(read_key=sections_key, store_key=store_key, settings=settings), + ReportGenerator( + read_key=sections_key, store_key=store_key, settings=settings + ), ] if ( isinstance(settings.report_filepath, (str, Path)) diff --git a/popmon/visualization/histogram_section.py b/popmon/visualization/histogram_section.py index eb587003..7351544c 100644 --- a/popmon/visualization/histogram_section.py +++ b/popmon/visualization/histogram_section.py @@ -263,7 +263,6 @@ def _plot_histograms(feature, date, hc_list, hist_names, top_n, max_nbins=1000): } - def _plot_heatmap( feature, date, diff --git a/popmon/visualization/report_generator.py b/popmon/visualization/report_generator.py index aaf643f8..1c7e22b4 100644 --- a/popmon/visualization/report_generator.py +++ b/popmon/visualization/report_generator.py @@ -21,6 +21,7 @@ import htmlmin from ..base import Module +from ..config import Report from ..resources import templates_env from ..version import version @@ -33,7 +34,7 @@ class ReportGenerator(Module): _input_keys = ("read_key",) _output_keys = ("store_key",) - def __init__(self, read_key, store_key, online_report=False): + def __init__(self, read_key, store_key, settings: Report): """Initialize an instance of ReportGenerator. :param str read_key: key of input sections data to read from the datastore @@ -43,7 +44,7 @@ def __init__(self, read_key, store_key, online_report=False): super().__init__() self.read_key = read_key self.store_key = store_key - self.online_report = online_report if online_report is not None else False + self.online_report = settings.online_report def get_description(self): return "HTML Report" diff --git a/popmon/visualization/utils.py b/popmon/visualization/utils.py index fc75ebf3..09c0e8d6 100644 --- a/popmon/visualization/utils.py +++ b/popmon/visualization/utils.py @@ -22,7 +22,6 @@ import logging import math from collections import defaultdict -from io import BytesIO, StringIO from typing import List import numpy as np