Open kujaku11 opened 2 months ago
Thanks -- This is a good suggestion. I followed it mostly, but with a twist.
I renamed process_mth5 to process_mth5_legacy, and now process_mth5 calls process_mth5_legacy with a try_except.
This avoids an extra layer of indentation in the core processing method, but more importantly provides an entry point for other variations on processing from mth5 in future, i.e. a place to plug in other codes with other processing configs.
The fix is up on patches
.
The tests seem to be passing will need to get past #325 before I can merge into main
Somewhere in the Aurora pipeline there is an MTH5 file that is open and if Aurora crashes the MTH5 stays open, which is not ideal. It may be line 405 of
aurora/pipelines/process_mth5
:tfk.initialize_mth5s()
. Perhaps awith
statement here could close the MTH5 if something crashes. Or atry/except
statement that catches errors, if an error is encountered callmth5.utils.helpers.close_open_files()
then raise the error?Maybe: