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

Feature/issue 117 improve name of output file #121

Merged
merged 18 commits into from
Nov 14, 2024

Conversation

danielfromearth
Copy link
Collaborator

@danielfromearth danielfromearth commented Jul 5, 2024

Github Issue: #117

Description

Change the name of the output file, from:
f'{collection}_merged.nc4'
to
f'{first_url_name}_{datetimes[1].strftime('%Y%m%dT%H%M%SZ')}_{collection}_merged.nc4'

Overview of work done

The Harmony service adapter now grabs the URL of the first granule to be concatenated. The stem of this URL is then included in the name of the output file, along with the end time of the last granule. Had to unquote URL % symbols.

Overview of verification done

All tests passed.

Overview of integration done

All tests passed.

PR checklist:

  • Linted
  • [n/a] Updated unit tests
  • Updated changelog
  • Integration testing

See Pull Request Review Checklist for pointers on reviewing this pull request

@danielfromearth danielfromearth linked an issue Jul 5, 2024 that may be closed by this pull request
@danielfromearth danielfromearth marked this pull request as ready for review November 8, 2024 20:02
@danielfromearth
Copy link
Collaborator Author

danielfromearth commented Nov 8, 2024

Originally considered using the .isoformat() method, which results in timestamps like 2024-08-03T00:00:00+00:00. However, looking at (https://en.wikipedia.org/wiki/ISO_8601#Times), it appears that 20240802T000622 is an acceptable ISO format too (called the "basic format" as opposed to the "extended format", which uses colons). This should allow us to avoid doing URL parsing that escapes special characters.

@danielfromearth danielfromearth added the enhancement New feature or request label Nov 12, 2024
@jamesfwood jamesfwood self-requested a review November 13, 2024 18:35
@jamesfwood
Copy link
Collaborator

@danielfromearth Looks good. Thanks! I will merge it now ok?

@danielfromearth
Copy link
Collaborator Author

OK with me!

@jamesfwood jamesfwood merged commit 0c52464 into develop Nov 14, 2024
2 checks passed
@jamesfwood jamesfwood deleted the feature/issue-117-improve-name-of-output-file branch November 14, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve name of output file
2 participants