home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 634869703 and user = 1217238 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • shoyer · 4 ✖

issue 1

  • Why am I able to load data from a closed dataset? · 4 ✖

author_association 1

  • MEMBER 4
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
649976034 https://github.com/pydata/xarray/issues/4131#issuecomment-649976034 https://api.github.com/repos/pydata/xarray/issues/4131 MDEyOklzc3VlQ29tbWVudDY0OTk3NjAzNA== shoyer 1217238 2020-06-26T05:24:50Z 2020-06-26T05:24:50Z MEMBER

A user might expect that they can write something like: python with nc.Dataset("tmp_example.nc") as ncfile: dstore = xr.backends.NetCDF4DataStore(ncfile) with xr.open_dataset(dstore) as data: ...

Currently this raises an error when the outer context manager exits.

So maybe this is a case for not closing files that were not opened by xarray.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Why am I able to load data from a closed dataset? 634869703
649973124 https://github.com/pydata/xarray/issues/4131#issuecomment-649973124 https://api.github.com/repos/pydata/xarray/issues/4131 MDEyOklzc3VlQ29tbWVudDY0OTk3MzEyNA== shoyer 1217238 2020-06-26T05:16:38Z 2020-06-26T05:16:38Z MEMBER

Given the ambiguity, I think it would be reasonable to raise an error when trying to close a file not opened by xarray.

This would be a breaking change, so we if we change this we would need to start by issuing a warning.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Why am I able to load data from a closed dataset? 634869703
649971441 https://github.com/pydata/xarray/issues/4131#issuecomment-649971441 https://api.github.com/repos/pydata/xarray/issues/4131 MDEyOklzc3VlQ29tbWVudDY0OTk3MTQ0MQ== shoyer 1217238 2020-06-26T05:12:03Z 2020-06-26T05:12:03Z MEMBER

Nevertheless it seems unusual, that opening a file outside xarray will be closed inside xarray. At least I would not expect it, to be closed.

It isn't obvious to me what the right behavior is here. I can see a case for either closing the file (the user did request it to be closed, after all) or leaving it open.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Why am I able to load data from a closed dataset? 634869703
641602748 https://github.com/pydata/xarray/issues/4131#issuecomment-641602748 https://api.github.com/repos/pydata/xarray/issues/4131 MDEyOklzc3VlQ29tbWVudDY0MTYwMjc0OA== shoyer 1217238 2020-06-09T21:55:36Z 2020-06-09T21:55:36Z MEMBER

Does querying a closed dataset automatically reopen it?

That's exactly right.

We could conceivably raise an error instead in these situations, since this is probably a case of user error.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Why am I able to load data from a closed dataset? 634869703

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 743.8ms · About: xarray-datasette