Refactored a few function calls due to ranming changes in utils module

This commit is contained in:
2024-09-27 08:58:35 +02:00
parent 96dad0bfb1
commit afe31288a0

View File

@ -53,7 +53,7 @@ def first_initialize_metadata_review(hdf5_file_path, reviewer_attrs, restart = F
# Verify if yaml snapshot of input h5 file exists
if not os.path.exists(os.path.join(hdf5_file_path_tail,filename+YAML_EXT)):
raise ValueError("metadata review cannot be initialized. The associated .yaml file under review was not found. Run to_yaml(filename_path) ")
raise ValueError("metadata review cannot be initialized. The associated .yaml file under review was not found. Run serialize_metadata(filename_path) ")
# Initialize metadata review workflow
# print("Create branch metadata-review-by-"+initials+"\n")
@ -217,7 +217,7 @@ def update_hdf5_file_with_review(input_hdf5_file, yaml_review_file):
yaml_dict = load_yaml(yaml_review_file)
update_hdf5_attributes(input_hdf5_file, yaml_dict)
# Regenerate yaml snapshot of updated HDF5 file
output_yml_filename_path = hdf5_ops.to_yaml(input_hdf5_file)
output_yml_filename_path = hdf5_ops.serialize_metadata(input_hdf5_file)
print(f'{output_yml_filename_path} was successfully regenerated from the updated version of{input_hdf5_file}')
def third_update_hdf5_file_with_review(input_hdf5_file, yaml_review_file, reviewer_attrs={}, hdf5_upload=False):
@ -367,7 +367,7 @@ def main():
output_filename_path = "output_files/unified_file_smog_chamber_2024-03-19_UTC-OFST_+0100_NG.h5"
output_yml_filename_path = "output_files/unified_file_smog_chamber_2024-03-19_UTC-OFST_+0100_NG.yalm"
output_yml_filename_path_tail, filename = os.path.split(output_yml_filename_path)
#output_yml_filename_path = hdf5_ops.to_yaml(output_filename_path)
#output_yml_filename_path = hdf5_ops.serialize_metadata(output_filename_path)
#first_initialize_metadata_review(output_filename_path,initials='NG')
#second_submit_metadata_review()