ComplianceChecker#

class compliance_checker.runner.ComplianceChecker[source]#

Compliance Checker runner class.

Ties together the entire compliance checker framework, is used from the command line or can be used via import.

Methods

check_errors(score_groups, verbose)

Reports any errors (exceptions) that occurred during checking to stderr.

html_output(cs, score_dict, output_filename, ...)

Generates rendered HTML output for the compliance score(s) @param cs Compliance Checker Suite @param score_groups List of results @param output_filename The file path to output to @param ds_loc List of source datasets @param limit The degree of strictness, 1 being the strictest, and going up from there.

json_output(cs, score_dict, output_filename, ...)

Generates JSON output for the ocmpliance score(s) @param cs Compliance Checker Suite @param score_groups List of results @param output_filename The file path to output to @param ds_loc List of source datasets @param limit The degree of strictness, 1 being the strictest, and going up from there. @param output_type Either 'json' or 'json_new'. json_new is the new json output format that supports multiple datasets.

run_checker(ds_loc, checker_names, verbose, ...)

Static check runner.

stdout_output(cs, score_dict, verbose, limit)

Calls output routine to display results in terminal, including scoring.

Methods Summary

__init__(*args, **kwargs)

check_errors(score_groups, verbose)

Reports any errors (exceptions) that occurred during checking to stderr.

html_output(cs, score_dict, output_filename, ...)

Generates rendered HTML output for the compliance score(s) @param cs Compliance Checker Suite @param score_groups List of results @param output_filename The file path to output to @param ds_loc List of source datasets @param limit The degree of strictness, 1 being the strictest, and going up from there.

json_output(cs, score_dict, output_filename, ...)

Generates JSON output for the ocmpliance score(s) @param cs Compliance Checker Suite @param score_groups List of results @param output_filename The file path to output to @param ds_loc List of source datasets @param limit The degree of strictness, 1 being the strictest, and going up from there. @param output_type Either 'json' or 'json_new'. json_new is the new json output format that supports multiple datasets.

run_checker(ds_loc, checker_names, verbose, ...)

Static check runner.

stdout_output(cs, score_dict, verbose, limit)

Calls output routine to display results in terminal, including scoring.

Methods Documentation

__init__(*args, **kwargs)#
classmethod check_errors(score_groups, verbose)[source]#

Reports any errors (exceptions) that occurred during checking to stderr. Goes to verbose function if called by user.

@param score_groups List of results @param verbose Integer value for verbosity level

classmethod html_output(cs, score_dict, output_filename, ds_loc, limit)[source]#

Generates rendered HTML output for the compliance score(s) @param cs Compliance Checker Suite @param score_groups List of results @param output_filename The file path to output to @param ds_loc List of source datasets @param limit The degree of strictness, 1 being the strictest, and going up from there.

classmethod json_output(cs, score_dict, output_filename, ds_loc, limit, output_type='json')[source]#

Generates JSON output for the ocmpliance score(s) @param cs Compliance Checker Suite @param score_groups List of results @param output_filename The file path to output to @param ds_loc List of source datasets @param limit The degree of strictness, 1 being the strictest,

and going up from there.

@param output_type Either ‘json’ or ‘json_new’. json_new is the new

json output format that supports multiple datasets

classmethod run_checker(ds_loc, checker_names, verbose, criteria, skip_checks=None, include_checks=None, output_filename='-', output_format='text', options=None)[source]#

Static check runner.

@param ds_loc Dataset location (url or file) @param checker_names List of string names to run, should match keys of checkers dict (empty list means run all) @param verbose Verbosity of the output (0, 1, 2) @param criteria Determines failure (lenient, normal, strict) @param output_filename Path to the file for output @param skip_checks Names of checks to skip @param include_checks Names of checks to include @param output_format Format of the output(s)

@returns If the tests failed (based on the criteria)

classmethod stdout_output(cs, score_dict, verbose, limit)[source]#

Calls output routine to display results in terminal, including scoring. Goes to verbose function if called by user.

@param cs Compliance Checker Suite @param score_dict Dict with dataset name as key, list of results as

value

@param verbose Integer value for verbosity level @param limit The degree of strictness, 1 being the strictest, and going up from there.