home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where author_association = "MEMBER" and issue = 640740029 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 3

  • keewis 4
  • dcherian 2
  • max-sixty 1

issue 1

  • silence UnitStrippedWarnings · 7 ✖

author_association 1

  • MEMBER · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
653099470 https://github.com/pydata/xarray/pull/4163#issuecomment-653099470 https://api.github.com/repos/pydata/xarray/issues/4163 MDEyOklzc3VlQ29tbWVudDY1MzA5OTQ3MA== dcherian 2448579 2020-07-02T16:14:03Z 2020-07-02T16:14:03Z MEMBER

Thanks @keewis. I'm really excited to see this go in.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  silence UnitStrippedWarnings 640740029
650430723 https://github.com/pydata/xarray/pull/4163#issuecomment-650430723 https://api.github.com/repos/pydata/xarray/issues/4163 MDEyOklzc3VlQ29tbWVudDY1MDQzMDcyMw== keewis 14808389 2020-06-26T22:25:46Z 2020-06-26T22:25:46Z MEMBER

Once the CI passes this should be ready for review and merging.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  silence UnitStrippedWarnings 640740029
649860850 https://github.com/pydata/xarray/pull/4163#issuecomment-649860850 https://api.github.com/repos/pydata/xarray/issues/4163 MDEyOklzc3VlQ29tbWVudDY0OTg2MDg1MA== keewis 14808389 2020-06-25T23:06:28Z 2020-06-25T23:16:04Z MEMBER

I tried that by writing some sort of assert_duckarray_equal and assert_duckarray_allclose function. That should work for most duck arrays, but not pint: the tests often compare the data with the variable (or the variable's data), and since the data is mostly a bare numpy array this fails for pint: bare numpy arrays are by definition dimensionless and so the comparison either returns False (the assertion fails) or a DimensionalityError is raised.

So to make this work I think we'd need to rewrite VariableSubtests to have another static method (array_type? data_type?) which is called on all data before it is passed to cls. That, however, has its own set of issues and in the end I concluded that VariableSubtests was just not written with duck arrays in mind, and that pytest doesn't encourage reusing tests by using inheritance (marking or removing tests from base classes is really clunky). With that in mind I simply removed the use of VariableSubtests for now (this shouldn't decrease the coverage too much) and we can add it back if / when we notice that we actually need these tests.

Edit: Right now the only failing tests are due to hgrecco/pint#1123. I guess I'll just remove the xfail condition and add it back once that PR is merged.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  silence UnitStrippedWarnings 640740029
649854399 https://github.com/pydata/xarray/pull/4163#issuecomment-649854399 https://api.github.com/repos/pydata/xarray/issues/4163 MDEyOklzc3VlQ29tbWVudDY0OTg1NDM5OQ== max-sixty 5635139 2020-06-25T22:44:43Z 2020-06-25T22:44:43Z MEMBER

I just saw your message from a couple of days ago @keewis . To the extent you've solved that, great. If you haven't — one option would be to change assert_array_equal in those tests to xarray's assert_equal, and ensure xarray's functions handle the duck arrays reasonably.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  silence UnitStrippedWarnings 640740029
648266355 https://github.com/pydata/xarray/pull/4163#issuecomment-648266355 https://api.github.com/repos/pydata/xarray/issues/4163 MDEyOklzc3VlQ29tbWVudDY0ODI2NjM1NQ== keewis 14808389 2020-06-23T16:14:44Z 2020-06-23T21:50:51Z MEMBER

unfortunately, this doesn't seem to really work: VariableSubtests was written to use the same tests for Variable and IndexVariable, and using it to test duckarrays (pint in particular) is difficult since the data that is often used to compare the result is not converted. I'm not sure if rewriting VariableSubtests to optionally allow converting the data or adding specific Variable-with-units tests instead of inheriting from VariableSubtests is easier...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  silence UnitStrippedWarnings 640740029
647576284 https://github.com/pydata/xarray/pull/4163#issuecomment-647576284 https://api.github.com/repos/pydata/xarray/issues/4163 MDEyOklzc3VlQ29tbWVudDY0NzU3NjI4NA== dcherian 2448579 2020-06-22T15:04:58Z 2020-06-22T15:04:58Z MEMBER

I think we could also write our own version of assert_array_equal / assert_allclose that works on duck arrays.

This sounds right to me.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  silence UnitStrippedWarnings 640740029
647525098 https://github.com/pydata/xarray/pull/4163#issuecomment-647525098 https://api.github.com/repos/pydata/xarray/issues/4163 MDEyOklzc3VlQ29tbWVudDY0NzUyNTA5OA== keewis 14808389 2020-06-22T13:38:14Z 2020-06-22T13:38:14Z MEMBER

except from the failing operator.eq tests (which are due to pint upstream and will be fixed soon) and the pad tests that need to be rewritten only the tests from the VariableSubclassobjects are left.

Since they use assert_array_equal and np.testing.assert_allclose (which don't dispatch), I'm not sure how to deal with them: If I wanted to fix them in TestVariable I would probably end up rewriting all of these. Other than that, I think we could also write our own version of assert_array_equal / assert_allclose that works on duck arrays. We already have the functionality in duck_array_ops.py, we'd just need to write the summary code. That would probably have to be a new PR, though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  silence UnitStrippedWarnings 640740029

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 2961.94ms · About: xarray-datasette