atkinson.errors.reporters package

Submodules

atkinson.errors.reporters.generic module

Python logging based reporter

class atkinson.errors.reporters.generic.GenericReporter(title, logger)[source]

Bases: atkinson.errors.reporters.BaseReport

Class for a generic reporter based on the logging module

close()[source]

Close the report

classmethod get(report_id, config)[source]

Retrieve an active report

Parameters:
  • report_id – The unique id (the report title) for the report
  • config – Configuration dictionary for the report
Returns:

A LoggingReporter instance

classmethod new(title, description, config)[source]

Create a new report

Parameters:
  • title – The title for the report
  • description – A description for the report
  • config – Configuration dictionary for the report
Returns:

A LoggingReporter instance

report_id

Return the unique id for this report

update(**kwargs)[source]

Update the report

Parameters:kwargs – A dictionary of named arguments to report

atkinson.errors.reporters.trello module

Trello Card error reporter

class atkinson.errors.reporters.trello.TrelloCard(card_id, api, new_column, close_column)[source]

Bases: atkinson.errors.reporters.BaseReport

Trello error card base class

close()[source]

Close report

classmethod get(report_id, config)[source]

Get a report object based on the report id.

Parameters:
  • report_id (Trello unique id) – The id of the report to construct
  • config (dict) – Reporter configuration dictionary
Returns:

A TrelloCard instance based on the report_id

Note

Required configuration keys and values
  • board_id The trello board unique id
  • new_column The name(str) of the column where new cards are added This would be the same name as seen in the Trello webui
  • close_column The name(str) of the column where closed/inactive are moved. This would be the same name as seen in the Trello webui
classmethod new(title, description, config)[source]

Create a TrelloCard instance

Parameters:
  • title (str) – A title for the trello card
  • description (str) – A description for the trello card
  • config (dict) – A configuration dictionary
Returns:

A TrelloCard instance

Note

Required configuration keys and values
  • board_id The trello board unique id
  • new_column The name(str) of the column where new cards are added This would be the same name as seen in the Trello webui
  • close_column The name(str) of the column where closed/inactive are moved. This would be the same name as seen in the Trello webui
report_id

The id of the report

update(**kwargs)[source]

Update the current report

Parameters:kwargs – A dictionary of report items to update
atkinson.errors.reporters.trello.get_columns(api, config)[source]

Get the trello column ids for a trello board given a api handle and the id of the board.

Parameters:
  • api – A trollo Boards api handle.
  • config (dict) – The configuration data (see note below for details).
Returns:

A tuple of column trello ids

Note

Required configuration keys and values
  • board_id The trello board unique id
  • new_column The name(str) of the column where new cards are added This would be the same name as seen in the Trello webui
  • close_column The name(str) of the column where closed/inactive are moved. This would be the same name as seen in the Trello webui
atkinson.errors.reporters.trello.get_trello_api()[source]

Construct an interface to trello using the trollo api

Module contents

General error report classes

class atkinson.errors.reporters.BaseReport[source]

Bases: abc.ABC

Abstract base class for error reports

close()[source]

Close out the report

classmethod get(report_id, config)[source]

Get a current report object by ID

Parameters:
  • report_id (str) – The ID for the report
  • config (dict) – Configuration information for the report
classmethod new(title, description, config)[source]

Create a new report and return a report object

Parameters:
  • title (str) – A title for the report
  • description (str) – Description for the report
  • config (dict) – Configuration information for the report
report_id

The id of the report

update(**kwargs)[source]

Update the data on an active report

Parameters:kwargs – Name=value pairs of data to update in the report