home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where author_association = "MEMBER" and issue = 896002237 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • keewis 4
  • shoyer 3

issue 1

  • prefer the objects _repr_inline_ over xarray's custom reprs · 7 ✖

author_association 1

  • MEMBER · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
848019023 https://github.com/pydata/xarray/pull/5352#issuecomment-848019023 https://api.github.com/repos/pydata/xarray/issues/5352 MDEyOklzc3VlQ29tbWVudDg0ODAxOTAyMw== shoyer 1217238 2021-05-25T16:18:57Z 2021-05-25T16:18:57Z MEMBER

in any case, I think any changes to the signature of _repr_inline_ should be a separate PR

I agree, let's discuss this in https://github.com/pydata/xarray/issues/5372

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  prefer the objects _repr_inline_ over xarray's custom reprs 896002237
847428959 https://github.com/pydata/xarray/pull/5352#issuecomment-847428959 https://api.github.com/repos/pydata/xarray/issues/5352 MDEyOklzc3VlQ29tbWVudDg0NzQyODk1OQ== keewis 14808389 2021-05-24T23:57:14Z 2021-05-24T23:57:14Z MEMBER

in any case, I think any changes to the signature of _repr_inline_ should be a separate PR

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  prefer the objects _repr_inline_ over xarray's custom reprs 896002237
847428630 https://github.com/pydata/xarray/pull/5352#issuecomment-847428630 https://api.github.com/repos/pydata/xarray/issues/5352 MDEyOklzc3VlQ29tbWVudDg0NzQyODYzMA== keewis 14808389 2021-05-24T23:56:12Z 2021-05-24T23:56:12Z MEMBER

I see your points. I chose the name as _repr_inline_ because that seemed the most straight-forward but didn't think too deeply about this. If we do change the name I would like to keep the name as _repr_*_. Maybe _repr_array_inline_?

However, as I said I don't think it matters if the name is reused in a different context, as long as that is not incompatible with our use: we only care about arrays. Which is why I would slightly prefer the second alternative (a generic name and a parameter which is interpreted depending on the context). The only issue I have is that it's usually not a good idea to extend the API unless there's a specific need so I'm somewhat reluctant to add that parameter.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  prefer the objects _repr_inline_ over xarray's custom reprs 896002237
846454152 https://github.com/pydata/xarray/pull/5352#issuecomment-846454152 https://api.github.com/repos/pydata/xarray/issues/5352 MDEyOklzc3VlQ29tbWVudDg0NjQ1NDE1Mg== shoyer 1217238 2021-05-22T19:36:07Z 2021-05-22T19:36:07Z MEMBER

It's more that _repr_inline_ sounds very generic, neither really specific to xarray or even multi-dimensional arrays. So if I saw that without knowing the context of how it is used in xarray, it would surprise me that it's supposed to omit shape and dtype, which are otherwise essential parts of the repr.

Other possibilities: - Give the protocol a namespace, like _xarray_repr_inline_ to make it clearer that it's for Xarray's use. - Maybe add an omit argument, e.g., obj._repr_inline_(max_width, skip=['dtype', 'shape']). Attributes in skip are already represented elsewhere and can be skipped if desired.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  prefer the objects _repr_inline_ over xarray's custom reprs 896002237
846407568 https://github.com/pydata/xarray/pull/5352#issuecomment-846407568 https://api.github.com/repos/pydata/xarray/issues/5352 MDEyOklzc3VlQ29tbWVudDg0NjQwNzU2OA== keewis 14808389 2021-05-22T13:20:53Z 2021-05-22T13:20:53Z MEMBER

hmm... adding shape and dtype as parameters would mean that we expect cases where we actually want to include either of those and where the normal repr is not enough. Do you have anything in mind for that?

I'm also not quite sure I get your point about the name: xarray currently does not allow wrapping anything other than duck arrays so I'm inclined to just not worry about this until that changes or someone else wants to use that name for a different purpose.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  prefer the objects _repr_inline_ over xarray's custom reprs 896002237
846075001 https://github.com/pydata/xarray/pull/5352#issuecomment-846075001 https://api.github.com/repos/pydata/xarray/issues/5352 MDEyOklzc3VlQ29tbWVudDg0NjA3NTAwMQ== shoyer 1217238 2021-05-21T16:16:09Z 2021-05-21T16:16:09Z MEMBER

I wonder if _repr_inline_ should include something explicit about excluded fields in the protocol, e.g., obj._repr_inline_(shape=False, dtype=False) and/or if the name should make it clearer that it's for array objects, e.g., _ndarray_repr_inline_?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  prefer the objects _repr_inline_ over xarray's custom reprs 896002237
845550550 https://github.com/pydata/xarray/pull/5352#issuecomment-845550550 https://api.github.com/repos/pydata/xarray/issues/5352 MDEyOklzc3VlQ29tbWVudDg0NTU1MDU1MA== keewis 14808389 2021-05-20T23:36:12Z 2021-05-20T23:36:12Z MEMBER

I don't think we need tests (or a whats-new) for this so this should be ready for merging. The only issue notable change I think users can see is that when (if?) dask accepts the _repr_inline_, they will probably use chunktype instead of meta (because that's what their repr uses).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  prefer the objects _repr_inline_ over xarray's custom reprs 896002237

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