Repository navigation
Reject ambiguous MultiIndex names in CF compression - #680
nawaaaaaAaar wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Closing in favor of the earlier #676, which appeared while this implementation was being prepared. Keeping one compression-name validation PR for maintainers to review. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #680 +/- ##
==========================================
+ Coverage 85.78% 87.10% +1.31%
==========================================
Files 13 16 +3
Lines 2364 3357 +993
Branches 183 313 +130
==========================================
+ Hits 2028 2924 +896
- Misses 303 387 +84
- Partials 33 46 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Fixes #570. Follow-up to my merged #674 and #675.
Reject MultiIndex level names that cannot be represented by CF's whitespace-delimited
compressattribute, before resetting indexes or constructing an invalid encoded dataset.For example, names
("lat name", "lon")currently producecompress="lat name lon"; decoding then raisesKeyError: 'lat'. Renaming silently would change the user's coordinate names, so this uses an actionableValueErrorinstead.The guard rejects empty/non-string names and any whitespace, not only literal spaces. The docstring documents the error.
Validation
git diff --check: clean.AI-assisted contribution: reproduction, implementation, review and checks were performed by the assistant. No personal account-owner review is asserted.