home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 602218021 and user = 43316012 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

  • headtr1ck · 3 ✖

issue 1

  • Make subclassing easier? · 3 ✖

author_association 1

  • COLLABORATOR 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1449013427 https://github.com/pydata/xarray/issues/3980#issuecomment-1449013427 https://api.github.com/repos/pydata/xarray/issues/3980 IC_kwDOAMm_X85WXjCz headtr1ck 43316012 2023-02-28T22:24:56Z 2023-02-28T22:24:56Z COLLABORATOR

I will not be able to join tomorrow, so here are my thoughts on this topic:

  • How to work with subclassed Datasets that should return DataArrays? I think the pandas approach is good, we add Dataset.dataarray_cls = DataArray and DataArray.dataset_cls = Dataset which subclasses can overwrite.
  • How to deal with subclasses that change the constructor aka. __init__? Probably we need to introduce a kind of shortcut constructor that will be called instead in functions that create new instances (right now the subclass needs the same constructor signature as xarrays version). But then custom instance attributes will not be set etc. Not sure what is the best approach here.
  • Is the whole thing limited to DataArrays and Datasets or can one also subclass Variables?
{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make subclassing easier? 602218021
1345248318 https://github.com/pydata/xarray/issues/3980#issuecomment-1345248318 https://api.github.com/repos/pydata/xarray/issues/3980 IC_kwDOAMm_X85QLtw- headtr1ck 43316012 2022-12-10T11:56:02Z 2022-12-10T11:56:02Z COLLABORATOR

I think we have made good progress to better support this, only requirement is that the __init__ method of the subclass has the same syntax as the original xarray implementation.

Maybe in the future we can relax this as well and use a shortcut internally.

The only thing which probably won't work anytime soon is custom Datasets returning custom DataArrays.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make subclassing easier? 602218021
1345247373 https://github.com/pydata/xarray/issues/3980#issuecomment-1345247373 https://api.github.com/repos/pydata/xarray/issues/3980 IC_kwDOAMm_X85QLtiN headtr1ck 43316012 2022-12-10T11:50:17Z 2022-12-10T11:50:17Z COLLABORATOR

Does xarray have anything like NumPy's dispatch mechanism?

Yes, xarray fully supports this.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Make subclassing easier? 602218021

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