aodn/python-aodncore

CheckRunnerAdapter overrides check_type set to the Netcdf file by the handler

Closed this issue · 2 comments

ANFOG pipeline archives FV00 NetCDF files containing raw data. These files are not CF or IMOS compliant.
In the handler, their check_type is set to "format_check". However going through the CheckRunnerAdapter, the check_type is set to 'NC_COMPIANCE_CHECK' causing the pipeline to fail.
See the log :
AnfogHandler transitioned to state: HANDLER_RESOLVED 2018-06-27 11:44:12,680 INFO [root] updated file 'IMOS_ANFOG_BCEOPRSTUV_20180503T080008Z_SL210_FV00_timeseries_END-20180505T104526Z.nc': {'check_type': 'FORMAT_CHECK'} 2018-06-27 11:44:12,681 INFO [root] updated file 'IMOS_ANFOG_BCEOPRSTUV_20180503T080008Z_SL210_FV00_timeseries_END-20180505T104526Z.nc': {'publish_type': 'ARCHIVE_ONLY'} 2018-06-27 11:44:12,681 INFO [root] updated file 'TwoRocks20180503a_rawfiles.zip': {'check_type': 'FORMAT_CHECK'} 2018-06-27 11:44:12,681 INFO [root] updated file 'TwoRocks20180503a_rawfiles.zip': {'publish_type': 'ARCHIVE_ONLY'} 2018-06-27 11:44:12,681 INFO [root] updated file 'TwoRocks20180503a_PSAL.jpg': {'publish_type': 'UPLOAD_ONLY'} 2018-06-27 11:44:12,682 INFO [root] updated file 'TwoRocks20180503a_QC_Report.pdf': {'publish_type': 'UPLOAD_ONLY'} 2018-06-27 11:44:12,715 SYSINFO [root] AnfogHandler transitioned to state: HANDLER_PREPROCESSED 2018-06-27 11:44:12,715 SYSINFO [root] get_check_runner -> 'CheckRunnerAdapter' 2018-06-27 11:44:12,716 INFO [root] updated file 'IMOS_ANFOG_BCEOPRSTUV_20180503T080008Z_SL210_FV00_timeseries_END-20180505T104526Z.nc': {'check_type': 'NC_COMPLIANCE_CHECK'} 2018-06-27 11:44:12,716 INFO [root] updated file 'IMOS_ANFOG_BCEOPSTUV_20180503T080042Z_SL210_FV01_timeseries_END-20180505T054942Z.nc': {'check_type': 'NC_COMPLIANCE_CHECK'}

The CheckRunnerAdapter should retain the attributes set in the handler

Fixed by #108

Pretty well covered and simple to test in unit testing, but would be good to test in PO box @bpasquer

This has been resolved by the linked PR.