home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

12 rows where issue = 686495257 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 4

  • max-sixty 4
  • darikg 4
  • keewis 3
  • pep8speaks 1

author_association 3

  • MEMBER 7
  • CONTRIBUTOR 4
  • NONE 1

issue 1

  • Use deepcopy recursively on numpy arrays · 12 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
682038763 https://github.com/pydata/xarray/pull/4379#issuecomment-682038763 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MjAzODc2Mw== darikg 6875882 2020-08-27T15:58:49Z 2020-08-27T15:58:49Z CONTRIBUTOR

Thanks for everybody's help!

Also just wanted to say, you guys have an incredible test suite.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 1,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
682003349 https://github.com/pydata/xarray/pull/4379#issuecomment-682003349 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MjAwMzM0OQ== max-sixty 5635139 2020-08-27T14:58:21Z 2020-08-27T14:58:21Z MEMBER

@darikg Thank you for the contribution!

If you want to put a whatsnew, feel free to — either as a new PR or if you're planning any more contributions atm, then as part of that. Not obligatory though

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
682002273 https://github.com/pydata/xarray/pull/4379#issuecomment-682002273 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MjAwMjI3Mw== max-sixty 5635139 2020-08-27T14:56:33Z 2020-08-27T14:56:33Z MEMBER

Great, let's merge both?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
681999585 https://github.com/pydata/xarray/pull/4379#issuecomment-681999585 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MTk5OTU4NQ== darikg 6875882 2020-08-27T14:52:27Z 2020-08-27T14:52:27Z CONTRIBUTOR

I went with @keewis's last suggestion because I think it makes the most sense for deepcopy to behave as expected even with older versions of numpy

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
681987321 https://github.com/pydata/xarray/pull/4379#issuecomment-681987321 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MTk4NzMyMQ== keewis 14808389 2020-08-27T14:32:46Z 2020-08-27T14:32:46Z MEMBER

actually, we should probably merge #4381 to fix the formatting.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
681985792 https://github.com/pydata/xarray/pull/4379#issuecomment-681985792 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MTk4NTc5Mg== max-sixty 5635139 2020-08-27T14:30:17Z 2020-08-27T14:30:17Z MEMBER

This looks good to go! There's one small formatting fix, and then we can merge. Cheers @darikg

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
681041062 https://github.com/pydata/xarray/pull/4379#issuecomment-681041062 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MTA0MTA2Mg== pep8speaks 24736507 2020-08-26T18:12:36Z 2020-08-27T13:55:19Z NONE

Hello @darikg! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2020-08-27 13:55:19 UTC
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
681103837 https://github.com/pydata/xarray/pull/4379#issuecomment-681103837 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MTEwMzgzNw== keewis 14808389 2020-08-26T20:22:55Z 2020-08-26T20:22:55Z MEMBER

thanks for tracking this down. The easiest way to fix the test would be to decorate it with python pytest.mark.skipif(not IS_NEP18_ACTIVE, reason="requires NEP18") Even easier would be to bump numpy, but that doesn't seem to be possible right now.

We might also try to rewrite the condition to: python if ( hasattr(data, "__array_function__") or isinstance(data, dask_array_type) or (not IS_NEP18_ACTIVE and isinstance(data, np.ndarray)) ): data = copy.deepcopy(data)

Thoughts, @pydata/xarray?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
681097210 https://github.com/pydata/xarray/pull/4379#issuecomment-681097210 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MTA5NzIxMA== darikg 6875882 2020-08-26T20:08:43Z 2020-08-26T20:08:43Z CONTRIBUTOR

Oh, sorry, I actually can reproduce it locally.

Turns out arrays in numpy 1.15 don't have __array_function__. So this:

python if deep: if hasattr(data, "__array_function__") or isinstance( data, dask_array_type ): data = copy.deepcopy(data) elif not isinstance(data, PandasIndexAdapter): # pandas.Index is immutable data = np.array(data)

could just be

python if deep and not isinstance(data, PandasIndexAdapter): data = copy.deepcopy(data)

But I'm not familiar with __array_function__ or why it's being used here, any thoughts?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
681041552 https://github.com/pydata/xarray/pull/4379#issuecomment-681041552 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MTA0MTU1Mg== darikg 6875882 2020-08-26T18:13:32Z 2020-08-26T18:13:32Z CONTRIBUTOR

Weird, I can't reproduce that locally, even after reverting to numpy 1.15. Trying with a non-object class

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
681038709 https://github.com/pydata/xarray/pull/4379#issuecomment-681038709 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MTAzODcwOQ== keewis 14808389 2020-08-26T18:07:53Z 2020-08-26T18:07:53Z MEMBER

it seems that's a backwards compatibility issue with numpy: 1.15 fails while 1.19 works. I'm not sure in which version the fix was introduced, though

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257
681031704 https://github.com/pydata/xarray/pull/4379#issuecomment-681031704 https://api.github.com/repos/pydata/xarray/issues/4379 MDEyOklzc3VlQ29tbWVudDY4MTAzMTcwNA== max-sixty 5635139 2020-08-26T17:54:07Z 2020-08-26T17:54:07Z MEMBER

Thanks for the PR @darikg !

Re tests failing — is there a chance python interns the object instance? Maybe worth trying with a less primitive object?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Use deepcopy recursively on numpy arrays 686495257

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