noisify.reporters package

noisify.reporters.reporter module

class noisify.reporters.reporter.Reporter(attributes=None, attribute_type=<function dictionary_lookup>, faults=None)[source]

Bases: noisify.helpers.fallible.Fallible

The most important class in Noisify!

Reporters define how objects should be changed. They can be as specific or a general as needed.

create_report(truth_object, identifier=None)[source]

Calling the reporter object directly on an object will call this method.

Parameters:
  • truth_object – Anything
  • identifier – Optional identifier for the output report, defaults to a serial integer
Returns:

A report for the given input object

get_attribute_by_id(attribute_identifier)[source]

Getter method for report attribute_readers

static merge_attributes(report1, report2)[source]

Merges attribute_readers between two reporters, used for reporter addition

noisify.reporters.series module

class noisify.reporters.series.Noisifier(reporter=None, faults=None)[source]

Bases: noisify.helpers.fallible.Fallible

The Noisifier class handles pipelining objects through an underlying reporter class, it can also be configured to apply faults at the pipeline level, such as confusing elements from one object to another.

get_series(source_truths, key=None, loop=False)[source]

Calling the noisifier object directly on an object will call this method.

Parameters:
  • source_truths – a series of objects (or a single object)
  • key – function which will extract a name from each object to be used as an

identifier for the resultant report. :param loop: whether to generate indefinitely by looping over the source truths :return: a report generator

noisify.reporters.series.is_atom(unknown_object)[source]

Determines whether an object is an atom or a collection