Repository navigation
Conversation
Fails three TestStaticPlanes tests: the composite writer in 0.4 refuses a file that an earlier member would read back, and the write-only planes share one pattern across three layouts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xarray-binfile 0.4's composite writer refuses a file that an earlier member would read back. The planes share one pattern but are written, never opened, so try each plane layout on its own and keep the first that accepts the array. Cover the case where none does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch has not been deployed
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.
Draft: this tests xarray-binfile
0.4.0rc0downstream. Before merging, change the pin to>=0.4.0,<0.5.0oncev0.4.0is out.Why
On
mainwith xarray-binfile 0.4.0rc0, threeTestStaticPlanestests fail; on 0.3.2 they all pass:0.4 makes
PatternConventions.writerrefuse a file that an earlier member would read onopen()(xarray-binfile #85/#97, listed under Breaking changes in the rc notes). The inflow planes are threeStaticFiles, one per dropped dimension, all sharing the{name}.binpattern. They were wrapped in aPatternConventions, so the (y, z) plane claimed every name and the (x, z) planebyphi1was refused.The planes are written, never opened, so read-back order doesn't apply to them.
Change
pyproject.toml:xarray-binfile>=0.4.0rc0,<0.5.0.Xcompact3dConvention.writer: the planes fallback tries each plane layout on its own and keeps the first that accepts the array. Their dims differ, so at most one does. If none accepts, the original field error is raised, as before.LayoutMismatchError, and writes nothing. This covers the "no plane accepts" path.Commits
bb212f9: the pin. The three tests fail.8bf46d4: the fix and the new test.Verification
hatch run qa: 400 passed. Inbinfile.pythe changed lines are covered; the two lines still uncovered (92, 447) are not touched here.🤖 Generated with Claude Code