home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 1423114234 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

  • Illviljan 1
  • keewis 1
  • slevang 1

author_association 2

  • MEMBER 2
  • CONTRIBUTOR 1

issue 1

  • `xr.where(..., keep_attrs=True)` overwrites coordinate attributes · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1291969138 https://github.com/pydata/xarray/issues/7220#issuecomment-1291969138 https://api.github.com/repos/pydata/xarray/issues/7220 IC_kwDOAMm_X85NAeJy keewis 14808389 2022-10-26T12:37:01Z 2022-10-26T19:42:42Z MEMBER

see also the suggestions in https://github.com/pydata/xarray/pull/6461#discussion_r1004988864 and https://github.com/pydata/xarray/pull/6461#discussion_r1005023395

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xr.where(..., keep_attrs=True)` overwrites coordinate attributes 1423114234
1291957109 https://github.com/pydata/xarray/issues/7220#issuecomment-1291957109 https://api.github.com/repos/pydata/xarray/issues/7220 IC_kwDOAMm_X85NAbN1 slevang 39069044 2022-10-26T12:26:55Z 2022-10-26T12:26:55Z CONTRIBUTOR

Anything that uses attrs[1] and the _get_all_of_type helper is going to be hard to guarantee the behavior stated in the docstring, which is that we take the attrs of x. If x is a scalar, then _get_all_of_type returns a list of length 2 and attrs[1] ends up being the attrs of y. I think we may want to rework this, will try a few things later today.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xr.where(..., keep_attrs=True)` overwrites coordinate attributes 1423114234
1291515219 https://github.com/pydata/xarray/issues/7220#issuecomment-1291515219 https://api.github.com/repos/pydata/xarray/issues/7220 IC_kwDOAMm_X85M-vVT Illviljan 14371165 2022-10-26T05:18:52Z 2022-10-26T05:18:52Z MEMBER

Original looks like this: ```python

keep the attributes of x, the second parameter, by default to

be consistent with the where method of DataArray and Dataset

keep_attrs = lambda attrs, context: attrs[1] ```

New one looks like this: ```python

keep the attributes of x, the second parameter, by default to

be consistent with the where method of DataArray and Dataset

keep_attrs = lambda attrs, context: getattr(x, "attrs", {}) ```

I notice that the original return attrs[1] for some reason but the new doesn't. I haven't tried but try something like this: python def keep_attrs(attrs, context): attrs_ = getattrs(x, "attrs", {}) if attrs_: return attrs_[1] else: return attrs_ I don't get where the x comes from though, seems scary to get something outside the function scope like this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xr.where(..., keep_attrs=True)` overwrites coordinate attributes 1423114234

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