Backend solution for abcunit success / failure logs
Project description
Storage backends for an ABCUnit Framework, logging success and failures of process units.
Database Backend
To use this backend you will need to contact the JASMIN help desk (support@jasmin.ac.uk) and ask them to setup a postgresql database for you. Specify a name for the database and a username to login with. JASMIN support will get back to you with the user password and host name.
After you have got your database, you’ll need to export an environment variable called $ABCUNIT_DB_SETTINGS and set it to a connection string for psycopg2:
ABCUNIT_DB_SETTINGS="dbname=<name> user=<user> host=<host> password=<pwd>"
DatabaseHandler class construction looks like this:
DatabaseHandler(table_name="results")
Where
table_name is the name of the table logs will be insert into
Connects to an existing database and creates a table to store results:
<table_name> (id varchar(255) PRIMARY KEY, result varchar(255) NOT NULL)
id |
result |
---|---|
facet1.facet2.facet3 |
success |
facet1.facet2.facet3 |
bad_file |
⋮ |
⋮ |
File System Backend
FileSystemHandler class construction looks like this:
FileSytemHandler(base_log_dir, n_facets, sep)
Where;
base_log_dir is the string path to top level directory for logs
n_facets is the number of facets used to describe each unit result
sep is the separator used for a result identifier
Uses the file system to create log files marking success and failures, categorised by directory structure:
<log_base_dir>/success/facet1/facet2/facet3
<log_base_dir>/failure/error_type/facet1/facet2/facet3
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for abcunit_backend-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3db988156a433b1d7f098b5faf1e13190a477a9440581c4b893a7ada853b3a35 |
|
MD5 | b0812ca2b3d82736c104875dba290dc6 |
|
BLAKE2b-256 | 6e93554bf0f27595eda8885e7dbbc323d0157904d152f3ee1fa1f3c120595bae |