home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "MEMBER" and issue = 922926807 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 1

  • max-sixty 4

issue 1

  • Fix issue tuple as dimension · 4 ✖

author_association 1

  • MEMBER · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
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
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
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 12.624ms · About: xarray-datasette