sgkit icon indicating copy to clipboard operation
sgkit copied to clipboard

Unclear how to overwrite a dataset

Open hyanwong opened this issue 1 year ago • 2 comments

I'm using sgkit.save_dataset in a notebook. Often the cell gets run several times, but after the first time, the call fails because it won;t overwrite the existing file. It's unclear from the docs how to set "overwrite=True", which I would imagine is a common requirement. I haven't actually figured out how to do this yet.

hyanwong avatar Jul 26 '24 09:07 hyanwong

Ah, I found it: mode="w". It took me a fair while though.

hyanwong avatar Jul 26 '24 09:07 hyanwong

Overall the write path is very unclear to me also. The documentation needs to be clearer on what's xarray's responsibility, and what is coming from sgkit. However, this would need a major refactoring, and we are focusing efforts elsewhere.

jeromekelleher avatar Jul 26 '24 09:07 jeromekelleher