html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/4102#issuecomment-806037863,https://api.github.com/repos/pydata/xarray/issues/4102,806037863,MDEyOklzc3VlQ29tbWVudDgwNjAzNzg2Mw==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-805312055,https://api.github.com/repos/pydata/xarray/issues/4102,805312055,MDEyOklzc3VlQ29tbWVudDgwNTMxMjA1NQ==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-805297291,https://api.github.com/repos/pydata/xarray/issues/4102,805297291,MDEyOklzc3VlQ29tbWVudDgwNTI5NzI5MQ==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-803443559,https://api.github.com/repos/pydata/xarray/issues/4102,803443559,MDEyOklzc3VlQ29tbWVudDgwMzQ0MzU1OQ==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-803440144,https://api.github.com/repos/pydata/xarray/issues/4102,803440144,MDEyOklzc3VlQ29tbWVudDgwMzQ0MDE0NA==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-803385295,https://api.github.com/repos/pydata/xarray/issues/4102,803385295,MDEyOklzc3VlQ29tbWVudDgwMzM4NTI5NQ==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-761708024,https://api.github.com/repos/pydata/xarray/issues/4102,761708024,MDEyOklzc3VlQ29tbWVudDc2MTcwODAyNA==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-723319721,https://api.github.com/repos/pydata/xarray/issues/4102,723319721,MDEyOklzc3VlQ29tbWVudDcyMzMxOTcyMQ==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-651510424,https://api.github.com/repos/pydata/xarray/issues/4102,651510424,MDEyOklzc3VlQ29tbWVudDY1MTUxMDQyNA==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-651438011,https://api.github.com/repos/pydata/xarray/issues/4102,651438011,MDEyOklzc3VlQ29tbWVudDY1MTQzODAxMQ==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-651224155,https://api.github.com/repos/pydata/xarray/issues/4102,651224155,MDEyOklzc3VlQ29tbWVudDY1MTIyNDE1NQ==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-651217367,https://api.github.com/repos/pydata/xarray/issues/4102,651217367,MDEyOklzc3VlQ29tbWVudDY1MTIxNzM2Nw==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-651212108,https://api.github.com/repos/pydata/xarray/issues/4102,651212108,MDEyOklzc3VlQ29tbWVudDY1MTIxMjEwOA==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-651062460,https://api.github.com/repos/pydata/xarray/issues/4102,651062460,MDEyOklzc3VlQ29tbWVudDY1MTA2MjQ2MA==,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](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFileSystem/Articles/LibraryDirectory.html#//apple_ref/doc/uid/20002282-BAJHCHJI) it can be either `~/Library/Caches` (or `~/Library/Application Support`?) - on unix (following the [freedesktop basedir spec](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html)) 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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-650942527,https://api.github.com/repos/pydata/xarray/issues/4102,650942527,MDEyOklzc3VlQ29tbWVudDY1MDk0MjUyNw==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-636841900,https://api.github.com/repos/pydata/xarray/issues/4102,636841900,MDEyOklzc3VlQ29tbWVudDYzNjg0MTkwMA==,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}",,626083981 https://github.com/pydata/xarray/pull/4102#issuecomment-635000563,https://api.github.com/repos/pydata/xarray/issues/4102,635000563,MDEyOklzc3VlQ29tbWVudDYzNTAwMDU2Mw==,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](https://www.fatiando.org/pooch/latest/) for xarray?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,626083981