diff --git a/src/hdf5_lib.py b/src/hdf5_lib.py index a7ab09b..92babfe 100644 --- a/src/hdf5_lib.py +++ b/src/hdf5_lib.py @@ -505,6 +505,10 @@ def save_processed_dataframe_to_hdf5(df, annotator, src_hdf5_path, script_date, # Get metadata metadata_dict = annotator.get_metadata() + # Prepare project level attributes + + root_level_attributes = metadata_dict['metadata']['project'] + # Prepare high-level attributes high_level_attributes = { 'parent_files': metadata_dict['parent_files'], @@ -538,6 +542,7 @@ def save_processed_dataframe_to_hdf5(df, annotator, src_hdf5_path, script_date, # Write to HDF5 with h5py.File(output_filename, 'w') as h5file: + h5file.attrs.update(root_level_attributes) transfer_file_dict_to_hdf5(h5file, '/', file_dict)