home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 146079798 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)

These facets timed out: author_association

user 1

  • shoyer · 5 ✖

issue 1

  • modified: xarray/backends/api.py · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
388967090 https://github.com/pydata/xarray/pull/817#issuecomment-388967090 https://api.github.com/repos/pydata/xarray/issues/817 MDEyOklzc3VlQ29tbWVudDM4ODk2NzA5MA== shoyer 1217238 2018-05-14T21:21:45Z 2018-05-14T21:21:45Z MEMBER

The only way we could make reading a gzipped netCDF4 file is to load the entire file into memory. That's why we didn't support this before. It's also less relevant for netCDF4, because netCDF4 supports in-file compression directly.

With netCDF3, we can use scipy's netcdf reader, which supports Python file objects. But netCDF4-Python does not support Python file objects.

This issue is concerned about supporting paths ending with .gz in remote URLs, which are not local files but rather files exposed via the OpenDAP protocol over a network. If the DAP server can server a file with a .gz extension then xarray should be OK with it, too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  modified: xarray/backends/api.py 146079798
206465453 https://github.com/pydata/xarray/pull/817#issuecomment-206465453 https://api.github.com/repos/pydata/xarray/issues/817 MDEyOklzc3VlQ29tbWVudDIwNjQ2NTQ1Mw== shoyer 1217238 2016-04-06T17:01:45Z 2017-07-13T18:55:12Z MEMBER

Currently the way we handle this is that the only test that accessing remote resources is the pydap test, which only runs in one build (not required to pass).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  modified: xarray/backends/api.py 146079798
218362023 https://github.com/pydata/xarray/pull/817#issuecomment-218362023 https://api.github.com/repos/pydata/xarray/issues/817 MDEyOklzc3VlQ29tbWVudDIxODM2MjAyMw== shoyer 1217238 2016-05-11T04:59:16Z 2016-05-11T04:59:16Z MEMBER

I am reluctant to merge this without having any way to test the logic. Without automated tests this issue is likely to recur.

That said, I suppose we could leave the refactoring for a TODO. Let's add a note on that and also one minimal test to verify that we raise an error if you try to use engine='netcdf4' with a path to local gzipped file.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  modified: xarray/backends/api.py 146079798
206463565 https://github.com/pydata/xarray/pull/817#issuecomment-206463565 https://api.github.com/repos/pydata/xarray/issues/817 MDEyOklzc3VlQ29tbWVudDIwNjQ2MzU2NQ== shoyer 1217238 2016-04-06T16:56:45Z 2016-04-06T16:56:45Z MEMBER

We do have existing tests for backends: https://github.com/pydata/xarray/blob/master/xarray/test/test_backends.py

This includes a test accessing an OpenDAP dataset from the OpenDAP test server (via pydap, at the end). But in my experience, there servers are somewhat unreliable (maybe available 90%), so we don't require that test to pass for the build to pass. Also, even in the best case scenario network access is slow. So it would be nice to modularize this enough that our logic is testable without actually using opendap.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  modified: xarray/backends/api.py 146079798
206159316 https://github.com/pydata/xarray/pull/817#issuecomment-206159316 https://api.github.com/repos/pydata/xarray/issues/817 MDEyOklzc3VlQ29tbWVudDIwNjE1OTMxNg== shoyer 1217238 2016-04-06T06:57:40Z 2016-04-06T06:57:40Z MEMBER

I think this is probably correct, but the heuristics here are starting to get convoluted enough that I worry about test coverage. Is there any way we can test this? Maybe try to pull the gzip logic into a helper function (an extended variant of _get_default_engine) that we could test?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  modified: xarray/backends/api.py 146079798

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