home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

16 rows where issue = 1261153511 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 8
  • max-sixty 4
  • keewis 3
  • Illviljan 1

author_association 2

  • COLLABORATOR 8
  • MEMBER 8

issue 1

  • Update DataArray.rename + docu · 16 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1187594857 https://github.com/pydata/xarray/pull/6665#issuecomment-1187594857 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85GyUJp Illviljan 14371165 2022-07-18T14:48:17Z 2022-07-18T14:48:17Z MEMBER

Thanks @headtr1ck !

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1159433750 https://github.com/pydata/xarray/pull/6665#issuecomment-1159433750 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85FG44W headtr1ck 43316012 2022-06-18T10:16:46Z 2022-06-18T10:16:46Z COLLABORATOR

I have created https://github.com/pydata/xarray/issues/6704 and tried to copy a summary of this discussion. Feel free to continue the discussion there :)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1154368202 https://github.com/pydata/xarray/pull/6665#issuecomment-1154368202 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85EzkLK max-sixty 5635139 2022-06-13T19:54:41Z 2022-06-13T19:54:41Z MEMBER

Yes great, let's merge this.

And then open another issue on how to procede with rename in light of the index refactor? Great!


Then two main options I see for synthesizing the vars issues: - rename operates on DataArray as described in https://github.com/pydata/xarray/pull/6665#issuecomment-1150810485. Generally I'm less keen on "different types have different semantics", and here a positional arg would mean a DataArray rename, and kwarg would mean var rename. But it does work locally to DataArray quite well. - rename only exists on DataArrays for the name of the DataArray, and we use rename_vars & rename_dims for both DataArrays & Datasets. So Dataset.rename is soft-deprecated.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1153552538 https://github.com/pydata/xarray/pull/6665#issuecomment-1153552538 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85EwdCa headtr1ck 43316012 2022-06-13T07:07:10Z 2022-06-13T07:07:10Z COLLABORATOR

So, how about we leave the current implemention like it is (or merge this PR, it does not really change the core functionality).

And then open another issue on how to procede with rename in light of the index refactor?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1153122466 https://github.com/pydata/xarray/pull/6665#issuecomment-1153122466 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85Eu0Ci headtr1ck 43316012 2022-06-12T10:21:09Z 2022-06-12T10:21:09Z COLLABORATOR

Ok I see. I hereby withdraw my comment that it will be trivial, haha.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 1,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1152983813 https://github.com/pydata/xarray/pull/6665#issuecomment-1152983813 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85EuSMF keewis 14808389 2022-06-11T19:11:15Z 2022-06-11T19:11:15Z MEMBER

Would this also rename the coord associated with the dim?

To decide that we probably need to figure out what the role of a dimension will be after the index refactor. Before the refactor, we needed to rename the dimension coordinate along with the dimension to keep the index, but now that indexes are independent of dimensions it might be fine not to do that.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1152977928 https://github.com/pydata/xarray/pull/6665#issuecomment-1152977928 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85EuQwI max-sixty 5635139 2022-06-11T18:32:14Z 2022-06-11T18:32:14Z MEMBER

@keewis v interesting suggestion — the object name as positional and vars as kwargs.

As I think was mentioned above, one choice is whether a kwarg with the name of the object renames the object. I would worry it's slightly ambiguous. And potentially not additive. WDYT?

a rename_dims method

This could be good. Would this also rename the coord associated with the dim?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1152891482 https://github.com/pydata/xarray/pull/6665#issuecomment-1152891482 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85Et7pa headtr1ck 43316012 2022-06-11T09:53:06Z 2022-06-11T09:53:06Z COLLABORATOR

I will implement a rename_dims method, this should be trivial.

I am not sure about rename_vars: what should this method do with the name of the DataArray? Should it only rename coords or also the name?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1150810485 https://github.com/pydata/xarray/pull/6665#issuecomment-1150810485 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85El_l1 keewis 14808389 2022-06-09T08:10:57Z 2022-06-09T11:32:11Z MEMBER

We do want it to be fluent though, so it can be directly on the DataArray, otherwise you can't do:

I was referring to the concept rather than the method. The idea is that you can refer to the DataArray by positional or by name, and the method takes either a single string or a dict mapping old names to new names, also with a kwargs version (the merging happens with either_dict_or_kwargs). That would mean these all do the same thing: ```python a = xr.DataArray([0, 1, 2], dims="x") a.rename("new") a.rename({None: "new"}) # None is the current name

b = xr.DataArray([0, 1, 2], dims="x", name="b") b.rename("new") b.rename(b="new") # b is the current name

with coords

c = xr.DataArray([0, 1, 2], dims="x", coords={"x": ["a", "b", "c"]}, name="c") c.rename("new", x="y") c.rename(c="new", x="y") c.rename({"c": "new", "x": "y"}) # providing both the dict and the kwargs raises ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1150704268 https://github.com/pydata/xarray/pull/6665#issuecomment-1150704268 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85EllqM headtr1ck 43316012 2022-06-09T05:59:36Z 2022-06-09T05:59:36Z COLLABORATOR

Honestly I am a big fan of functions that are called the same for DataArray and Dataset since this enables workflows on objects that could be either.

A rename_dims method sounds easy to implement. The rename_vars does not sound extremely convincing for DataArray though. Should this rename the array and it's coords?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1150582510 https://github.com/pydata/xarray/pull/6665#issuecomment-1150582510 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85ElH7u max-sixty 5635139 2022-06-09T01:45:57Z 2022-06-09T01:46:07Z MEMBER

in pint-xarray we have the .pint.to method which uses a very similar concept, maybe it is worth copying that for rename?

We do want it to be fluent though, so it can be directly on the DataArray, otherwise you can't do:

python ( da .rename(...) .sum(...) )

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1150469696 https://github.com/pydata/xarray/pull/6665#issuecomment-1150469696 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85EksZA keewis 14808389 2022-06-08T22:17:29Z 2022-06-08T22:17:29Z MEMBER

in pint-xarray we have the .pint.to method which uses a very similar concept, maybe it is worth copying that for rename?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1150438146 https://github.com/pydata/xarray/pull/6665#issuecomment-1150438146 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85EkksC max-sixty 5635139 2022-06-08T21:35:33Z 2022-06-08T21:35:33Z MEMBER

This seems like a nice improvement given the existing state.

I've found the effort to specialize methods (e.g. drop_var vs. drop_sel) has been good, and we might want to extend this principle. With the proposed code: - renaming a coord on a DataArray is rename - renaming a coord on a Dataset is rename_vars

...which is not ideal, though might be the best tradeoff.

WDYT @headtr1ck ? Or any other thoughts from others?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1150260783 https://github.com/pydata/xarray/pull/6665#issuecomment-1150260783 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85Ej5Yv headtr1ck 43316012 2022-06-08T18:37:43Z 2022-06-08T18:37:43Z COLLABORATOR

Now the behavior is the same as before with the only addition that one can rename the DataArray with a positional argument and its cords/dims via kwargs at the same time.

I have added further tests that are a bit more expressive than before.

Should be ready to merge now.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1146881160 https://github.com/pydata/xarray/pull/6665#issuecomment-1146881160 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85EXASI headtr1ck 43316012 2022-06-05T20:49:33Z 2022-06-05T20:49:33Z COLLABORATOR

Now that I think about it... Is it common to have the DataArray being called the same as one of its dimensions/coordinates? This might break some things. So maybe better to revert the last commit that introduced this change?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511
1146880695 https://github.com/pydata/xarray/pull/6665#issuecomment-1146880695 https://api.github.com/repos/pydata/xarray/issues/6665 IC_kwDOAMm_X85EXAK3 headtr1ck 43316012 2022-06-05T20:46:08Z 2022-06-05T20:46:08Z COLLABORATOR

Mow you can also have the name of the DataArray in the rename dict. The code got a bit more complicated, lots of if-branches are slight modifications of each other, probably simplifyable.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Update DataArray.rename + docu 1261153511

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 1761.955ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows