home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

17 rows where issue = 626083981 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 5

  • keewis 7
  • shoyer 5
  • dcherian 2
  • andersy005 2
  • jthielen 1

author_association 2

  • MEMBER 16
  • CONTRIBUTOR 1

issue 1

  • cache rasterio example files · 17 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
806037863 https://github.com/pydata/xarray/pull/4102#issuecomment-806037863 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDgwNjAzNzg2Mw== andersy005 13301940 2021-03-24T17:56:44Z 2021-03-24T17:56:44Z MEMBER

Thank you for this refactor, @keewis!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
805312055 https://github.com/pydata/xarray/pull/4102#issuecomment-805312055 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDgwNTMxMjA1NQ== andersy005 13301940 2021-03-23T22:34:15Z 2021-03-23T22:34:15Z MEMBER

pooch writes to a temp file and then moves it into place, which is probably a sufficiently robust solution for that.

I concur. 👍🏽

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
805297291 https://github.com/pydata/xarray/pull/4102#issuecomment-805297291 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDgwNTI5NzI5MQ== keewis 14808389 2021-03-23T22:04:56Z 2021-03-23T22:04:56Z MEMBER

data versioning might be useful if we ever decide to change datasets: once we do, the examples would change as well, so people might not be able to exactly reproduce them. Not sure how much of an issue that is, though.

I fixed the failing tests, but the trick I used (point $XDG_CACHE_DIR to a temporary directory) only works on linux.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
803443559 https://github.com/pydata/xarray/pull/4102#issuecomment-803443559 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDgwMzQ0MzU1OQ== shoyer 1217238 2021-03-20T18:45:59Z 2021-03-20T18:45:59Z MEMBER

I suspect we could make Pooch work OK by tagging releases in the xarray-data repository. Then we can manually update the version number inside xarray whenever we add or update a dataset.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
803440144 https://github.com/pydata/xarray/pull/4102#issuecomment-803440144 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDgwMzQ0MDE0NA== shoyer 1217238 2021-03-20T18:29:55Z 2021-03-20T18:29:55Z MEMBER

I don't think it's important to preserve the GitHub URL and branch options. I suspect those options exist strictly for testing new datasets.

I'm surprised that Pooch seems to be focused on data that is bundled in code repositories. It seems like that could easily lead to bloated repositories (though I guess xarray data is bigger than image data, for example).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
803385295 https://github.com/pydata/xarray/pull/4102#issuecomment-803385295 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDgwMzM4NTI5NQ== dcherian 2448579 2021-03-20T15:51:26Z 2021-03-20T15:51:26Z MEMBER

Ping @andersy005 who has experience with pooch

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
761708024 https://github.com/pydata/xarray/pull/4102#issuecomment-761708024 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDc2MTcwODAyNA== keewis 14808389 2021-01-17T00:58:49Z 2021-01-17T00:58:49Z MEMBER

I switched the tutorial code to use pooch (the tests still need to be updated), which means that we get the appdirs, download, and caching for free. It is a optional dependency for now, thus requiring pooch to be able to use xr.tutorial.open_*.

However, pooch seems to be mainly written for repositories that contain both the data and the code (like scikit-image's data module). If I understand it correctly, this means that we can't take full advantage of the features pooch has (such as the file registry, or the version mechanism). Some of the options we have (github_url and branch) make this even more difficult. I wonder if we should deprecate / remove them?

So for now, instead of using pooch.create(base_url=url, registry=registry).fetch(name) we use pooch.retrieve(url, hash=None, ...). Not sure if there's a better way, though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
723319721 https://github.com/pydata/xarray/pull/4102#issuecomment-723319721 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDcyMzMxOTcyMQ== keewis 14808389 2020-11-06T22:02:02Z 2020-11-06T22:02:02Z MEMBER

what should we do with this? Maybe it's easier to decide if we split this PR into one that introduces the caching and a new one that tries to find the correct "appdirs" path (which I think is nice to have but not really important)?

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
651510424 https://github.com/pydata/xarray/pull/4102#issuecomment-651510424 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDY1MTUxMDQyNA== shoyer 1217238 2020-06-30T03:43:47Z 2020-06-30T03:43:47Z MEMBER

I vendored appdirs.user_cache_dir, but I need help with mypy: the windows code uses ctypes.windll which is only available on windows

Let's skip this module for mypy. You can add it to the list in setup.cfg.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
651438011 https://github.com/pydata/xarray/pull/4102#issuecomment-651438011 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDY1MTQzODAxMQ== keewis 14808389 2020-06-30T00:19:46Z 2020-06-30T00:19:46Z MEMBER

I vendored appdirs.user_cache_dir, but I need help with mypy: the windows code uses ctypes.windll which is only available on windows

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
651224155 https://github.com/pydata/xarray/pull/4102#issuecomment-651224155 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDY1MTIyNDE1NQ== shoyer 1217238 2020-06-29T16:21:29Z 2020-06-29T16:21:29Z MEMBER

Edit: appdirs solves that (but: it's a new dependency)

See #2815 :)

As mentioned in that issue, we could definitely vendor a copy of appdirs if desired. Or we could pick some simple heuristic. In practice I think ~/.cache is fine. It's only standard on Linux, but I have a handful of directories there on my Mac laptop already.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
651217367 https://github.com/pydata/xarray/pull/4102#issuecomment-651217367 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDY1MTIxNzM2Nw== keewis 14808389 2020-06-29T16:09:25Z 2020-06-29T16:09:25Z MEMBER

thanks for pointing me to that issue, @dcherian

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
651212108 https://github.com/pydata/xarray/pull/4102#issuecomment-651212108 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDY1MTIxMjEwOA== dcherian 2448579 2020-06-29T16:00:15Z 2020-06-29T16:00:15Z MEMBER

Edit: appdirs solves that (but: it's a new dependency)

See #2815 :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
651062460 https://github.com/pydata/xarray/pull/4102#issuecomment-651062460 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDY1MTA2MjQ2MA== keewis 14808389 2020-06-29T11:45:39Z 2020-06-29T13:23:24Z MEMBER

I would suggest just creating the full directory tree, e.g., with os.makedirs(path, exist_ok=True). I don't think we want to let this be inconsistent.

When writing this I wanted to make sure we didn't force a ~/.cache folder on everyone, regardless of the platform.

After looking into this a bit more, it seems we would probably need to have different cache folders for different platforms: - on windows, the path is given by APPDATA (or LOCALAPPDATA, not sure) (I can't find a official resource for this) - on macos it can be either ~/Library/Caches (or ~/Library/Application Support?) - on unix (following the freedesktop basedir spec) it is indicated by XDG_CACHE_HOME with a default of ~/.cache.

So a currently released version of xarray will always put it into ~/.xarray_tutorial_data, and my changes will partially align with the freedesktop spec.

How closely should we follow those specifications?

Edit: appdirs solves that (but: it's a new dependency)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
650942527 https://github.com/pydata/xarray/pull/4102#issuecomment-650942527 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDY1MDk0MjUyNw== shoyer 1217238 2020-06-29T06:11:18Z 2020-06-29T06:11:18Z MEMBER

Edit: I also changed the default cache directory to ~/.cache/xarray_tutorial_data with a fallback to the old default if ~/.cache does not exist

I would suggest just creating the full directory tree, e.g., with os.makedirs(path, exist_ok=True). I don't think we want to let this be inconsistent.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
636841900 https://github.com/pydata/xarray/pull/4102#issuecomment-636841900 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDYzNjg0MTkwMA== keewis 14808389 2020-06-01T12:48:13Z 2020-06-01T14:01:55Z MEMBER

using a existing library for that instead of writing our own caching / downloading functions does seem useful (the code there seems to be much more sophisticated than anything in the tutorial module), but we'd be introducing a new dependency: not sure how much of an issue that would be.

We could also make it a optional dependency, but that would mean that the tutorial module is not always available.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981
635000563 https://github.com/pydata/xarray/pull/4102#issuecomment-635000563 https://api.github.com/repos/pydata/xarray/issues/4102 MDEyOklzc3VlQ29tbWVudDYzNTAwMDU2Mw== jthielen 3460034 2020-05-27T23:39:36Z 2020-05-27T23:39:55Z CONTRIBUTOR

For these kind of cached files, would it be worth using something like Pooch for xarray?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  cache rasterio example files 626083981

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