Skip to content

fix: raise a clear error when concatenating along a scalar coord#1015

Open
maxrjones wants to merge 2 commits into
zarr-developers:mainfrom
maxrjones:useful-warning
Open

fix: raise a clear error when concatenating along a scalar coord#1015
maxrjones wants to merge 2 commits into
zarr-developers:mainfrom
maxrjones:useful-warning

Conversation

@maxrjones

@maxrjones maxrjones commented Jun 16, 2026

Copy link
Copy Markdown
Member

@hrodmn hit the obscure missing chunk manager error today, this time because xarray tried to load data when generating indexes for concatenating along a dimension that has scalar coordinates. This PR raises a clear error with informative guidance (load the variable).

This is a distinct from existing chunk manager issues so it doesn't close anything, but is related to #114.

Acceptance criteria:

  • Closes #xxxx
  • Tests added
  • Tests passing
  • No test coverage regression
  • Full type hint coverage
  • Changes are documented in docs/releases.md
  • New functions/methods are listed in an appropriate *.md file under docs/api
  • New functionality has documentation

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.16%. Comparing base (b693e0d) to head (f90ef7a).

Files with missing lines Patch % Lines
virtualizarr/xarray.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1015      +/-   ##
==========================================
+ Coverage   89.97%   90.16%   +0.18%     
==========================================
  Files          36       36              
  Lines        2224     2236      +12     
==========================================
+ Hits         2001     2016      +15     
+ Misses        223      220       -3     
Files with missing lines Coverage Δ
virtualizarr/xarray.py 90.00% <91.66%> (+3.55%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TomNicholas TomNicholas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, let's de-claude the tests before merging.

)
xrt.assert_identical(combined_vds, expected_vds)

def test_nested_concat_dim_scalar_virtual_coord_raises(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should delete all the other tests from this PR except the first part of this one. Every other test here either tests a private internal, or tests a behaviour that should already be tested.

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