API¶
Backend¶
- class abcunit_backend.database_handler.DataBaseHandler(table_name='results')[source]¶
Bases:
abcunit_backend.base_handler.BaseHandler
- delete_result(identifier)[source]¶
Deletes entry specified by the given identifier from the database
- Parameters
identifier – (str) Identifier of the job
- get_all_results()[source]¶
- Returns
(dict) Dictionary of all job identifiers mapped to their respective results
- get_failed_runs()[source]¶
- Returns
(dict) Dictionary of error types mapped to lists of job identifiers which result in them
- get_result(identifier)[source]¶
Selects the result of the job with the identifier parsed and returns it
- Parameters
identifier – (str) Identifier of the job result
- Returns
(str) Result of job
- get_successful_runs()[source]¶
- Returns
(str list) Returns a list of the identifiers of all successful runs
- insert_failure(identifier, error_type='failure')[source]¶
Inserts an entry into the table with a given identifier and erroneous result
- Parameters
identifier – (str) Identifier of the job
error_type – (str) Result of the job
- class abcunit_backend.file_system_handler.FileSystemHandler(base_log_dir, n_facets, sep)[source]¶
Bases:
abcunit_backend.base_handler.BaseHandler
- delete_result(identifier)[source]¶
Deletes result file from the file system given its identifier
- Parameters
identifier – (str) Identifier of the job
- get_all_results()[source]¶
- Returns
(dict) Dictionary of all job identifiers mapped to their respective results
- get_failed_runs()[source]¶
- Returns
(dict) Dictionary of error types mapped to lists of job identifiers which result in them
- get_result(identifier)[source]¶
Returns the value of a result given its identifier
- Parameters
identifier – (str) Identifier of the job
- Returns
(str) Result of job
- get_successful_runs()[source]¶
- Returns
(str list) Returns a list of the identifiers of all successful runs
- insert_failure(identifier, error_type)[source]¶
Creates a failure result file using the identifier and error type parsed
- Parameters
identifier – (str) Identifier of the job
error_type – (str) Result of the job
- insert_success(identifier)[source]¶
Creates a successful result file with the identifier passed
- Parameters
identifier – (str) Identifier of the job