Adjustments to upload.py should show how this will slightly change how errors are captured.
Updated testing, and other superficial changes.
Description of changes:
Overhaul of src/ingest_validation_tools/error_report.py to remove enums/field map/error attribute name string matching and replace with custom class for ErrorDict attributes that allows them to both hold metadata about themselves as well as error info.
Updates ErrorReport to allow it to be the standard way of calling Upload.get_errors and Upload.get_info from outside of IVT, due to the need for get_errors to be called first in order to populate data in get_info. Maintained backward compatibility with previous call.
Addition of counting methods to error reporting, allowing for a quick overview of errors in an upload, e.g. in the validate_upload DAG output:
Files changed:
error_report.py
.upload.py
should show how this will slightly change how errors are captured.Description of changes:
src/ingest_validation_tools/error_report.py
to remove enums/field map/error attribute name string matching and replace with custom class for ErrorDict attributes that allows them to both hold metadata about themselves as well as error info.ErrorReport
to allow it to be the standard way of callingUpload.get_errors
andUpload.get_info
from outside of IVT, due to the need forget_errors
to be called first in order to populate data inget_info
. Maintained backward compatibility with previous call.validate_upload
DAG output:Implementation in ingest-pipeline: https://github.com/hubmapconsortium/ingest-pipeline/pull/944