:mod:`arche.rules.result` ========================= .. py:module:: arche.rules.result Module Contents --------------- .. data:: Stat .. data:: COLORS .. py:class:: Level Bases: :class:`enum.Enum` .. attribute:: ERROR :annotation: = 2 .. attribute:: WARNING :annotation: = 1 .. attribute:: INFO :annotation: = 0 .. py:class:: Outcome Bases: :class:`enum.Enum` .. attribute:: PASSED :annotation: = 0 .. attribute:: FAILED :annotation: = 1 .. attribute:: WARNING :annotation: = 2 .. attribute:: SKIPPED :annotation: = 3 .. attribute:: INFO :annotation: = 4 .. method:: __eq__(self, other) .. method:: __ne__(self, other) .. py:class:: Message :param summary: a concise outcome :param detailed: detailed message :param errors: error messages grouped by attributes :param _err_keys: keys of items with error .. attribute:: summary :annotation: :str .. attribute:: detailed :annotation: :Optional[str] .. attribute:: errors :annotation: :Optional[Dict[str, Set]] .. attribute:: _err_keys :annotation: :Set[Union[str, int]] .. method:: err_keys(self) :property: .. py:class:: Result :param name: a rule name :param messages: messages separated by severity :param stats: pandas data to plot :param items_count: the count of verified items :param err_keys: keys of all error items :param err_items_count: the number of error items :param _figures: a list of graphs created from stats .. attribute:: name :annotation: :str .. attribute:: messages :annotation: :Dict[Level, List[Message]] .. attribute:: _stats :annotation: :List[Stat] .. attribute:: more_stats :annotation: :Dict[str, Dict] .. attribute:: items_count :annotation: :int = 0 .. attribute:: _err_keys :annotation: :Set[Union[str, int]] .. attribute:: _err_items_count :annotation: :int = 0 .. attribute:: _figures :annotation: :List[go.FigureWidget] .. attribute:: _outcome :annotation: :Optional[Outcome] .. method:: info(self) :property: .. method:: warnings(self) :property: .. method:: outcome(self) :property: .. method:: errors(self) :property: .. method:: stats(self) :property: .. method:: err_keys(self) :property: .. method:: err_items_count(self) :property: .. method:: figures(self) :property: .. method:: add_info(self, summary, detailed=None, errors=None) .. method:: add_warning(self, summary, detailed=None, errors=None) .. method:: add_error(self, summary, detailed=None, errors=None) .. method:: add_message(self, level: Level, summary: str, detailed: Optional[str] = None, errors: Optional[dict] = None) .. method:: detailed_messages_count(self) :property: .. method:: get_errors_count(self) .. method:: get_detailed_messages_count(self) .. method:: show(self, short: bool = False, keys_limit: int = 10) .. method:: create_figures(stats: List[Stat], name: str) :staticmethod: .. method:: build_stack_bar_data(values_counts: List[pd.Series]) :staticmethod: Create data for plotly stack bar chart with consistent colors between bars. Each bar values have indexes unique to the bar, without any correlation to other bars. :param values_counts: an array of value_counts series :returns: A list of Bar objects. .. method:: get_layout(name: str, rows_count: int) :staticmethod: .. method:: make_annotations(stat: pd.Series) :staticmethod: .. method:: build_box_subplots(stat: pd.DataFrame) :staticmethod: Create a figure with box subplots showing fields coverages for jobs. :param stat: a dataframe with field coverages :returns: A figure with box subplots