home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "MEMBER", issue = 371514413 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

  • ENH: Detect the GRIB files by the filename extension and suggest engine. · 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
431868326 https://github.com/pydata/xarray/pull/2492#issuecomment-431868326 https://api.github.com/repos/pydata/xarray/issues/2492 MDEyOklzc3VlQ29tbWVudDQzMTg2ODMyNg== shoyer 1217238 2018-10-22T15:26:24Z 2018-10-22T15:26:24Z MEMBER

thanks @alexamici

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Detect the GRIB files by the filename extension and suggest engine. 371514413
431425504 https://github.com/pydata/xarray/pull/2492#issuecomment-431425504 https://api.github.com/repos/pydata/xarray/issues/2492 MDEyOklzc3VlQ29tbWVudDQzMTQyNTUwNA== shoyer 1217238 2018-10-19T16:44:19Z 2018-10-19T16:44:32Z MEMBER

As someone who hasn't opened up a grib file for several years, I'm not in a good position to choose which backend to use by default. For now, I would be inclined to hold off on making a default choice (unless there is a clear consensus among other xarray devs/users) in favor of requiring users to be explicit. This is somewhat inline with the Zen of Python: "In the face of ambiguity, refuse the temptation to guess."

Probably the best user experience would be to raise an informative error suggesting the use of cfgrib or pynio when opening a grib but no engine is specified, e.g., ```

xarray.open_dataset('data.grib') ValueError: cannot open GRIB files without explicitly setting engine='pynio' or engine='cfgrib' in xarray.open_dataset() ```

{
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Detect the GRIB files by the filename extension and suggest engine. 371514413
431166092 https://github.com/pydata/xarray/pull/2492#issuecomment-431166092 https://api.github.com/repos/pydata/xarray/issues/2492 MDEyOklzc3VlQ29tbWVudDQzMTE2NjA5Mg== shoyer 1217238 2018-10-18T21:15:10Z 2018-10-18T21:15:10Z MEMBER

Actually, thinking about this a little more, I'm not entirely sure it makes sense to fallback from using pynio to cfgrib. The problem is that these libraries may interpret GRIB files differently, e.g., with different variable names. It could make for a poor user experience for open_dataset('mydata.grib') to work differently when different dependencies are installed.

(please let me know if I'm mistaken here!)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Detect the GRIB files by the filename extension and suggest engine. 371514413
431053815 https://github.com/pydata/xarray/pull/2492#issuecomment-431053815 https://api.github.com/repos/pydata/xarray/issues/2492 MDEyOklzc3VlQ29tbWVudDQzMTA1MzgxNQ== shoyer 1217238 2018-10-18T15:28:06Z 2018-10-18T15:28:06Z MEMBER

The whole engine detection strategy looks a bit fragile as the .gz extension is recognised outside of _get_default_engine and the nested ifs and try / except blocks make the code poorly readable. I can add a bit of a refactor in this area if you think it is appropriate.

Agreed! Yes, this would be welcome.

I'm happy with this change, but it would be good to ensure we have test coverage. It looks like we currently don't have any unit tests, but I'm pretty sure the other code is exercised by integration tests. If you're up for adding unit tests for _get_default_engine that would be awesome.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  ENH: Detect the GRIB files by the filename extension and suggest engine. 371514413

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