Repository navigation
Check and fix chararray string dimension names - #10395
Conversation
…d length, issue appropriate warnings
|
This is ready for review. In case of character arrays when encoding the PR aims to:
At this place each variable is handled separately so we do not have the full picture of all needed character array dimensions. Since we now issue warnings and create fitting dimensions names to prevent breakages there are chances we get false positives (eg in the case of several variables with the same size which have all received the same change in size and have |
|
Pydap test failure in all-but-numba CI run might be real. Need to investigate. Update: Fails in other PR, too. Pydap backend errors are most likely related to recent changes in numpy (2.2.6 works, 2.3.0 fails) |
|
Great, works now. I'll mark this as planned form merge and go ahead with this next week. Nevertheless it would be great to have another set of eyes on this one. |
|
This fixes inconsistencies which lead to breakages in the past and warns users about that. Given the additional benefit for users and as it doesn't change functionality of non-breaking code, I'm going to merge now. |
Restore the previous rule that the last number in char_dim_name is the string length, so the clash protection from pydata#10395 keeps working, and keep the characters after that number. A mismatched "n4_chars" now becomes "n3_chars" instead of "n3" (main) or "n4_chars3" (previous commit).
* Keep the full char_dim_name when it contains a non-trailing number validate_char_dim_name matched the last digit run anywhere in the name and rebuilt the name as prefix + strlen, dropping everything after the digits. A char dimension like "n3_chars" was therefore re-encoded as "n3", so a decode/encode roundtrip silently renamed it. Only treat a trailing number as the string length. Co-authored-by: Claude <noreply@anthropic.com> * Add PR number to whats-new entry * Keep the number as the length and preserve the suffix in char_dim_name Restore the previous rule that the last number in char_dim_name is the string length, so the clash protection from #10395 keeps working, and keep the characters after that number. A mismatched "n4_chars" now becomes "n3_chars" instead of "n3" (main) or "n4_chars3" (previous commit). --------- Co-authored-by: Guillaume Marty <condor020@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: root <root@localhost.localdomain>
whats-new.rstapi.rst