-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catalog metadata checkums/DSWx ISO metadata creation #76
Conversation
rendered_template = render_jinja2(iso_template_path, iso_metadata, self.logger) | ||
|
||
return rendered_template | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very clear.
output_product_path = abspath(self.output_product_path) | ||
output_products = [join(output_product_path, filename) | ||
for filename in os.listdir(output_product_path) | ||
if isfile(join(output_product_path, filename))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I better get used to this pattern.
catalog_metadata = { | ||
'PGE_Name': "BASE_PGE_TEST", | ||
'PGE_Version': "1.0.test", | ||
'SAS_Version': "2.0.test", | ||
'Input_Files': ["input/input_file01.h5", "input/input_file02.h5"], | ||
'Ancillary_Files': ["input/input_dem.vrt"], | ||
'Production_DateTime': "2022-01-20T12:07:10.9143060000Z" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
…l object, added caching of metadata obtained from a tif file, and modified get_hls_filename_fields() to match file name format expected within geotiff metadata
…than have it handle file I/O step as well
…tive to expected template location within repository
…e_pge.PostProcessorMixin While base_pge.py now contains the hooks for ISO metadata generation, the base PgeExecutor class itself does not generate ISO metadata.
The DSWx-HLS ISO metadata is collected from the runconfig, output product(s) and catalog metdata, and then used to render the ISO jinja2 template. dswx_pge.py then relies on inherited functionality from base_pge.py for writing the actual metadata XML file to disk.
4f81a1e
to
dc9491c
Compare
I checked the changes and it all looks good. |
This PR wraps up work for two tickets, one to add MD5 checksums for output products to the catalog metadata, and another to add ISO metadata creation support to the DSWx-HLS PGE.
The necessary metadata for the ISO template is collected by the
_create_iso_metadata()
implementation within DSWxPostProcessorMixin. The rendered version of the template is returned by this method, from which the base implementation of_stage_output_files()
inbase_pge.py
handles the output of the file to disk.Closes #72
Closes #73