Skip to content

Fix HDF5 variable attributes displayed as byte reprs - #372

Merged
danielfromearth merged 5 commits into
nasa:developfrom
sylvesterkaczmarek:bugfix/issue-370
Oct 2, 2026
Merged

danielfromearth merged 5 commits into
nasa:developfrom
sylvesterkaczmarek:bugfix/issue-370

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Sep 10, 2026 •

Copy link
Copy Markdown

Fixes #370.

Decode HDF5 scalar attribute bytes through the shared normalizer and decode string arrays before reference handling. Fixed- and variable-length storage now compare as the same text, including multidimensional arrays, while numeric arrays and object-reference resolution retain their existing behavior.

Validation on macOS arm64, Python 3.12.11:

  • Full offline suite: 68 passed, 1 authenticated integration test deselected, including 13 new cases. Ten new cases failed before the fix.
  • Existing NetCDF text/CSV/Excel golden checks passed unchanged.
  • The observed ATL06 fixture total remains 4,978; no expected-count or fixture changes were needed.
  • Ruff, formatting, and git diff --check passed. Changelog updated.

Live Earthdata downloads and Windows/Linux runs were not performed. The separate list-truncation issue #371 is outside this change.


📚 Documentation preview 📚: https://ncompare--372.org.readthedocs.build/en/372/

@codecov

codecov Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.11%. Comparing base (6596ce2) to head (8a7f46c).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #372      +/-   ##
===========================================
+ Coverage    97.08%   97.11%   +0.02%     
===========================================
  Files            9        9              
  Lines          584      589       +5     
===========================================
+ Hits           567      572       +5     
  Misses          17       17              
Flag Coverage Δ
python-3.11 97.11% <100.00%> (+0.02%) ⬆️
python-3.12 97.11% <100.00%> (+0.02%) ⬆️
python-3.13 97.11% <100.00%> (+0.02%) ⬆️
python-3.14 97.08% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

@danielfromearth This HDF5 attribute decoding fix is now refreshed onto current develop, 0 behind, with all Python 3.11-3.14 tests and Codecov checks green and no unresolved review threads. It has been open since September 10 without a review. Could you review the current head when convenient?

@danielfromearth

Copy link
Copy Markdown
Collaborator

Thanks for another useful contribution, @sylvesterkaczmarek! This fixes the b'NASA' problem nicely. Good edge-case coverage too with non-ASCII, empty strings, the literal b'NASA', and the empty array.

One small thing: _value_to_comparable_str is private but now imported into Comparison.py, so could you drop the underscore?

@danielfromearth danielfromearth added the bug Something isn't working label Oct 2, 2026
@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Done in 6bf2c9f. I renamed the helper to value_to_comparable_str and updated the imports, internal calls, and test docstring so its cross-module use is explicit. git diff --check and Python compilation are clean; fresh hosted checks can validate the branch.

@danielfromearth
danielfromearth merged commit 5931766 into nasa:develop Oct 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants