Skip to content

Fixes #1551 – DataTree-native I/O for EchoData serialization#1635

Open
beatfactor wants to merge 1 commit into
echostack-org:mainfrom
OceanStreamIO:oceanstream/datatree-migration
Open

Fixes #1551 – DataTree-native I/O for EchoData serialization#1635
beatfactor wants to merge 1 commit into
echostack-org:mainfrom
OceanStreamIO:oceanstream/datatree-migration

Conversation

@beatfactor
Copy link
Copy Markdown
Contributor

Replace the manual per-group save loop in _save_groups_to_file with DataTree.to_netcdf/to_zarr.

Changes:

  • Nested encoding dict keyed by group path (e.g. '/', '/Environment')
  • Object->str dtype sanitization before encoding
  • Dask chunks aligned with encoding chunks for zarr parallel writes
  • write_inherited_coords=True preserves backward compatibility
  • 12 unit tests for roundtrip, dtypes, coord inheritance, dask arrays

)

Replace the manual per-group save loop in _save_groups_to_file with
DataTree.to_netcdf/to_zarr.

Changes:
- Nested encoding dict keyed by group path (e.g. '/', '/Environment')
- Object->str dtype sanitization before encoding
- Dask chunks aligned with encoding chunks for zarr parallel writes
- write_inherited_coords=True preserves backward compatibility
- 12 unit tests for roundtrip, dtypes, coord inheritance, dask arrays
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 94.28571% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.49%. Comparing base (6cf6cee) to head (66dfd48).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
echopype/convert/api.py 94.28% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1635      +/-   ##
==========================================
- Coverage   85.58%   85.49%   -0.09%     
==========================================
  Files          79       79              
  Lines        6998     7018      +20     
==========================================
+ Hits         5989     6000      +11     
- Misses       1009     1018       +9     
Flag Coverage Δ
integration 80.52% <88.57%> (-0.12%) ⬇️
unit 60.64% <91.42%> (+0.22%) ⬆️
unittests 85.39% <94.28%> (-0.09%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.

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