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-558 - Migrate to earthdata-varinfo==3.0.0. #18

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

owenlittlejohns
Copy link
Member

@owenlittlejohns owenlittlejohns commented Sep 16, 2024

Description

This PR updates the Swath Projector to use earthdata-varinfo==3.0.0. This version of the earthdata-varinfo package includes significant updates to the configuration file schema and some of the publicly accessible methods and attributes on classes contained in the package.

In this service, it looks like that none of the updated class attributes and methods were being called, so the only updates were to the configuration file itself (mainly removing a couple of underscores and renaming CF_Overrides to MetadataOverrides). I've also renamed that configuration file for clarity.

Jira Issue ID

TRT-558.

Local Test Steps

  • Pull this branch.
  • Check the CHANGELOG.md to make sure I got the updated format right.
  • Run the tests: ./bin/buid-image && ./bin/build-test && ./bin/run-test.
  • Check that the new version of the configuration file is compliant with the earthdata-varinfo schema (will require the jsonschema Python package):
import json

from jsonschema import validate

with open('/path/to/swath_projector/earthdata_varinfo_config.json') as file_handler:
    sp_config = json.load(file_handler)

with open('/path/to/earthdata-varinfo/config/1.0.0/earthdata_varinfo_configuration_schema.json') as file_handler:
    ev_schema = json.load(file_handler)

validate(schema=ev_schema, instance=sp_config)

# If the configuration file adheres to the schema, there will be no output in the Python repl.
# If the configuration file does not, then errors will be printed out to the terminal.

PR Acceptance Checklist

  • Jira ticket acceptance criteria met. (Specifically the Swath Projector bit)
  • CHANGELOG.md updated to include high level summary of PR changes.
  • docker/service_version.txt updated if publishing a release.
  • Tests added/updated and passing. (Not updated, just passing)
  • Documentation updated (if needed).

Copy link
Member

@flamingbear flamingbear left a comment

Choose a reason for hiding this comment

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

Two typos to fix. But looks good to me.

CHANGELOG.md Outdated
## [v1.1.1] - 2024-09-16
### Changed

- [[TRT-558]](https://bugs.earthdata.nasa.gov/browse/TRT-558)]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- [[TRT-558]](https://bugs.earthdata.nasa.gov/browse/TRT-558)]
- [[TRT-558](https://bugs.earthdata.nasa.gov/browse/TRT-558)]

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching that: 2cd831.

Comment on lines 23 to 24
"_Description": "VNP10 SnowData variables have incorrect relative paths for coordinates."
}
Copy link
Member

Choose a reason for hiding this comment

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

This got tabbified somehow.

Copy link
Member Author

Choose a reason for hiding this comment

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

Huh - weird. I thought my editor was set up to automatically convert tabs to spaces. Ah well, I updated that here.

Copy link
Member

@flamingbear flamingbear left a comment

Choose a reason for hiding this comment

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

looks good, thanks for the updates

@owenlittlejohns owenlittlejohns merged commit b4b17e7 into main Sep 18, 2024
4 checks passed
@owenlittlejohns owenlittlejohns deleted the TRT-558-earthdata-varinfo-3.0.0 branch September 18, 2024 19:08
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