home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 620468256 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 3

  • shoyer 2
  • Huite 1
  • stale[bot] 1

author_association 3

  • MEMBER 2
  • CONTRIBUTOR 1
  • NONE 1

issue 1

  • Zarr ZipStore versus DirectoryStore: ZipStore requires .close() · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1112717284 https://github.com/pydata/xarray/issues/4076#issuecomment-1112717284 https://api.github.com/repos/pydata/xarray/issues/4076 IC_kwDOAMm_X85CUrfk stale[bot] 26384082 2022-04-28T22:37:46Z 2022-04-28T22:37:46Z NONE

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Zarr ZipStore versus DirectoryStore: ZipStore requires .close() 620468256
631705261 https://github.com/pydata/xarray/issues/4076#issuecomment-631705261 https://api.github.com/repos/pydata/xarray/issues/4076 MDEyOklzc3VlQ29tbWVudDYzMTcwNTI2MQ== shoyer 1217238 2020-05-20T20:22:33Z 2020-05-20T20:22:33Z MEMBER

open_zarr already automatically accepts path ".zip", so it would be nicely symmetric as well. However, this behavior exists within Zarr, not Xarray.

Yes, this would be nice to copy in xarray. I suspect we could implement this in very similar way to what you suggest here.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Zarr ZipStore versus DirectoryStore: ZipStore requires .close() 620468256
630662285 https://github.com/pydata/xarray/issues/4076#issuecomment-630662285 https://api.github.com/repos/pydata/xarray/issues/4076 MDEyOklzc3VlQ29tbWVudDYzMDY2MjI4NQ== Huite 13662783 2020-05-19T08:15:56Z 2020-05-19T08:15:56Z CONTRIBUTOR

Opening (and closing) a ZipStore when given a path ending in ".zip" would largely solve it I believe -- in fact, I tried just providing a path with ".zip" to to_zarr before, hoping it would work. (And indeed, I did so because the many small files are troublesome.)

open_zarr already automatically accepts path ".zip", so it would be nicely symmetric as well. However, this behavior exists within Zarr, not Xarray.

https://github.com/zarr-developers/zarr-python/blob/473576f3b17ac4a460dfccbcc4860606cd8123ed/zarr/creation.py#L130-142

I'd be happy to have a try at a PR in principle.

Maybe it could be as simple as adding a with? ```python

if isinstance(store, (str, pathlib.Path)): if str(store).endswith('.zip'): with zarr.ZipStore(store) as zstore:

etc

```

In the xarray.backends.api.to_zarr() function.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Zarr ZipStore versus DirectoryStore: ZipStore requires .close() 620468256
630510525 https://github.com/pydata/xarray/issues/4076#issuecomment-630510525 https://api.github.com/repos/pydata/xarray/issues/4076 MDEyOklzc3VlQ29tbWVudDYzMDUxMDUyNQ== shoyer 1217238 2020-05-19T00:50:18Z 2020-05-19T00:50:18Z MEMBER

I think it would be preferable to close the ZipStore in this case. But I might be missing something?

If we make users explicitly open their own Zarr stores, then I think it's best to let them close them, themselves. If we closed them automatically, then they couldn't add their own files into the store outside of xarray.

It would make sense to automatically close stores if they were opened inside to_zarr(), e.g., if we had some logic that automatically opened a zip store when the file path ends in ".zip". This would not be a bad idea (small files are quite wasteful on most filesystems), but is not currently the case, as I understand it.

At the very least, we could add a note to the documentation about this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Zarr ZipStore versus DirectoryStore: ZipStore requires .close() 620468256

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 13.162ms · About: xarray-datasette