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

TRT-571 - Update net2cog to process multiple variables. #38

Merged
merged 6 commits into from
Mar 4, 2025

Conversation

owenlittlejohns
Copy link
Collaborator

@owenlittlejohns owenlittlejohns commented Feb 3, 2025

Github Issue: #32 (also one of the items mentioned in #35).

Description

This PR adds support for requests asking for multiple variables, either explicitly, or when a Harmony request specifies "all".

Overview of work done

There's a fair bit of shuffling around, but essentially the code changes are:

  • If there is an empty list specified for variables, this is an "all" request, and so do all data variables.
  • The _write_cogtiff function has been rescoped to just write a single COG. The iteration now takes place in netcdf_converter.
  • I implemented the generate_output_filename from the harmony-service-lib-py module, which now has a reformatted suffix (note, this is a minor difference from converted). I removed a bunch of custom code that was geared around generating the output filename, as that is no longer needed.
  • I consolidated test fixtures into a conftest.py.

Overview of verification done

  • Updated unit tests (including consolidating test fixtures into tests/conftest.py). There are now tests that run to confirm multiple variables can be processed, either via explicitly requesting them or by using "all" in a Harmony request. These tests exist at the overall service level, and the netcdf_converter function level.
  • I also have updated the net2cog regression tests (see: TRT-571 - Update regression tests for net2cog. nasa/harmony-regression-tests#131)

Overview of integration done

PR checklist:

  • Linted
  • Updated unit tests
  • Updated changelog
  • Integration testing

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

Copy link
Member

@frankinspace frankinspace left a comment

Choose a reason for hiding this comment

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

Nice work, thank you for the contribution! Just a few comments to consider

@frankinspace frankinspace merged commit 9f371ee into develop Mar 4, 2025
@frankinspace frankinspace deleted the TRT-571-multiple-variables branch March 4, 2025 18:10
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.

2 participants