Skip to content

Conversation

@owenlittlejohns
Copy link
Member

Description

This PR adds a new function matches_reference_hash_file that can be used for both netCDF-4/HDF-5 files and GeoTIFFs. It will identify the correct underlying comparison function based on the extension of the supplied binary file.

Jira Issue ID

DAS-2397 - Tangential (I think the relation is having regression test notebooks that this would simplify)

Local Test Steps

  • Pull this branch.
  • Run the unit tests: pytest tests they should all pass.
  • Execute the first HGA and HOSS regression tests against UAT to get a local copy of the binary files.
  • Use the new comparison function locally to compare the binary files you just created against their analogous reference hash files. The comparison should work.
  • Bonus: repeat the same calls, but include expected kwargs to match_reference_hash_file to ensure they are respected.
  • Also run through the updated Jupyter notebook documentation:
    • Note - you'll need to install the local version of the package with pip install -e ., rather than installing using docs/requirements.txt.
    • Some cells in the notebook do fail - the prose before those cells says so.
    • The new cell using the matches_reference_hash_file examples should succeed.

PR Acceptance Checklist

  • Acceptance criteria met
  • Tests added/updated (if needed) and passing
  • Documentation updated (if needed)
  • CHANGELOG updated with the changes for this PR
  • Package's __about__.py file changed if a new version should be published.

@@ -1,4 +1,4 @@
# These packages are required to run the documentation Jupyter notebook.
earthdata-hashdiff ~= 1.1.0
earthdata-hashdiff ~= 1.2.0
Copy link
Member Author

Choose a reason for hiding this comment

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

This is in anticipation of the release from this PR merging.

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.

This is great. Tests are comprehensive. I verified the Doc notebook. I also installed this locally to the HGA and HOSS regression tests updating the comparsions with matches_reference_hash_file and verified they all work as expected. 🎉

@owenlittlejohns owenlittlejohns merged commit 6d2ebe9 into main Oct 17, 2025
5 checks passed
@owenlittlejohns owenlittlejohns deleted the DAS-2397-ish branch October 17, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants