home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

18 rows where issue = 249584098 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 5

  • max-sixty 8
  • benbovy 6
  • shoyer 2
  • dcherian 1
  • pep8speaks 1

author_association 2

  • MEMBER 17
  • NONE 1

issue 1

  • Detailed report for testing.assert_equal and testing.assert_identical · 18 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
455571902 https://github.com/pydata/xarray/pull/1507#issuecomment-455571902 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NTU3MTkwMg== max-sixty 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
455476471 https://github.com/pydata/xarray/pull/1507#issuecomment-455476471 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NTQ3NjQ3MQ== shoyer 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
455467849 https://github.com/pydata/xarray/pull/1507#issuecomment-455467849 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NTQ2Nzg0OQ== benbovy 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454740990 https://github.com/pydata/xarray/pull/1507#issuecomment-454740990 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDc0MDk5MA== pep8speaks 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454753169 https://github.com/pydata/xarray/pull/1507#issuecomment-454753169 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDc1MzE2OQ== benbovy 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454752304 https://github.com/pydata/xarray/pull/1507#issuecomment-454752304 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDc1MjMwNA== max-sixty 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454529651 https://github.com/pydata/xarray/pull/1507#issuecomment-454529651 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDUyOTY1MQ== dcherian 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454516512 https://github.com/pydata/xarray/pull/1507#issuecomment-454516512 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDUxNjUxMg== max-sixty 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454514749 https://github.com/pydata/xarray/pull/1507#issuecomment-454514749 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDUxNDc0OQ== max-sixty 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454505227 https://github.com/pydata/xarray/pull/1507#issuecomment-454505227 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDUwNTIyNw== benbovy 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454504146 https://github.com/pydata/xarray/pull/1507#issuecomment-454504146 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDUwNDE0Ng== benbovy 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454503039 https://github.com/pydata/xarray/pull/1507#issuecomment-454503039 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDUwMzAzOQ== max-sixty 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454502075 https://github.com/pydata/xarray/pull/1507#issuecomment-454502075 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDUwMjA3NQ== max-sixty 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454501832 https://github.com/pydata/xarray/pull/1507#issuecomment-454501832 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDUwMTgzMg== max-sixty 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454496268 https://github.com/pydata/xarray/pull/1507#issuecomment-454496268 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDQ5NjI2OA== benbovy 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 (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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
454173906 https://github.com/pydata/xarray/pull/1507#issuecomment-454173906 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDQ1NDE3MzkwNg== max-sixty 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
321933573 https://github.com/pydata/xarray/pull/1507#issuecomment-321933573 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDMyMTkzMzU3Mw== benbovy 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 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098
321925530 https://github.com/pydata/xarray/pull/1507#issuecomment-321925530 https://api.github.com/repos/pydata/xarray/issues/1507 MDEyOklzc3VlQ29tbWVudDMyMTkyNTUzMA== shoyer 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
}
  Detailed report for testing.assert_equal and testing.assert_identical 249584098

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 559.719ms · About: xarray-datasette