Skip to content
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

#348 add disp_s1 iso-metadata #367

Merged
merged 4 commits into from
Sep 24, 2023
Merged

#348 add disp_s1 iso-metadata #367

merged 4 commits into from
Sep 24, 2023

Conversation

JimHofman
Copy link
Collaborator

Description

  • Produce ISO XML metadata using jinja1 template

Testing

  • added a unit test (98% code coverage)

for use with the ISO metadata Jinja2 template.

"""
# Find a single representative output DSWx-HLS product, they should all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DSWx-HLS -> DISP-S1

'ISO_OPERA_ProducerGranuleId': self._core_filename(),
'MetadataProviderAction': "creation",
'GranuleFilename': self._core_filename(),
'ISO_OPERA_ProjectKeywords': ['OPERA', 'JPL', 'DSWx', 'Dynamic', 'Surface', 'Water', 'Extent'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these particular keywords be related to surface displacement?

Copy link
Collaborator

@collinss-jpl collinss-jpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good, but the unit test needs a few more checks, and the changes to requirements.txt need to be reverted before merge.

requirements.txt Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this intended for inclusion? I want to keep the versions un-pinned in this file since we install into an existing environment within the SAS container.

@@ -36,7 +39,7 @@ class DispS1PreProcessorMixin(PreProcessorMixin):
def run_preprocessor(self, **kwargs):
"""
Executes the pre-processing steps for DISP-S1 PGE initialization.
The DswxS1PreProcessorMixin version of this class performs all actions
The DispS1PreProcessorMixin version of this class performs all actions
of the base PreProcessorMixin class, and adds an input validation step for
the inputs defined within the RunConfig (TODO).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The (TODO) here can be removed


pge = DispS1Executor(pge_name="DispS1PgeTest", runconfig_path=runconfig_path)
pge.run()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unit test should also testing the following:

  • That the .iso.xml file was written to disk with the expected filename
  • That the contents of the iso.xml does not contain the phrase "!Not found!"

See the example here for DSWx-HLS: https://github.com/nasa/opera-sds-pge/blob/main/src/opera/test/pge/dswx_hls/test_dswx_hls_pge.py#L132-L141

@collinss-jpl collinss-jpl merged commit 15077f0 into main Sep 24, 2023
@collinss-jpl collinss-jpl deleted the 348_disp_s1_iso_xml branch February 6, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants