arche.rules.result

Module Contents

arche.rules.result.Stat
arche.rules.result.COLORS
class arche.rules.result.Level

Bases: enum.Enum

ERROR = 2
WARNING = 1
INFO = 0
class arche.rules.result.Outcome

Bases: enum.Enum

PASSED = 0
FAILED = 1
WARNING = 2
SKIPPED = 3
INFO = 4
__eq__(self, other)
__ne__(self, other)
class arche.rules.result.Message
Parameters
  • summary – a concise outcome

  • detailed – detailed message

  • errors – error messages grouped by attributes

  • _err_keys – keys of items with error

summary :str
detailed :Optional[str]
errors :Optional[Dict[str, Set]]
_err_keys :Set[Union[str, int]]
property err_keys(self)
class arche.rules.result.Result
Parameters
  • name – a rule name

  • messages – messages separated by severity

  • stats – pandas data to plot

  • items_count – the count of verified items

  • err_keys – keys of all error items

  • err_items_count – the number of error items

  • _figures – a list of graphs created from stats

name :str
messages :Dict[Level, List[Message]]
_stats :List[Stat]
more_stats :Dict[str, Dict]
items_count :int = 0
_err_keys :Set[Union[str, int]]
_err_items_count :int = 0
_figures :List[go.FigureWidget]
_outcome :Optional[Outcome]
property info(self)
property warnings(self)
property outcome(self)
property errors(self)
property stats(self)
property err_keys(self)
property err_items_count(self)
property figures(self)
add_info(self, summary, detailed=None, errors=None)
add_warning(self, summary, detailed=None, errors=None)
add_error(self, summary, detailed=None, errors=None)
add_message(self, level: Level, summary: str, detailed: Optional[str] = None, errors: Optional[dict] = None)
property detailed_messages_count(self)
get_errors_count(self)
get_detailed_messages_count(self)
show(self, short: bool = False, keys_limit: int = 10)
static create_figures(stats: List[Stat], name: str)
static build_stack_bar_data(values_counts: List[pd.Series])

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.

Parameters

values_counts – an array of value_counts series

Returns

A list of Bar objects.

static get_layout(name: str, rows_count: int)
static make_annotations(stat: pd.Series)
static build_box_subplots(stat: pd.DataFrame)

Create a figure with box subplots showing fields coverages for jobs.

Parameters

stat – a dataframe with field coverages

Returns

A figure with box subplots