delete redundant height_0 in variables coordinates attrs#410
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #410 +/- ##
=======================================
+ Coverage 75.1% 75.2% +0.1%
=======================================
Files 28 28
Lines 5281 5282 +1
Branches 973 973
=======================================
+ Hits 3966 3972 +6
+ Misses 1091 1089 -2
+ Partials 224 221 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rbeucher
approved these changes
Jun 2, 2026
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.
Issue to be fixed
The CMORised output for
tas,hurs,huss(Amon) hasbut only
heightis actually written to the file.height_0is a danglingreference, flagged by WCRP compliance-checker:
Fix
Replace the merge with a token-aware, dataset-validated one in
src/access_moppy/base.py:self.ds.variables(kills the danglingheight_0).dict.fromkeys(preserves order).leaving a dangling reference inherited from line 1047's attribute copy.
Scope of the Change
Single block in
src/access_moppy/base.py. Behaviour identical to theprevious code in every scenario where the previous output was already correct;
strictly improves the cases that previously produced dangling or duplicate
tokens. No existing tests assert on the output
coordinatesattribute, so notest changes are required (a regression test is recommended but not blocking).