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/1514#issuecomment-326611618,https://api.github.com/repos/pydata/xarray/issues/1514,326611618,MDEyOklzc3VlQ29tbWVudDMyNjYxMTYxOA==,1217238,2017-09-01T15:31:59Z,2017-09-01T15:31:59Z,MEMBER,"CI failures are all the issue with dask distributed (https://github.com/pydata/xarray/issues/1540), so I'm going ahead and merging. Thanks @willirath !","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-326548654,https://api.github.com/repos/pydata/xarray/issues/1514,326548654,MDEyOklzc3VlQ29tbWVudDMyNjU0ODY1NA==,5700886,2017-09-01T10:35:41Z,2017-09-01T10:35:41Z,CONTRIBUTOR,"Thanks @shoyer! I like the shorter example. It shows the essence of why pathlib is such a nice thing. Is there anything more to do in this PR? Am 31. August 2017 17:48:24 schrieb Stephan Hoyer : > shoyer approved this pull request. > > > >> @@ -21,9 +21,38 @@ v0.9.7 (unreleased) > Enhancements > ~~~~~~~~~~~~ > > +- Support for `pathlib.Path` objects added to > > I just pushed a commit to add this > >> + .. ipython:: > + :verbatim: > + In [1]: import xarray as xr > + > + In [2]: from pathlib import Path # In Python 2, use pathlib2! > + > + In [3]: data_dir = Path(""data/"") > + > + In [4]: one_file = data_dir / ""dta_for_month_01.nc"" > + > + In [5]: print(xr.open_dataset(one_file)) > + Out[5]: > + > + [...] > + > + In [6]: all_files = data_dir.glob(""dta_for_month_*.nc"") > > I removed this example from What's New for two reason: > 1. The section was getting a little longer than essential > 2. It's actually a bit of an anti-pattern, since the order of paths matters > to xarray but is arbtirary from glob. The right way to write this is > `sorted(data_dir.glob(...))`. > > -- > You are receiving this because you were mentioned. > Reply to this email directly or view it on GitHub: > https://github.com/pydata/xarray/pull/1514#pullrequestreview-59903100 ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-325187598,https://api.github.com/repos/pydata/xarray/issues/1514,325187598,MDEyOklzc3VlQ29tbWVudDMyNTE4NzU5OA==,5700886,2017-08-27T09:35:40Z,2017-08-27T09:35:40Z,CONTRIBUTOR,AppVeyor test failed with HTTP time-outs when trying to get `repodata.json`. Can somebody trigger the build again?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-325158074,https://api.github.com/repos/pydata/xarray/issues/1514,325158074,MDEyOklzc3VlQ29tbWVudDMyNTE1ODA3NA==,5700886,2017-08-26T19:47:40Z,2017-08-26T19:47:40Z,CONTRIBUTOR,`flake8` now fails because of the unused `pathlib` in `xarray/tests/__init__.py`.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-324971323,https://api.github.com/repos/pydata/xarray/issues/1514,324971323,MDEyOklzc3VlQ29tbWVudDMyNDk3MTMyMw==,1217238,2017-08-25T16:31:20Z,2017-08-25T16:31:20Z,MEMBER,"> And then I remove the pathlib2 dependency I've introduced in setup.py again? Yes, `pathlib2` should not be a required dependency.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-324970564,https://api.github.com/repos/pydata/xarray/issues/1514,324970564,MDEyOklzc3VlQ29tbWVudDMyNDk3MDU2NA==,5700886,2017-08-25T16:28:16Z,2017-08-25T16:28:16Z,CONTRIBUTOR,"> take a look at what we do for handling the optional dask dependency Ah, that's nice! And then I remove the `pathlib2` dependency I've introduced in [setup.py](https://github.com/willirath/xarray/blob/799-add-pathlib-support-2/setup.py#L40) again? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-324969407,https://api.github.com/repos/pydata/xarray/issues/1514,324969407,MDEyOklzc3VlQ29tbWVudDMyNDk2OTQwNw==,1217238,2017-08-25T16:23:28Z,2017-08-25T16:23:28Z,MEMBER,"@willirath take a look at what we do for handling the optional dask dependency: https://github.com/pydata/xarray/blob/bcd608101133c0cb84c74d341d22edef71ef4818/xarray/core/pycompat.py#L55-L60","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-324966586,https://api.github.com/repos/pydata/xarray/issues/1514,324966586,MDEyOklzc3VlQ29tbWVudDMyNDk2NjU4Ng==,5700886,2017-08-25T16:12:23Z,2017-08-25T16:12:23Z,CONTRIBUTOR,"One more thing: > Can we add pathlib2 as an optional dependency and handle the case where it's not installed? Currently, I've set `pathlib2` as a mandatory requirement for Python 2. How'd we achieve `pathlib` being optional? Test for `pathlib` upon import and wrap all the `if isinstace(path, Path): path = str(path)` in a function just passing unmodified `path` if `pathlib`'s not present?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-324962241,https://api.github.com/repos/pydata/xarray/issues/1514,324962241,MDEyOklzc3VlQ29tbWVudDMyNDk2MjI0MQ==,5700886,2017-08-25T15:56:20Z,2017-08-25T15:56:20Z,CONTRIBUTOR,"> - [x] Tests added / passed Tests are already done on my personal Travis Account (skipped intermediate commits there). > - [x] Passes git diff upstream/master | flake8 --diff Actually true only for `git diff upstream/master xarray/ | flake8 --diff`. But I guess that's what should pass the linter? To me, aae32a8 looks like pathlib support is now present whereever it makes sense.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-324898664,https://api.github.com/repos/pydata/xarray/issues/1514,324898664,MDEyOklzc3VlQ29tbWVudDMyNDg5ODY2NA==,5700886,2017-08-25T11:59:27Z,2017-08-25T11:59:27Z,CONTRIBUTOR,"Thanks for the review @shoyer ! On my machine, I've already stared adapting the other backends (`to_netcdf` et al) to support `pathlib` as well. I'll include it here.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-323845017,https://api.github.com/repos/pydata/xarray/issues/1514,323845017,MDEyOklzc3VlQ29tbWVudDMyMzg0NTAxNw==,5635139,2017-08-21T20:30:48Z,2017-08-21T20:30:48Z,MEMBER,"> Curently, tests with Python 2 are failing, because there is no explicit pathlib dependency yet. I missed this, apologies. Can we add `pathlib2` as an optional dependency and handle the case where it's not installed? ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482 https://github.com/pydata/xarray/pull/1514#issuecomment-323844395,https://api.github.com/repos/pydata/xarray/issues/1514,323844395,MDEyOklzc3VlQ29tbWVudDMyMzg0NDM5NQ==,5635139,2017-08-21T20:27:58Z,2017-08-21T20:27:58Z,MEMBER,Are you sure `pathlib` exists in py2? I had thought you needed to install `pathlib2` (I may be wrong on the specifics),"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,251734482