home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where author_association = "MEMBER", issue = 217287113 and user = 1217238 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 1

  • shoyer · 5 ✖

issue 1

  • If join='exact', raise an error for non-aligned objects · 5 ✖

author_association 1

  • MEMBER · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
305052905 https://github.com/pydata/xarray/pull/1330#issuecomment-305052905 https://api.github.com/repos/pydata/xarray/issues/1330 MDEyOklzc3VlQ29tbWVudDMwNTA1MjkwNQ== shoyer 1217238 2017-05-31T01:09:12Z 2017-05-31T01:09:12Z MEMBER

In it goes! Thanks everyone for your feedback.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  If join='exact', raise an error for non-aligned objects 217287113
303858492 https://github.com/pydata/xarray/pull/1330#issuecomment-303858492 https://api.github.com/repos/pydata/xarray/issues/1330 MDEyOklzc3VlQ29tbWVudDMwMzg1ODQ5Mg== shoyer 1217238 2017-05-24T21:35:13Z 2017-05-24T21:35:13Z MEMBER

I switched from AlignmentError -> ValueError. We can always add an AlignmentError later subclassing from ValueError if we want it.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  If join='exact', raise an error for non-aligned objects 217287113
302711852 https://github.com/pydata/xarray/pull/1330#issuecomment-302711852 https://api.github.com/repos/pydata/xarray/issues/1330 MDEyOklzc3VlQ29tbWVudDMwMjcxMTg1Mg== shoyer 1217238 2017-05-19T14:05:12Z 2017-05-19T14:05:12Z MEMBER

Does align='exact' require the indices to be be compared value by value?

Yes, it does. It checks indexes for equality, and if they don't match it raises an error (rather than aligning).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  If join='exact', raise an error for non-aligned objects 217287113
290576826 https://github.com/pydata/xarray/pull/1330#issuecomment-290576826 https://api.github.com/repos/pydata/xarray/issues/1330 MDEyOklzc3VlQ29tbWVudDI5MDU3NjgyNg== shoyer 1217238 2017-03-30T23:49:21Z 2017-03-30T23:49:21Z MEMBER

Is it worth introducing custom exception types into xarray?

My thought is that custom exception types make sense when the exception is effectively part of the API, though possibly it would make sense to have AlignmentError inherit from ValueError.

For example, the first part of a utility function my_custom_align might involve something like: def is_aligned(*objects): try: xarray.align(*objects, join='exact') except AlignmentError: return False else: return True (actually, perhaps we should write is_aligned ourselves!)

Or to log potential performance issues: def align_but_log(*objects): try: aligned = xarray.align(*objects, join='exact') except AlignmentError: logging.warning('objects were not aligned') aligned = xarray.align(*objects) return aligned

Otherwise you'll probably want to change some others to AlignmentError for consistency.

I actually think every operation that automatically aligns already goes through xarray.align. Though it's probably worth double checking...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  If join='exact', raise an error for non-aligned objects 217287113
290567817 https://github.com/pydata/xarray/pull/1330#issuecomment-290567817 https://api.github.com/repos/pydata/xarray/issues/1330 MDEyOklzc3VlQ29tbWVudDI5MDU2NzgxNw== shoyer 1217238 2017-03-30T22:53:18Z 2017-03-30T22:53:18Z MEMBER

@pydata/xarray Any thoughts on this feature? Does it seem useful to you? Does the name join='exact' make sense?

{
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  If join='exact', raise an error for non-aligned objects 217287113

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