Skip to content

bugfix for zarr attribute reading#1453

Merged
lesserwhirls merged 4 commits into
Unidata:maint-5.xfrom
Yaqiang:develop
Jun 20, 2025
Merged

bugfix for zarr attribute reading#1453
lesserwhirls merged 4 commits into
Unidata:maint-5.xfrom
Yaqiang:develop

Conversation

@Yaqiang

@Yaqiang Yaqiang commented May 27, 2025

Copy link
Copy Markdown
Contributor

bugfix for zarr attribute reading. If the attribute value is Boolean type, it can not be converted to String with 'String(val)'.

Description of Changes

Using 'String.valueOf(val)' to avoid the type conversion problem of 'String(val)'

Example data file

z0_atm.zip

PR Checklist

  • Link to any issues that the PR addresses
  • Add labels
  • Open as a draft PR
    until ready for review
  • Make sure GitHub tests pass
  • Mark PR as "Ready for Review"

…an type, it can not be converted to String with 'String(val)'. String.valueOf(val) will solve it.
@Yaqiang
Yaqiang requested a review from lesserwhirls as a code owner May 27, 2025 04:51
@lesserwhirls

Copy link
Copy Markdown
Member

Greetings @Yaqiang! Thank you for your contribution, and sorry for the delay - we've been on furlough for the past several weeks, but have now returned. The example file you've attached is fairly small. If you have the time, would you mind adding that to cdm/zarr/src/test/data/ and adding a simple test to cdm/zarr/src/test/java/ucar/nc2/iosp/zarr/TestZarrIosp.java?

@Yaqiang

Yaqiang commented Jun 20, 2025

Copy link
Copy Markdown
Contributor Author

Greetings @Yaqiang! Thank you for your contribution, and sorry for the delay - we've been on furlough for the past several weeks, but have now returned. The example file you've attached is fairly small. If you have the time, would you mind adding that to cdm/zarr/src/test/data/ and adding a simple test to cdm/zarr/src/test/java/ucar/nc2/iosp/zarr/TestZarrIosp.java?

I am quite busy these days and just add the test zarr file and test function following your comment.

@lesserwhirls

Copy link
Copy Markdown
Member

Thank you so much for your efforts @Yaqiang!

@lesserwhirls
lesserwhirls merged commit 4bc9c9c into Unidata:maint-5.x Jun 20, 2025
16 checks passed
@lesserwhirls lesserwhirls added this to the 5.8.1 milestone Jul 2, 2025
@lesserwhirls lesserwhirls added the iosp: zarr zarr format label Jul 2, 2025
@lesserwhirls lesserwhirls modified the milestones: 5.8.1, v5.9 Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

iosp: zarr zarr format

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants