home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

11 rows where issue = 1659078413 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 2

  • jmccreight 8
  • dcherian 3

author_association 2

  • CONTRIBUTOR 8
  • MEMBER 3

issue 1

  • `ds.to_dict` with data as arrays, not lists · 11 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1527648649 https://github.com/pydata/xarray/pull/7739#issuecomment-1527648649 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85bDhGJ dcherian 2448579 2023-04-28T14:22:58Z 2023-04-28T14:22:58Z MEMBER

Thanks @jmccreight great work!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413
1515142339 https://github.com/pydata/xarray/pull/7739#issuecomment-1515142339 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85aTzzD jmccreight 12465248 2023-04-19T17:55:16Z 2023-04-19T17:55:16Z CONTRIBUTOR

I followed data = True / False / "array" / "list"

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413
1514762927 https://github.com/pydata/xarray/pull/7739#issuecomment-1514762927 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85aSXKv dcherian 2448579 2023-04-19T13:44:10Z 2023-04-19T13:44:10Z MEMBER

what about instead of adding another kwarg, you could use data = True / False / "numpy"?

Oh yeah, I like this. Only suggestion is data = True / False / "array" / "list" where True and "list" are synonymous.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413
1514700581 https://github.com/pydata/xarray/pull/7739#issuecomment-1514700581 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85aSH8l jmccreight 12465248 2023-04-19T13:04:19Z 2023-04-19T13:04:19Z CONTRIBUTOR

Making all the requested changes, the above should resolve momentarily.

I like this "trick"/suggestion:

And a design question/suggestion: what about instead of adding another kwarg, you could use data = True / False / "numpy"?

I will implement this if we are in agreement with @dcherian

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413
1513865565 https://github.com/pydata/xarray/pull/7739#issuecomment-1513865565 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85aO8Fd dcherian 2448579 2023-04-18T22:28:07Z 2023-04-18T22:28:07Z MEMBER

Copying my comment from https://github.com/pydata/xarray/issues/1599#issuecomment-1504276696

Perhaps we should have array_to_list: bool instead. If False, we just preserve the underlying array type. Then the user could do ds.as_numpy().to_dict(array_to_list=False) to always get numpy arrays as #7739

array_data or data_as_array could be other options

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413
1511459288 https://github.com/pydata/xarray/pull/7739#issuecomment-1511459288 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85aFwnY jmccreight 12465248 2023-04-17T14:22:50Z 2023-04-17T14:22:50Z CONTRIBUTOR

I'm happy to "fix" the mypy issues, but it's on that I suspect might be requested for changes (if I recall correctly, it's just in the tests)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413
1504309371 https://github.com/pydata/xarray/pull/7739#issuecomment-1504309371 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85ZqfB7 jmccreight 12465248 2023-04-12T00:13:03Z 2023-04-12T00:13:03Z CONTRIBUTOR

i kinda implied, but I'll just state that the extra code to test equality of encodings is not handsome.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413
1504297701 https://github.com/pydata/xarray/pull/7739#issuecomment-1504297701 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85ZqcLl jmccreight 12465248 2023-04-12T00:03:23Z 2023-04-12T00:03:23Z CONTRIBUTOR

@dcherian thanks! I didnt incoroprate any suggestions yet. regarding the inequality of encodings of datasets is obscured by assert_identical(a, b) not evaluating encodings. it seems like it should have an option to also check encodings (or not).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413
1504241169 https://github.com/pydata/xarray/pull/7739#issuecomment-1504241169 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85ZqOYR jmccreight 12465248 2023-04-11T23:09:57Z 2023-04-11T23:09:57Z CONTRIBUTOR

In the off-hand chance this is reviewed before I push again, do not merge. I have a fix to encodings not getting properly roundtripped in Ds.from_dict(ds.to_dict). it was minor to fix but making sure it's tested will take a min

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413
1500720650 https://github.com/pydata/xarray/pull/7739#issuecomment-1500720650 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85Zcy4K jmccreight 12465248 2023-04-07T23:27:25Z 2023-04-07T23:27:25Z CONTRIBUTOR

I solved the mypy errors in a highly dubious way. 👀

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413
1500558818 https://github.com/pydata/xarray/pull/7739#issuecomment-1500558818 https://api.github.com/repos/pydata/xarray/issues/7739 IC_kwDOAMm_X85ZcLXi jmccreight 12465248 2023-04-07T19:07:35Z 2023-04-07T19:07:35Z CONTRIBUTOR

I would appreciate any edification on the Mypy failures. Looking at the indicated lines, i'm 🤷 .

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `ds.to_dict` with data as arrays, not lists 1659078413

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