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

Vendor kerchunk netCDF3 reader #397

Merged
merged 9 commits into from
Jan 29, 2025
Merged

Conversation

TomNicholas
Copy link
Member

@TomNicholas TomNicholas commented Jan 29, 2025

Passes locally with zarr v2. But I think this will break for an env with zarr v3 in it.

  • Closes part of Vendor kerchunk readers? #377
  • Tests added
  • Tests passing
  • Full type hint coverage
  • Changes are documented in docs/releases.rst
  • New functions/methods are listed in api.rst
  • New functionality has documentation

@TomNicholas TomNicholas added Kerchunk Relating to the kerchunk library / specification itself dependencies Updates a dependency internals readers labels Jan 29, 2025
arr.attrs.update(original_attrs)


def inline_array(store, threshold=1000, names=None, remote_options=None):
Copy link
Member Author

Choose a reason for hiding this comment

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

We probably don't need this at all, because we never use kerchunk's inlining (we use loadable_variables instead).

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 52.87356% with 82 lines in your changes missing coverage. Please review.

Project coverage is 75.62%. Comparing base (fa3aeea) to head (08e2eb8).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
virtualizarr/vendor/kerchunk/netCDF3.py 55.14% 61 Missing ⚠️
virtualizarr/vendor/kerchunk/utils.py 42.85% 20 Missing ⚠️
virtualizarr/readers/netcdf3.py 66.66% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (52.87%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #397      +/-   ##
==========================================
- Coverage   77.81%   75.62%   -2.19%     
==========================================
  Files          31       33       +2     
  Lines        1821     1994     +173     
==========================================
+ Hits         1417     1508      +91     
- Misses        404      486      +82     
Files with missing lines Coverage Δ
virtualizarr/readers/netcdf3.py 85.71% <66.66%> (-3.76%) ⬇️
virtualizarr/vendor/kerchunk/utils.py 42.85% <42.85%> (ø)
virtualizarr/vendor/kerchunk/netCDF3.py 55.14% <55.14%> (ø)

@maxrjones maxrjones added the v3-migration Required for migration to Zarr-Python 3.0 label Jan 29, 2025
@TomNicholas
Copy link
Member Author

Note that in the kerchunk compatibility PR the netCDF3 reader has now been updated to work with zarr-python v3. So we could just copy those changes here temporarily.

@maxrjones
Copy link
Member

Note that in the kerchunk compatibility PR the netCDF3 reader has now been updated to work with zarr-python v3. So we could just copy those changes here temporarily.

I think you already suggested this elsewhere, but let's handle these updates in a separate PR

Copy link
Member

@maxrjones maxrjones 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, I think we can ignore the code coverage gaps on the vendored readers for now

@maxrjones maxrjones merged commit 95fce11 into main Jan 29, 2025
12 of 13 checks passed
@maxrjones maxrjones deleted the vendor_kerchunk_netCDF3_reader branch January 29, 2025 19:51
maxrjones added a commit that referenced this pull request Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Updates a dependency internals Kerchunk Relating to the kerchunk library / specification itself readers v3-migration Required for migration to Zarr-Python 3.0
Projects
Development

Successfully merging this pull request may close these issues.

2 participants