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/4409#issuecomment-695039954,https://api.github.com/repos/pydata/xarray/issues/4409,695039954,MDEyOklzc3VlQ29tbWVudDY5NTAzOTk1NA==,2448579,2020-09-18T19:12:34Z,2020-09-18T19:12:34Z,MEMBER,LGTM :+1:,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-695036123,https://api.github.com/repos/pydata/xarray/issues/4409,695036123,MDEyOklzc3VlQ29tbWVudDY5NTAzNjEyMw==,14808389,2020-09-18T19:03:33Z,2020-09-18T19:03:49Z,MEMBER,should we merge this before releasing 0.16.1?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691455578,https://api.github.com/repos/pydata/xarray/issues/4409,691455578,MDEyOklzc3VlQ29tbWVudDY5MTQ1NTU3OA==,14808389,2020-09-12T09:32:48Z,2020-09-14T11:47:03Z,MEMBER,"@kmuehlbauer, I modified `concat` so #4072 and #2811 might already be fixed. Can you confirm? Edit: at least #4072 does not seem to be fixed yet. ~Good news is that this doesn't seem to depend on a `set` (i.e. the result does not change with different interpreter sessions)~","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691862878,https://api.github.com/repos/pydata/xarray/issues/4409,691862878,MDEyOklzc3VlQ29tbWVudDY5MTg2Mjg3OA==,5821660,2020-09-14T07:07:17Z,2020-09-14T07:21:52Z,MEMBER,@keewis Unfortunately your changes did not help solving #2811. I'll have a pull request ready today with a proposal how to fix both issues.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691869821,https://api.github.com/repos/pydata/xarray/issues/4409,691869821,MDEyOklzc3VlQ29tbWVudDY5MTg2OTgyMQ==,5821660,2020-09-14T07:20:26Z,2020-09-14T07:20:26Z,MEMBER,@keewis See #4419 ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691864317,https://api.github.com/repos/pydata/xarray/issues/4409,691864317,MDEyOklzc3VlQ29tbWVudDY5MTg2NDMxNw==,14808389,2020-09-14T07:10:08Z,2020-09-14T07:10:08Z,MEMBER,thanks for checking!,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691456131,https://api.github.com/repos/pydata/xarray/issues/4409,691456131,MDEyOklzc3VlQ29tbWVudDY5MTQ1NjEzMQ==,5821660,2020-09-12T09:36:01Z,2020-09-12T09:36:01Z,MEMBER,"@keewis I'm traveling currently, will check on Monday and come back to you. ","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691419694,https://api.github.com/repos/pydata/xarray/issues/4409,691419694,MDEyOklzc3VlQ29tbWVudDY5MTQxOTY5NA==,5821660,2020-09-12T05:56:35Z,2020-09-12T05:56:35Z,MEMBER,@keewis @dcherian FYI: Regarding #4072 and #2811 with `concat` I successfully tested a fix locally yesterday. I'll ping you when I have the PR out. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691298627,https://api.github.com/repos/pydata/xarray/issues/4409,691298627,MDEyOklzc3VlQ29tbWVudDY5MTI5ODYyNw==,14808389,2020-09-11T20:31:31Z,2020-09-11T20:31:31Z,MEMBER,the tests pass so this should be ready for review,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691245402,https://api.github.com/repos/pydata/xarray/issues/4409,691245402,MDEyOklzc3VlQ29tbWVudDY5MTI0NTQwMg==,14808389,2020-09-11T18:23:09Z,2020-09-11T18:23:09Z,MEMBER,"""mix up"" in this case means that the order is random (i.e. a `set` was involved). Sorry if that was unclear.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691243864,https://api.github.com/repos/pydata/xarray/issues/4409,691243864,MDEyOklzc3VlQ29tbWVudDY5MTI0Mzg2NA==,2448579,2020-09-11T18:19:44Z,2020-09-11T18:19:44Z,MEMBER,"What do you mean by ""mix up""? Also see #2811","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691242257,https://api.github.com/repos/pydata/xarray/issues/4409,691242257,MDEyOklzc3VlQ29tbWVudDY5MTI0MjI1Nw==,14808389,2020-09-11T18:16:05Z,2020-09-11T18:16:05Z,MEMBER,"thanks, that almost fixed the doctests. However, `concat` seems to somehow also mix up the coordinates / dimensions. I tried to fix that by not iterating over a set, but I'm totally not sure if there's a better fix.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691217305,https://api.github.com/repos/pydata/xarray/issues/4409,691217305,MDEyOklzc3VlQ29tbWVudDY5MTIxNzMwNQ==,1217238,2020-09-11T17:20:06Z,2020-09-11T17:20:06Z,MEMBER,"One way to fix this is to iterate over variables instead of `_coord_names`, e.g., instead of: ```python for k in self._coord_names: ... ``` use: ```python for k in self._variables: if k in self._coord_names: ... ``` I believe we already use this trick in a few places for exactly this reason.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691208282,https://api.github.com/repos/pydata/xarray/issues/4409,691208282,MDEyOklzc3VlQ29tbWVudDY5MTIwODI4Mg==,14808389,2020-09-11T17:00:07Z,2020-09-11T17:00:07Z,MEMBER,"unfortunately, that's pretty difficult: the set in question is `Dataset._coord_names`, and there would be a lot to rewrite if we tried to change that to a list. Just for reference, the method where the reordering happens is `Dataset._copy_listed`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691181491,https://api.github.com/repos/pydata/xarray/issues/4409,691181491,MDEyOklzc3VlQ29tbWVudDY5MTE4MTQ5MQ==,1217238,2020-09-11T16:03:59Z,2020-09-11T16:03:59Z,MEMBER,"OK, my guess is that this is happening because there is someplace where we iterate over a Python `set` (which has a non-deterministic order based on hashing) rather than a Python `dict`. If we can nail down where that is happening we should remove it!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691170222,https://api.github.com/repos/pydata/xarray/issues/4409,691170222,MDEyOklzc3VlQ29tbWVudDY5MTE3MDIyMg==,2448579,2020-09-11T15:42:08Z,2020-09-11T15:42:08Z,MEMBER,The plotting thing could be fixed relatively easily here: https://github.com/pydata/xarray/blob/23dc2fc9f2785c348ff821bf2da61dfa2206d283/xarray/core/dataarray.py#L2805-L2832 and the cor5responding function in Dataset.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691157835,https://api.github.com/repos/pydata/xarray/issues/4409,691157835,MDEyOklzc3VlQ29tbWVudDY5MTE1NzgzNQ==,14808389,2020-09-11T15:19:40Z,2020-09-11T15:21:56Z,MEMBER,"yes, sorry, you're right, that is indeed non-deterministic, and exactly the problem I'm having with the doctests. Interestingly, this seems to be deterministic per python session: running ```python import xarray as xr ds = xr.Dataset( {""a"": ((""x"", ""y""), [[0, 1], [2, 3]])}, coords={""x"": [""a"", ""b""], ""y"": [0, 1]} ) print(ds) print(ds + 1) print(ds) print(ds + 1) ``` will print the same result for `ds` and `ds + 1`, but when rerunning in a new session, the coordinate order may be changed (more coordinates increase the probability for the change).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691136159,https://api.github.com/repos/pydata/xarray/issues/4409,691136159,MDEyOklzc3VlQ29tbWVudDY5MTEzNjE1OQ==,14808389,2020-09-11T14:41:39Z,2020-09-11T14:44:03Z,MEMBER,"I think that's still deterministic (although I agree that the change in the title is annoying): if you run your script multiple times, it will always return the same output. The issue I'm trying to fix here is much worse: the output of the *same* code will return *different* results with each run. Edit: but maybe I just have a messed up environment","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-691037092,https://api.github.com/repos/pydata/xarray/issues/4409,691037092,MDEyOklzc3VlQ29tbWVudDY5MTAzNzA5Mg==,14808389,2020-09-11T11:23:26Z,2020-09-11T14:28:41Z,MEMBER,"> Can you give an example of a non-deterministic coordinate order sure, just try running `python -m pytest --doctest-modules xarray --ignore xarray/tests`. For me at least (with the environment created by `py38.yml`), `xarray.core.common.DataWithCoords.pipe`, `xarray.core.groupby.GroupBy.quantile` and `xarray.core.dataset.Dataset.filter_by_attrs` pass or fail at random: in one run they pass, in the next they fail because a different ordering was used for the coordinates (see also #4408). > I think users find it a little more intuitive to preserve the order of dict keys. Not sure if that's evidence against this (maybe we need to rearrange the `repr` to really fix it), but in #4072 someone confused the order of the printed coordinates with the order of the dimensions. I'd think it's much easier to tell people that these are alphabetically sorted, no matter what they do, so they shouldn't try to read the dimension order from the coordinates (same with the dimension summary).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-690879736,https://api.github.com/repos/pydata/xarray/issues/4409,690879736,MDEyOklzc3VlQ29tbWVudDY5MDg3OTczNg==,1217238,2020-09-11T05:18:02Z,2020-09-11T05:18:02Z,MEMBER,"Can you give an example of a non-deterministic coordinate order? That sounds surprising to me, given that on Python 3.6+ dictionaries preserve insertion order. My preference would be not to sort mappings automatically, either in `__init__` or when formatting. I think users find it a little more intuitive to preserve the order of dict keys. It's true that this is only a guarantee on Python 3.7+, but both CPython 3.6 and all versions of pypy 3 preserve dict insertion order, so in practice we can pretty much always guarantee this. (And soon, Python 3.7 will be required for xarray.)","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-687934050,https://api.github.com/repos/pydata/xarray/issues/4409,687934050,MDEyOklzc3VlQ29tbWVudDY4NzkzNDA1MA==,5635139,2020-09-06T23:34:51Z,2020-09-06T23:34:51Z,MEMBER,"> sorting in `__init__` should be possible and might even be easier than sorting when formatting. Though I was thinking we wouldn't sort it; we'd take the order as given > Do we have to bump the supported python version for that, or is it fine to keep the current behavior for a non-CPython `python<3.7` (if we ever supported a language other than CPython)? I reckon it's fine, it's such a corner case, and it'll only affect these doctests ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-687919197,https://api.github.com/repos/pydata/xarray/issues/4409,687919197,MDEyOklzc3VlQ29tbWVudDY4NzkxOTE5Nw==,14808389,2020-09-06T22:27:50Z,2020-09-06T23:02:50Z,MEMBER,"thanks for the hint, sorting in `__init__` should be possible and might even be easier than sorting when formatting. However, `3.7` is the first version of python (the language) which includes the insertion-order preservation introduced in CPython `3.6`. Do we have to bump the supported python version for that, or is it fine to keep the current behavior for a non-CPython `python<3.7` (if we ever supported a language other than CPython)? Edit: that breaks two of the `iris` tests, which seem to depend on the order of the coords. Maybe we should change that?","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177 https://github.com/pydata/xarray/pull/4409#issuecomment-687909934,https://api.github.com/repos/pydata/xarray/issues/4409,687909934,MDEyOklzc3VlQ29tbWVudDY4NzkwOTkzNA==,5635139,2020-09-06T21:45:02Z,2020-09-06T21:45:02Z,MEMBER,Could we keep them in sorted order like a normal `dict` (at least as-of recent python versions)?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,694448177