home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where issue = 922926807 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

  • max-sixty 4
  • headtr1ck 3
  • thomashirtz 1

author_association 3

  • MEMBER 4
  • COLLABORATOR 3
  • CONTRIBUTOR 1

issue 1

  • Fix issue tuple as dimension · 8 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1323755762 https://github.com/pydata/xarray/pull/5477#issuecomment-1323755762 https://api.github.com/repos/pydata/xarray/issues/5477 IC_kwDOAMm_X85O5ujy headtr1ck 43316012 2022-11-22T14:22:33Z 2022-11-22T14:22:33Z COLLABORATOR

Yes exactly, that would be the intended way of working with dimensions/variables that are iterablea themself, like tuples.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix issue tuple as dimension 922926807
1323708057 https://github.com/pydata/xarray/pull/5477#issuecomment-1323708057 https://api.github.com/repos/pydata/xarray/issues/5477 IC_kwDOAMm_X85O5i6Z max-sixty 5635139 2022-11-22T13:49:45Z 2022-11-22T13:49:45Z MEMBER

I would say that a tuple is fine, it IS an iterable of hashable ;)

Sorry, yes, I was unclear above!

How should we handle dimensions which are themselves tuples? (i.e. a really unlikely corner-case, but one that IIRC inspired some of the discussion in https://github.com/pydata/xarray/issues/4821)

My thought was to interpret a tuple as an iterable of dimensions. If we have a dimension name of a tuple, then that requires passing within an Iterable — i.e. the method(dim=[('a','b')]). Since the mypy changes around str | Iterable[Hashable], this seems better than the options I enumerated at https://github.com/pydata/xarray/issues/4821#issuecomment-766166088.

Does that make sense? V possible my writing and / or thinking is still not clear!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix issue tuple as dimension 922926807
1323694111 https://github.com/pydata/xarray/pull/5477#issuecomment-1323694111 https://api.github.com/repos/pydata/xarray/issues/5477 IC_kwDOAMm_X85O5fgf headtr1ck 43316012 2022-11-22T13:39:11Z 2022-11-22T13:39:11Z COLLABORATOR

So we'd keep str | Iterable[Hashable], and still raise an error if a tuple was passed directly (i.e. method(dim=('a','b'))

I would say that a tuple is fine, it IS an iterable of hashable ;)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix issue tuple as dimension 922926807
1323638086 https://github.com/pydata/xarray/pull/5477#issuecomment-1323638086 https://api.github.com/repos/pydata/xarray/issues/5477 IC_kwDOAMm_X85O5R1G max-sixty 5635139 2022-11-22T12:56:20Z 2022-11-22T12:56:20Z MEMBER

I think this should be also aligned with str | Iterable[Hashable], so maybe str | DataArray | Iterable[Hashable | DataArray]?

Good point...

IIUC (and it's been a while since I thought through this properly), this would support allowing tuples as dimension names, but forcing them to be passed within an iterable to methods (e.g.method(dim=[('a','b')]) for a dimension named ('a', 'b'). So we'd keep str | Iterable[Hashable], and still raise an error if a tuple was passed directly (i.e. method(dim=('a','b'))

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix issue tuple as dimension 922926807
1322745490 https://github.com/pydata/xarray/pull/5477#issuecomment-1322745490 https://api.github.com/repos/pydata/xarray/issues/5477 IC_kwDOAMm_X85O136S headtr1ck 43316012 2022-11-21T22:37:09Z 2022-11-21T22:37:09Z COLLABORATOR

I think this should be also aligned with str | Iterable[Hashable], so maybe str | DataArray | Iterable[Hashable | DataArray]? And then reverse the isinstance checks (do not capture tuple and list explicitly, but str).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix issue tuple as dimension 922926807
1121402549 https://github.com/pydata/xarray/pull/5477#issuecomment-1121402549 https://api.github.com/repos/pydata/xarray/issues/5477 IC_kwDOAMm_X85C1z61 thomashirtz 37740986 2022-05-09T17:53:56Z 2022-05-09T17:53:56Z CONTRIBUTOR

I would like to continue to contribute to xarray, unfortunately I have many important matters theses days. I may contribute again from end of summer. If someone wants to tackle this issue until then, he can

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix issue tuple as dimension 922926807
1115433428 https://github.com/pydata/xarray/pull/5477#issuecomment-1115433428 https://api.github.com/repos/pydata/xarray/issues/5477 IC_kwDOAMm_X85CfCnU max-sixty 5635139 2022-05-02T22:30:19Z 2022-05-02T22:30:19Z MEMBER

This was quite close @thomashirtz — let me know if you'd be up for finishing it off. Thanks

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix issue tuple as dimension 922926807
864225970 https://github.com/pydata/xarray/pull/5477#issuecomment-864225970 https://api.github.com/repos/pydata/xarray/issues/5477 MDEyOklzc3VlQ29tbWVudDg2NDIyNTk3MA== max-sixty 5635139 2021-06-18T19:09:26Z 2021-06-18T19:09:26Z MEMBER

This looks good!

The one corner case I'm not sure this handles is when there is actually a tuple dimension. If that's correct, could we add a test for that case, and maybe here check that it's a tuple and it's not in the dimensions?

The code xr.Dataset({"a": ([("a", "b")], [1])}) does not error yet.

Great, tbc we want that construction to pass — we're saying it's allowable to have tuples as dimension names (while not encouraging it!)

Thanks @thomashirtz

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Fix issue tuple as dimension 922926807

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