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/1507#issuecomment-455571902,https://api.github.com/repos/pydata/xarray/issues/1507,455571902,MDEyOklzc3VlQ29tbWVudDQ1NTU3MTkwMg==,5635139,2019-01-18T14:52:09Z,2019-01-18T14:52:09Z,MEMBER,Thanks @benbovy! ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-455476471,https://api.github.com/repos/pydata/xarray/issues/1507,455476471,MDEyOklzc3VlQ29tbWVudDQ1NTQ3NjQ3MQ==,1217238,2019-01-18T09:09:46Z,2019-01-18T09:09:46Z,MEMBER,"> If everyone is happy with this I'm going to merge it.

Yes, please!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-455467849,https://api.github.com/repos/pydata/xarray/issues/1507,455467849,MDEyOklzc3VlQ29tbWVudDQ1NTQ2Nzg0OQ==,4160723,2019-01-18T08:38:01Z,2019-01-18T08:38:01Z,MEMBER,If everyone is happy with this I'm going to merge it.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454740990,https://api.github.com/repos/pydata/xarray/issues/1507,454740990,MDEyOklzc3VlQ29tbWVudDQ1NDc0MDk5MA==,24736507,2019-01-16T11:07:35Z,2019-01-16T13:27:51Z,NONE,"Hello @benbovy! Thanks for updating the PR.







Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on January 16, 2019 at 13:27 Hours UTC","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454753169,https://api.github.com/repos/pydata/xarray/issues/1507,454753169,MDEyOklzc3VlQ29tbWVudDQ1NDc1MzE2OQ==,4160723,2019-01-16T11:56:04Z,2019-01-16T11:56:04Z,MEMBER,"> I agree with @max-sixty A > C > B but only weakly.

Same opinion.

> This looks v good @benbovy!

I'm just fixing `int32` vs `int64` issue with tests run on appveyor, then to me it's ready to merge unless someone else has objections.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454752304,https://api.github.com/repos/pydata/xarray/issues/1507,454752304,MDEyOklzc3VlQ29tbWVudDQ1NDc1MjMwNA==,5635139,2019-01-16T11:52:45Z,2019-01-16T11:52:45Z,MEMBER,This looks v good @benbovy!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454529651,https://api.github.com/repos/pydata/xarray/issues/1507,454529651,MDEyOklzc3VlQ29tbWVudDQ1NDUyOTY1MQ==,2448579,2019-01-15T19:58:02Z,2019-01-15T19:58:02Z,MEMBER,I agree with @max-sixty A > C > B but only weakly.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454516512,https://api.github.com/repos/pydata/xarray/issues/1507,454516512,MDEyOklzc3VlQ29tbWVudDQ1NDUxNjUxMg==,5635139,2019-01-15T19:19:53Z,2019-01-15T19:19:53Z,MEMBER,"> I'm wondering which is the best among the options below:

TBH I think they're all good; I don't have a strong view. I'd low-confidence rank A->C->B ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454514749,https://api.github.com/repos/pydata/xarray/issues/1507,454514749,MDEyOklzc3VlQ29tbWVudDQ1NDUxNDc0OQ==,5635139,2019-01-15T19:14:42Z,2019-01-15T19:14:42Z,MEMBER,"I think you should feel free to merge an MVP rather than perfecting, but check out https://docs.pytest.org/en/latest/example/simple.html#writing-well-integrated-assertion-helpers

I _think_ that might be as simple as wrapping these in `pytest.fail(...)`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454505227,https://api.github.com/repos/pydata/xarray/issues/1507,454505227,MDEyOklzc3VlQ29tbWVudDQ1NDUwNTIyNw==,4160723,2019-01-15T18:46:36Z,2019-01-15T18:46:36Z,MEMBER,"> If you want to add that example as a test, that could be a good way of documenting the function. But I don't think it's strictly needed

Yes I could use those examples for the tests. I think it might be good to write shallow tests at least for ``diff_array_repr`` and ``diff_dataset_repr`` (in ``formatting.py``).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454504146,https://api.github.com/repos/pydata/xarray/issues/1507,454504146,MDEyOklzc3VlQ29tbWVudDQ1NDUwNDE0Ng==,4160723,2019-01-15T18:43:12Z,2019-01-15T18:43:12Z,MEMBER,"I'm wondering which is the best among the options below:

A. 

```
Differing data variables:
L   var1     (x, y) int64 1 2 3 4 5 7
R   var1     (x) int64 1 2
L   var2     (x, y) int64 4 5 6 7 8 9
    description: variable 2 
R   var2     (x, y) int64 4 5 6 7 8 9
```

B.

```
Differing data variables:
L   
    var1     (x, y) int64 1 2 3 4 5 7
R
    var1     (x) int64 1 2
L
    var2     (x, y) int64 4 5 6 7 8 9
    description: variable 2 
R
    var2     (x, y) int64 4 5 6 7 8 9
```

C.

```
Differing data variables:
L   
    var1     (x, y) int64 1 2 3 4 5 7
    var2     (x, y) int64 4 5 6 7 8 9
    description: variable 2
R
    var1     (x) int64 1 2
    var2     (x, y) int64 4 5 6 7 8 9
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454503039,https://api.github.com/repos/pydata/xarray/issues/1507,454503039,MDEyOklzc3VlQ29tbWVudDQ1NDUwMzAzOQ==,5635139,2019-01-15T18:39:53Z,2019-01-15T18:39:53Z,MEMBER,"If you want to add that example as a test, that could be a good way of documenting the function. But I don't think it's strictly needed","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454502075,https://api.github.com/repos/pydata/xarray/issues/1507,454502075,MDEyOklzc3VlQ29tbWVudDQ1NDUwMjA3NQ==,5635139,2019-01-15T18:37:02Z,2019-01-15T18:37:02Z,MEMBER,This looks amazing! I'm excited to use it. Thanks for finishing it up,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454501832,https://api.github.com/repos/pydata/xarray/issues/1507,454501832,MDEyOklzc3VlQ29tbWVudDQ1NDUwMTgzMg==,5635139,2019-01-15T18:36:12Z,2019-01-15T18:36:12Z,MEMBER,">  full comparison is done once again for formatting the report. I don't think there is an easy way to avoid that, but I don't think it's a big deal either.

i.e. there's a performance cost? Yeah that's def fine!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454496268,https://api.github.com/repos/pydata/xarray/issues/1507,454496268,MDEyOklzc3VlQ29tbWVudDQ1NDQ5NjI2OA==,4160723,2019-01-15T18:19:44Z,2019-01-15T18:19:44Z,MEMBER,"Thanks for reminding me this PR @max-sixty ! It deserves more than no commits since 1.5 years!

The assertion error messages now look like [pytest's failure reports](https://docs.pytest.org/en/stable/example/reportingdemo.html) (see ``test_eq_dict``). I've tried to reuse as much as possible the repr formatting that we already have for the xarray objects.

As examples:

```python
ds_a = xr.Dataset(data_vars={'var1': (('x', 'y'), [[1, 2, 3], [4, 5, 7]]),
                             'var2': ('x', [3, 4])},
                  coords={'x': ['a', 'b'], 'y': [1, 2, 3]},
                  attrs={'units': 'm', 'description': 'desc'})

ds_b = xr.Dataset(data_vars={'var1': ('x', [1, 2])},
                  coords={'x': ('x', ['a', 'c'], {'source': 0}), 'label': ('x', [1, 2])},
                  attrs={'units': 'kg'})
```
```
>>> xr.testing.assert_identical(ds_a, ds_b)
AssertionError: Left and right Dataset objects are not identical
Differing dimensions:
(x: 2, y: 3) != (x: 2)
Differing coordinates:
L * x        (x) <U1 'a' 'b'
R * x        (x) <U1 'a' 'c'
    source: 0
Left contains more coordinates:
  * y        (y) int64 1 2 3
Right contains more coordinates:
    label    (x) int64 1 2
Differing data variables:
L   var1     (x, y) int64 1 2 3 4 5 7
R   var1     (x) int64 1 2
Left contains more data variables:
    var2     (x) int64 3 4
Differing attributes:
L   units: m
R   units: kg
Left contains more attributes:
    description: desc
```

```python
da_a = xr.DataArray([[1, 2, 3], [4, 5, 7]],
                    dims=('x', 'y'),
                    coords={'x': ['a', 'b'], 'y': [1, 2, 3]},
                    attrs={'units': 'm', 'description': 'desc'})

da_b = xr.DataArray([1, 2],
                    dims='x',
                    coords={'x': ['a', 'c'], 'label': ('x', [1, 2])},
                    attrs={'units': 'kg'})
```
```
>>> xr.testing.assert_equal(da_a, da_b)
AssertionError: Left and right DataArray objects are not equal
Differing values:
L
    array([[1, 2, 3],
           [4, 5, 7]])
R
    array([1, 2])
Differing coordinates:
L * x        (x) <U1 'a' 'b'
R * x        (x) <U1 'a' 'c'
Left contains more coordinates:
  * y        (y) int64 1 2 3
Right contains more coordinates:
    label    (x) int64 1 2
```

Those examples are probably not the most readable ones but it's for a full showcase.

A downside of this approach (i.e., report the exact differing) is that when ``a`` and ``b`` differs, full comparison is done once again for formatting the report. I don't think there is an easy way to avoid that, but I don't think it's a big deal either.
","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-454173906,https://api.github.com/repos/pydata/xarray/issues/1507,454173906,MDEyOklzc3VlQ29tbWVudDQ1NDE3MzkwNg==,5635139,2019-01-14T21:47:16Z,2019-01-14T21:47:16Z,MEMBER,Any interest in pushing this over the line @benbovy ?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-321933573,https://api.github.com/repos/pydata/xarray/issues/1507,321933573,MDEyOklzc3VlQ29tbWVudDMyMTkzMzU3Mw==,4160723,2017-08-11T22:36:38Z,2017-08-11T22:36:38Z,MEMBER,"Indeed, exact differing variables/attributes would be much better here. I'll look into this next week. 

[pytest's failure reports](https://docs.pytest.org/en/stable/example/reportingdemo.html) and reports of `numpy.testing` functions may be good sources of inspiration.","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098
https://github.com/pydata/xarray/pull/1507#issuecomment-321925530,https://api.github.com/repos/pydata/xarray/issues/1507,321925530,MDEyOklzc3VlQ29tbWVudDMyMTkyNTUzMA==,1217238,2017-08-11T21:41:42Z,2017-08-11T21:41:42Z,MEMBER,"This is certainly welcome. In an ideal world, we might point specifically to the exact differing variables/attributes, but this is a fine start.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,249584098