home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 1579956621 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

  • headtr1ck 3
  • jhamman 1
  • dcherian 1
  • derhintze 1

author_association 3

  • COLLABORATOR 3
  • MEMBER 2
  • NONE 1

issue 1

  • Selecting variables from Dataset with view on dict keys is of type DataArray · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1449430920 https://github.com/pydata/xarray/issues/7519#issuecomment-1449430920 https://api.github.com/repos/pydata/xarray/issues/7519 IC_kwDOAMm_X85WZI-I headtr1ck 43316012 2023-03-01T06:34:48Z 2023-03-01T06:35:08Z COLLABORATOR

Should we special case a solution? Seems user-friendly to do so.

I think dict_keys is its own type so with some type ignore this could work.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Selecting variables from Dataset with view on dict keys is of type DataArray 1579956621
1449078217 https://github.com/pydata/xarray/issues/7519#issuecomment-1449078217 https://api.github.com/repos/pydata/xarray/issues/7519 IC_kwDOAMm_X85WXy3J dcherian 2448579 2023-02-28T23:22:22Z 2023-02-28T23:22:22Z MEMBER

Should we special case a solution? Seems user-friendly to do so.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Selecting variables from Dataset with view on dict keys is of type DataArray 1579956621
1426262335 https://github.com/pydata/xarray/issues/7519#issuecomment-1426262335 https://api.github.com/repos/pydata/xarray/issues/7519 IC_kwDOAMm_X85VAwk_ headtr1ck 43316012 2023-02-10T19:48:25Z 2023-02-10T19:48:25Z COLLABORATOR

See https://github.com/python/mypy/issues/14674

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Selecting variables from Dataset with view on dict keys is of type DataArray 1579956621
1426254152 https://github.com/pydata/xarray/issues/7519#issuecomment-1426254152 https://api.github.com/repos/pydata/xarray/issues/7519 IC_kwDOAMm_X85VAulI headtr1ck 43316012 2023-02-10T19:39:39Z 2023-02-10T19:39:39Z COLLABORATOR

Thats a weird issue. I don't think we are at fault here, since apparently mypy thinks that dict_keys is Hashable (and pylance as well).

def f(a: Hashable) -> int pass f({}.keys()) # does not raise an error

I guess I will raise an issue over at mypy, but probably they will simply claim that Hashable support is not good yet...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Selecting variables from Dataset with view on dict keys is of type DataArray 1579956621
1426097606 https://github.com/pydata/xarray/issues/7519#issuecomment-1426097606 https://api.github.com/repos/pydata/xarray/issues/7519 IC_kwDOAMm_X85VAIXG derhintze 25172489 2023-02-10T17:07:25Z 2023-02-10T17:07:25Z NONE

The only obvious difference being that one overload annotates self, while the other doesn't. But apart from this, the annotations look straightforward (and correct) to me.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Selecting variables from Dataset with view on dict keys is of type DataArray 1579956621
1426084810 https://github.com/pydata/xarray/issues/7519#issuecomment-1426084810 https://api.github.com/repos/pydata/xarray/issues/7519 IC_kwDOAMm_X85VAFPK jhamman 2443309 2023-02-10T16:57:54Z 2023-02-10T16:57:54Z MEMBER

Thanks for the report @derhintze. I agree this seems like a bug. I'm a bit confused by this actually. Our __getitem__ implementation is here:

https://github.com/pydata/xarray/blob/7683442774c8036e0b13851df62bda067b2a65d5/xarray/core/dataset.py#L1418-L1441

and the keys view of a dataset is not hashable:

python isinstance(d.keys(), typing.Hashable) False

Which should be triggering the second @overload in the code above. So I'm not sure what's going on!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Selecting variables from Dataset with view on dict keys is of type DataArray 1579956621

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