home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

11 rows where issue = 270677100 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 3

  • ghost 5
  • shoyer 5
  • max-sixty 1

author_association 2

  • MEMBER 6
  • NONE 5

issue 1

  • Add option “engine” · 11 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
365842057 https://github.com/pydata/xarray/pull/1682#issuecomment-365842057 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM2NTg0MjA1Nw== shoyer 1217238 2018-02-15T07:04:56Z 2018-02-15T07:04:56Z MEMBER

@ajelenak-thg thanks for your patience here. I need to think a little bit harder about what the right API for controlling the default engine is, but this work is definitely appreciated (and will probably make it in for the next release).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100
355678395 https://github.com/pydata/xarray/pull/1682#issuecomment-355678395 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM1NTY3ODM5NQ== ghost 10137 2018-01-05T22:07:03Z 2018-01-05T22:07:03Z NONE

Now that the tests are passing again, is there anything else left to change?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100
351810655 https://github.com/pydata/xarray/pull/1682#issuecomment-351810655 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM1MTgxMDY1NQ== ghost 10137 2017-12-14T19:25:03Z 2017-12-14T19:25:03Z NONE

I've refactored setting the I/O engine option as per our discussion. Hopefully, it captures now all the requested functionality.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100
348155004 https://github.com/pydata/xarray/pull/1682#issuecomment-348155004 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM0ODE1NTAwNA== shoyer 1217238 2017-11-30T10:58:20Z 2017-11-30T10:58:20Z MEMBER

One more minor complexity is that there are two version of netCDF, not all of which are supported by all tools:

  • netcdf4 support netcdf3 and netcdf4
  • scipy only supports netcdf3
  • h5netcdf only supports netcdf4.
  • pynio supports both netcdf3 and netcdf4.

So will need to distinguish between URLs (opendap) and these two types of netCDF files. To do this, we'll need to look at the first few bytes of each file: - netCDF4/HDF5 starts with the 8-byte signature b'\x89HDF\r\n\x1a\n' - netCDF4 starts with b'CDF\x00' or b'CDF\x01'

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100
347917241 https://github.com/pydata/xarray/pull/1682#issuecomment-347917241 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM0NzkxNzI0MQ== ghost 10137 2017-11-29T16:32:56Z 2017-11-29T16:32:56Z NONE

Let's see if we can get this PR over the line... 😄

A list of engines would need some way of declaring their I/O capabilities: only file-based, only HTTP-based, or both. Something like:

```python io_engines = [ {'engine': 'netcdf4', 'capabilities': ['file', 'http']},

{'engine': 'pydap', 
 'capabilities': ['http']},

{'engine': 'scipy', 
 'capabilities': ['file']},

{'engine': 'h5netcdf',
 'capabilities': ['file']},

] ```

On xarray import or any time this option would change, the list of engines would be checked to remove unavailable engines.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100
341795047 https://github.com/pydata/xarray/pull/1682#issuecomment-341795047 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM0MTc5NTA0Nw== shoyer 1217238 2017-11-03T18:51:49Z 2017-11-03T18:51:49Z MEMBER

Maybe it would make more sense to set a list of engines to try in order? e.g., io_engines=['pydap', 'h5netcdf', 'scipy'] could use pydap for web requests, h5netcdf for netCDF4 and scipy for netCDF3. The default would be something like ['netcdf4', 'pydap', 'scipy', 'h5netcdf']

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100
341773389 https://github.com/pydata/xarray/pull/1682#issuecomment-341773389 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM0MTc3MzM4OQ== ghost 10137 2017-11-03T17:30:18Z 2017-11-03T17:30:18Z NONE

Yes, there could be more I/O engine options. How about file_engine and web_engine? Keeping the naming more generic as there may be other file-based formats or data web services in the future.

On the other hand, setting this global option should indicate a willingness to accept the consequences. If automatic selection of the optional I/O engine is preferred, this global option should not be set.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100
341613287 https://github.com/pydata/xarray/pull/1682#issuecomment-341613287 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM0MTYxMzI4Nw== shoyer 1217238 2017-11-03T03:04:17Z 2017-11-03T03:04:17Z MEMBER

We should probably have separate options for opendap/netcdf. It would not be so useful to try to use pydap to read a netcdf file.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100
341610428 https://github.com/pydata/xarray/pull/1682#issuecomment-341610428 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM0MTYxMDQyOA== ghost 10137 2017-11-03T02:35:14Z 2017-11-03T02:35:14Z NONE

How about io_engine for the option's name? The data can come from an OPeNDAP server as well.

I have reverted to the original engine=None in the functions/methods and use python engine = engine or OPTIONS['io_engine'] to assign the correct engine value.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100
341586491 https://github.com/pydata/xarray/pull/1682#issuecomment-341586491 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM0MTU4NjQ5MQ== shoyer 1217238 2017-11-02T23:19:55Z 2017-11-02T23:19:55Z MEMBER

I like the direction this is going in, but as @MaximilianR notes it won't work to set this in default function arguments.

Also, I would probably pick a more descriptive name for the option, e.g., netcdf_engine.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100
341577210 https://github.com/pydata/xarray/pull/1682#issuecomment-341577210 https://api.github.com/repos/pydata/xarray/issues/1682 MDEyOklzc3VlQ29tbWVudDM0MTU3NzIxMA== max-sixty 5635139 2017-11-02T22:29:45Z 2017-11-02T22:29:45Z MEMBER

This looks great so far!

But have you tested this? I have a suspicion that putting OPTIONS['engine'] as a default arg won't work: whenever the relevant function is imported, the default will be set to the value at that time, and won't change if the options dictionary is later modified.

You could have a default arg of None and then look up the option within the function, if my suspicions are right

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option “engine” 270677100

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 6320.976ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows