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/990#issuecomment-244844596,https://api.github.com/repos/pydata/xarray/issues/990,244844596,MDEyOklzc3VlQ29tbWVudDI0NDg0NDU5Ng==,1217238,2016-09-06T04:00:25Z,2016-09-06T04:00:25Z,MEMBER,"Thanks! ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-244801125,https://api.github.com/repos/pydata/xarray/issues/990,244801125,MDEyOklzc3VlQ29tbWVudDI0NDgwMTEyNQ==,296686,2016-09-05T19:14:38Z,2016-09-05T19:14:38Z,CONTRIBUTOR,"I realised that the reason that Travis and AppVeyor weren't running properly was because there were conflicts between this PR and master. I _think_ I've managed to rebase and push properly - but let me know if I've done anything wrong. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-244539361,https://api.github.com/repos/pydata/xarray/issues/990,244539361,MDEyOklzc3VlQ29tbWVudDI0NDUzOTM2MQ==,296686,2016-09-03T10:36:03Z,2016-09-03T10:36:03Z,CONTRIBUTOR,"Ah ok - that works (not entirely sure why, but it works!) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-244513243,https://api.github.com/repos/pydata/xarray/issues/990,244513243,MDEyOklzc3VlQ29tbWVudDI0NDUxMzI0Mw==,1217238,2016-09-03T00:04:29Z,2016-09-03T00:04:29Z,MEMBER,"We have a bit of a circular imports mess :). For now, just import them at the top of the `to_netcdf` method. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-244510329,https://api.github.com/repos/pydata/xarray/issues/990,244510329,MDEyOklzc3VlQ29tbWVudDI0NDUxMDMyOQ==,296686,2016-09-02T23:35:24Z,2016-09-02T23:35:24Z,CONTRIBUTOR,"Oops yes, sorry! I'm having a bit of an issue with changing the strings to constants (which, by the way, I completely agree is how it should be done). I've defined the constants in `backends/api.py` and am then trying to import them in `core/dataarray.py`. I am doing the import as: `from ..backends import DATAARRAY_NAME, DATAARRAY_VARIABLE` But this gives me the following error: ``` ../../anaconda3/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport __import__(modname) xarray/__init__.py:3: in from .core.extensions import (register_dataarray_accessor, xarray/core/extensions.py:3: in from .dataarray import DataArray xarray/core/dataarray.py:9: in from ..backends import DATAARRAY_NAME, DATAARRAY_VARIABLE xarray/backends/__init__.py:8: in from .netCDF4_ import NetCDF4DataStore xarray/backends/netCDF4_.py:6: in from .. import Variable E ImportError: cannot import name 'Variable' ``` It seems like my relative import is somehow mucking up another relative import inside the netCDF4 stuff. Do you have any ideas how I can solve this? Am I just doing my imports wrong? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-244505054,https://api.github.com/repos/pydata/xarray/issues/990,244505054,MDEyOklzc3VlQ29tbWVudDI0NDUwNTA1NA==,1217238,2016-09-02T22:50:56Z,2016-09-02T22:50:56Z,MEMBER,"I have a couple inline comments that I think you missed? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-244395018,https://api.github.com/repos/pydata/xarray/issues/990,244395018,MDEyOklzc3VlQ29tbWVudDI0NDM5NTAxOA==,296686,2016-09-02T14:44:24Z,2016-09-02T14:44:24Z,CONTRIBUTOR,"Great, thanks. I think I've done these changes (frustratingly I can't see a way to use `*args`/`*kwargs` after using the full argument list in the function definition, so I've had to write it out. Let me know if there is a better way, but I suspect there isn't). ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-244132923,https://api.github.com/repos/pydata/xarray/issues/990,244132923,MDEyOklzc3VlQ29tbWVudDI0NDEzMjkyMw==,1217238,2016-09-01T16:21:58Z,2016-09-01T16:21:58Z,MEMBER,"I have a few final nits, but looking very nice! ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-243951504,https://api.github.com/repos/pydata/xarray/issues/990,243951504,MDEyOklzc3VlQ29tbWVudDI0Mzk1MTUwNA==,296686,2016-09-01T01:33:25Z,2016-09-01T01:33:25Z,CONTRIBUTOR,"Thanks - I've got that working with the `close()` method, and I did it 'properly' using the `BaseDataObject` class. The only failure on here now is the same as #991 - a conda error creating one of the environments. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-243948268,https://api.github.com/repos/pydata/xarray/issues/990,243948268,MDEyOklzc3VlQ29tbWVudDI0Mzk0ODI2OA==,1217238,2016-09-01T01:10:56Z,2016-09-01T01:10:56Z,MEMBER,"The easiest fix would be to add a decorator to skip tests on Windows, like the existing decorators that we use: https://github.com/pydata/xarray/blob/master/xarray/test/__init__.py#L73 I'm not sure off hand how to detect if we're running on Windows but it can't be hard. To add a close method, I would copy these lines from `dataset.py` (or better use, move them to the common base class `BaseDataObject` in `common.py`): https://github.com/pydata/xarray/blob/master/xarray/core/dataset.py#L251-L262 Then, you just need to define `_file_obj = None` in `DataArray.__init__` and set it when appropriate. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-243946174,https://api.github.com/repos/pydata/xarray/issues/990,243946174,MDEyOklzc3VlQ29tbWVudDI0Mzk0NjE3NA==,296686,2016-09-01T00:56:50Z,2016-09-01T00:56:50Z,CONTRIBUTOR,"Also, it seems like there might be an issue with not closing the Dataset - but only on Windows (see the AppVeyor build failure at https://ci.appveyor.com/project/jhamman/xarray-injyf/build/1.0.268/job/kr8ss684ijxg55be). Any ideas how this could be sorted without having to implement `.close()` for `DataArray` (or, alternatively, how to go about implementing that, given that I don't think a DataArray contains a reference to the Dataset that it may have come from) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-243929210,https://api.github.com/repos/pydata/xarray/issues/990,243929210,MDEyOklzc3VlQ29tbWVudDI0MzkyOTIxMA==,296686,2016-08-31T23:05:12Z,2016-08-31T23:05:12Z,CONTRIBUTOR,"Thanks for the useful comments. I've added some bits to the Sphinx docs in the places that I think they should go - but let me know if I need to add any more. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-243863092,https://api.github.com/repos/pydata/xarray/issues/990,243863092,MDEyOklzc3VlQ29tbWVudDI0Mzg2MzA5Mg==,296686,2016-08-31T18:50:41Z,2016-08-31T18:50:41Z,CONTRIBUTOR,"I think I've dealt with the comments/issues now, but let me know if more needs doing. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-243007936,https://api.github.com/repos/pydata/xarray/issues/990,243007936,MDEyOklzc3VlQ29tbWVudDI0MzAwNzkzNg==,1217238,2016-08-29T00:00:46Z,2016-08-29T00:00:46Z,MEMBER,"I would add these tests to test_backends, probably a new test class. The best test is probably a round-trip test where we save and load a DataArray and verify that the result is identical to what we started with. On Sun, Aug 28, 2016 at 2:20 PM Robin Wilson notifications@github.com wrote: > Thanks @shoyer https://github.com/shoyer - I wasn't actually aware that > DataArrays can have a name _before_ they're put into a Dataset (that's > one of the things I love about contributing to OSS: you always learn things > about the software that you never knew before!). I'll deal with the design > issues ASAP. > > How would you suggest testing this? I wasn't sure where to put the tests, > and what exactly to test? Presumably something about the equivalence > between this and saving after manually converting to a dataset, but I > wasn't really sure how best to go about it. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > https://github.com/pydata/xarray/pull/990#issuecomment-243000159, or mute > the thread > https://github.com/notifications/unsubscribe-auth/ABKS1qbgrUqpkuRNqP4BjhclA25MrRN-ks5qkfusgaJpZM4Ju3Aq > . ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-243000159,https://api.github.com/repos/pydata/xarray/issues/990,243000159,MDEyOklzc3VlQ29tbWVudDI0MzAwMDE1OQ==,296686,2016-08-28T21:20:44Z,2016-08-28T21:20:44Z,CONTRIBUTOR,"Thanks @shoyer - I wasn't actually aware that DataArrays can have a name _before_ they're put into a Dataset (that's one of the things I love about contributing to OSS: you always learn things about the software that you never knew before!). I'll deal with the design issues ASAP. How would you suggest testing this? I wasn't sure where to put the tests, and what exactly to test? Presumably something about the equivalence between this and saving after manually converting to a dataset, but I wasn't really sure how best to go about it. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-242996578,https://api.github.com/repos/pydata/xarray/issues/990,242996578,MDEyOklzc3VlQ29tbWVudDI0Mjk5NjU3OA==,1217238,2016-08-28T20:15:21Z,2016-08-28T20:15:21Z,MEMBER,"I'm also a little concerned about the design here, because it always saves/restores the DataArray with the name `'data'`, which could override the original name. Ideally this method should save/restore a DataArray as faithfully as possible. Instead, maybe we should only override the original name if it's `None`, or the same name as one of it's coordinates (which would otherwise result in an invalid NetCDF file). Then we could restore by looking for a Dataset with single data variable regardless of the name, e.g., ``` if len(dataset.data_vars) != 1: raise ValueError data_array, = dataset.data_vars.values() ``` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183 https://github.com/pydata/xarray/pull/990#issuecomment-242996279,https://api.github.com/repos/pydata/xarray/issues/990,242996279,MDEyOklzc3VlQ29tbWVudDI0Mjk5NjI3OQ==,1217238,2016-08-28T20:08:57Z,2016-08-28T20:08:57Z,MEMBER,"This is great, but it needs tests and documentation :). ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,173632183