JuliaDataCubes / YAXArrays.jl

Yet Another XArray-like Julia package
https://juliadatacubes.github.io/YAXArrays.jl/
Other
100 stars 17 forks source link

FileIO integration #131

Open gdkrmr opened 2 years ago

gdkrmr commented 2 years ago

Does it make sense to integrate this package with FileIO?

This way you can do

save("mycube.zarr", mycube)
meggart commented 2 years ago

I agree it would be great to do this. I once looked into this and it looks like this is difficult for directories since you can not read magic bytes from a directory.

Regarding the loadorgenerate macro, I would be happy to remove it from YAXArrays, because the functionality is in no way specific to YAXArrays. I would be happy if this became a small package as you suggested in the FileIO issue, so we don't have to maintain it here.

gdkrmr commented 2 years ago

magic can be a function that returns a Bool [1] so I guess this should be fine. Not sure if FileIO can work on directories.

Does the magic function have to check for anything else?

Question:

[1] https://juliaio.github.io/FileIO.jl/stable/registering/