Renamed take_yml_snapshot_of_hdf5_file func as to_yaml func
This commit is contained in:
@ -7,7 +7,7 @@ import subprocess
|
||||
import h5py
|
||||
import yaml
|
||||
import utils.g5505_utils as utils
|
||||
import src.hdf5_vis as hdf5_vis
|
||||
import src.hdf5_ops as hdf5_ops
|
||||
import src.hdf5_lib as hdf5_lib
|
||||
import src.git_ops as git_ops
|
||||
|
||||
@ -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 take_yml_snapshot_of_hdf5_file(filename_path) ")
|
||||
raise ValueError("metadata review cannot be initialized. The associated .yaml file under review was not found. Run to_yaml(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_vis.take_yml_snapshot_of_hdf5_file(input_hdf5_file)
|
||||
output_yml_filename_path = hdf5_ops.to_yaml(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):
|
||||
@ -278,7 +278,7 @@ def last_submit_metadata_review(reviewer_attrs):
|
||||
|
||||
|
||||
#import config_file
|
||||
#import hdf5_vis
|
||||
#import hdf5_ops
|
||||
|
||||
class MetadataHarvester:
|
||||
def __init__(self, parent_files=None):
|
||||
@ -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_vis.take_yml_snapshot_of_hdf5_file(output_filename_path)
|
||||
#output_yml_filename_path = hdf5_ops.to_yaml(output_filename_path)
|
||||
|
||||
#first_initialize_metadata_review(output_filename_path,initials='NG')
|
||||
#second_submit_metadata_review()
|
||||
|
@ -352,7 +352,7 @@ def print_metadata(name, obj, folder_depth, yaml_dict):
|
||||
#elif len(obj.name.split('/')) == 3:
|
||||
# print(yaml.dump())
|
||||
|
||||
def take_yml_snapshot_of_hdf5_file(input_filename_path,folder_depth: int = 4):
|
||||
def to_yaml(input_filename_path,folder_depth: int = 4):
|
||||
|
||||
yaml_dict = {}
|
||||
|
||||
|
Reference in New Issue
Block a user