Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add indents for JSON files for readbility #167

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

calvinchai
Copy link

@calvinchai calvinchai commented Sep 30, 2024

The library writes json files minimized which is difficult to read.
e.g.

{"dtype":"<u1","filters":null,"shape":[348],"order":"C","zarr_format":2,"chunks":[348],"fill_value":null,"compressor":null}

Added indents for readability.

{
    "dtype": "<u1",
    "filters": null,
    "shape": [
        348
    ],
    "order": "C",
    "zarr_format": 2,
    "chunks": [
        348
    ],
    "fill_value": null,
    "compressor": null
}

@asinghvi17
Copy link
Member

Should this be a choice / keyword argument instead? Maybe it could propagate down from write or zcreate.

@nhz2
Copy link
Member

nhz2 commented Oct 9, 2024

Yes, minimizing the JSON files saves disk space so adding indents should be optional.

@calvinchai
Copy link
Author

Agree. I just revised it and made it a keyword arguments

src/Storage/Storage.jl Outdated Show resolved Hide resolved
src/Storage/Storage.jl Outdated Show resolved Hide resolved
src/ZArray.jl Outdated Show resolved Hide resolved
src/ZGroup.jl Outdated Show resolved Hide resolved
calvinchai and others added 5 commits October 10, 2024 11:21
Co-authored-by: Anshul Singhvi <[email protected]>
Co-authored-by: Anshul Singhvi <[email protected]>
Co-authored-by: Anshul Singhvi <[email protected]>
Co-authored-by: Anshul Singhvi <[email protected]>
Copy link
Member

@asinghvi17 asinghvi17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks for the PR! @meggart should probably review as well.

Test failures are from the pangeo AWS bucket that went down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants