Skip to content

Commit

Permalink
Merge pull request #756 from asfadmin/topic-aria-v3
Browse files Browse the repository at this point in the history
ARIA V2 Version Numbering
  • Loading branch information
SpicyGarlicAlbacoreRoll authored Jun 1, 2024
2 parents 5f881c5 + ce0bd8f commit 91441e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SearchAPI/CMR/Translate/parse_cmr_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from defusedxml.lxml import fromstring
import datetime
from .fields import get_field_paths, attr_path

import re

def parse_cmr_response(r, req_fields):
"""
Expand Down Expand Up @@ -237,9 +237,14 @@ def get_s3_urls():

if 'STATIC' in result['processingLevel']:
result['validityStartDate'] = get_val('./Temporal/SingleDateTime')
elif result.get('product_file_id', '').startswith('S1-GUNW') and result.get('ariaVersion') is None:
version_unformatted = result.get('granuleName').split('v')[-1]
result['ariaVersion'] = re.sub(r'[^0-9\.]', '', version_unformatted.replace("_", '.'))

if result.get('platform', '') == 'NISAR':
result['additionalUrls'] = get_http_urls()
result['s3Urls'] = get_s3_urls()

return result


Expand Down

0 comments on commit 91441e3

Please sign in to comment.