Add nrefs() method to VirtualiZarrDatasetAccessor#1029
Merged
TomNicholas merged 10 commits intoJun 26, 2026
Merged
Conversation
Add method to count total virtual chunk references in dataset.
Add test for nrefs in open_virtual_dataset with HDFParser.
Added nrefs property to VirtualiZarrDatasetAccessor documentation.
Added a new feature to return the total number of virtual chunk references in the dataset.
for more information, see https://pre-commit.ci
Updated doctest to skip for nrefs property.
TomNicholas
reviewed
Jun 25, 2026
Co-authored-by: Tom Nicholas <tom@earthmover.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1029 +/- ##
==========================================
+ Coverage 90.01% 90.07% +0.05%
==========================================
Files 36 36
Lines 2204 2206 +2
==========================================
+ Hits 1984 1987 +3
+ Misses 220 219 -1
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Adds a
nrefs()method toVirtualiZarrDatasetAccessorthat returns the total number of virtual chunk references in a dataset, ignoring non-virtual (loadable) variables. Useful for knowing how many references you're about to write to Icechunk or Kerchunk before actually doing it.The implementation follows the same pattern as the existing
.nbytesproperty.Acceptance criteria:
.nrefsmethod to accessor that returns number of virtual chunk references #573docs/about/releases.md*.mdfile underdocs/api