4.8 KiB
4.8 KiB
In [ ]:
import os
from nbutils import add_project_path_to_sys_path
# Add project root to sys.path
add_project_path_to_sys_path()
try:
import src.hdf5_ops as hdf5_ops
import pipelines.metadata_revision as metadata_revision
print("Imports successful!")
except ImportError as e:
print(f"Import error: {e}")Imports successful!
In [ ]:
hdf5_file_path = "../output_files/collection_kinetic_flowtube_study_LuciaI_2022-01-31_2023-06-29/kinetic_flowtube_study_LuciaI_2023-06-29.h5"In [4]:
yaml_file_path = hdf5_ops.serialize_metadata(hdf5_file_path,output_format='json')
if os.path.exists(yaml_file_path):
print(f'The YAML file representation {yaml_file_path} of the HDF5 file {hdf5_file_path} was created successfully.')The YAML file representation output_files/collection_kinetic_flowtube_study_LuciaI_2022-01-31_2023-06-29/kinetic_flowtube_study_LuciaI_2023-06-29.json of the HDF5 file output_files/collection_kinetic_flowtube_study_LuciaI_2022-01-31_2023-06-29/kinetic_flowtube_study_LuciaI_2023-06-29.h5 was created successfully.
In [ ]:
def metadata_annotation_process(yaml_file_path):
# Include metadata annotation logic, e.g., load yaml file and modify its content accordingly
print(f'Ensure your edits to {yaml_file_path} have been properly incorporated and saved.')
return yaml_file_path
yaml_file_path = metadata_annotation_process(yaml_file_path)In [ ]:
metadata_revision.update_hdf5_file_with_review(hdf5_file_path,yaml_file_path)