home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "MEMBER", issue = 694448177 and user = 1217238 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

These facets timed out: author_association

user 1

  • shoyer · 3 ✖

issue 1

  • Keep the original ordering of the coordinates · 3 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
691217305 https://github.com/pydata/xarray/pull/4409#issuecomment-691217305 https://api.github.com/repos/pydata/xarray/issues/4409 MDEyOklzc3VlQ29tbWVudDY5MTIxNzMwNQ== shoyer 1217238 2020-09-11T17:20:06Z 2020-09-11T17:20:06Z MEMBER

One way to fix this is to iterate over variables instead of _coord_names, e.g., instead of: python for k in self._coord_names: ... use: python for k in self._variables: if k in self._coord_names: ...

I believe we already use this trick in a few places for exactly this reason.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Keep the original ordering of the coordinates 694448177
691181491 https://github.com/pydata/xarray/pull/4409#issuecomment-691181491 https://api.github.com/repos/pydata/xarray/issues/4409 MDEyOklzc3VlQ29tbWVudDY5MTE4MTQ5MQ== shoyer 1217238 2020-09-11T16:03:59Z 2020-09-11T16:03:59Z MEMBER

OK, my guess is that this is happening because there is someplace where we iterate over a Python set (which has a non-deterministic order based on hashing) rather than a Python dict. If we can nail down where that is happening we should remove it!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Keep the original ordering of the coordinates 694448177
690879736 https://github.com/pydata/xarray/pull/4409#issuecomment-690879736 https://api.github.com/repos/pydata/xarray/issues/4409 MDEyOklzc3VlQ29tbWVudDY5MDg3OTczNg== shoyer 1217238 2020-09-11T05:18:02Z 2020-09-11T05:18:02Z MEMBER

Can you give an example of a non-deterministic coordinate order? That sounds surprising to me, given that on Python 3.6+ dictionaries preserve insertion order.

My preference would be not to sort mappings automatically, either in __init__ or when formatting. I think users find it a little more intuitive to preserve the order of dict keys.

It's true that this is only a guarantee on Python 3.7+, but both CPython 3.6 and all versions of pypy 3 preserve dict insertion order, so in practice we can pretty much always guarantee this. (And soon, Python 3.7 will be required for xarray.)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Keep the original ordering of the coordinates 694448177

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