home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

11 rows where issue = 167091064 and user = 4806877 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • jsignell · 11 ✖

issue 1

  • added to_dict function for xarray objects · 11 ✖

author_association 1

  • CONTRIBUTOR 11
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
254304733 https://github.com/pydata/xarray/pull/917#issuecomment-254304733 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDI1NDMwNDczMw== jsignell 4806877 2016-10-17T19:15:16Z 2016-10-17T19:15:16Z CONTRIBUTOR

@shoyer is this something I should be working on? I am happy to, just don't know how this normally goes.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
254226023 https://github.com/pydata/xarray/pull/917#issuecomment-254226023 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDI1NDIyNjAyMw== jsignell 4806877 2016-10-17T14:37:15Z 2016-10-17T14:39:04Z CONTRIBUTOR

@shoyer that makes sense. @kwilcox, so times should be strings if decode_times=False? Should I do a new pull request?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
254220827 https://github.com/pydata/xarray/pull/917#issuecomment-254220827 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDI1NDIyMDgyNw== jsignell 4806877 2016-10-17T14:19:38Z 2016-10-17T14:20:16Z CONTRIBUTOR

@kwilcox, I hadn't thought much about this. I guess the intention was to have only python scalars/lists, but I don't know if we want to get in the business of converting attribute values since there are so many options for what they could be. What do you think makes the most sense?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
239262906 https://github.com/pydata/xarray/pull/917#issuecomment-239262906 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDIzOTI2MjkwNg== jsignell 4806877 2016-08-11T19:18:28Z 2016-08-11T19:18:28Z CONTRIBUTOR

Done!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
239252023 https://github.com/pydata/xarray/pull/917#issuecomment-239252023 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDIzOTI1MjAyMw== jsignell 4806877 2016-08-11T18:40:00Z 2016-08-11T18:40:00Z CONTRIBUTOR

I made the docs locally and they look how I expect.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
239185552 https://github.com/pydata/xarray/pull/917#issuecomment-239185552 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDIzOTE4NTU1Mg== jsignell 4806877 2016-08-11T14:52:52Z 2016-08-11T14:52:52Z CONTRIBUTOR

Ok, so I merged with the current master and added documentation and a what's-new note. I hope I did that right. @shoyer I am really new to contributing so thanks for all your help. Let me know if anything needs changing.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
238386033 https://github.com/pydata/xarray/pull/917#issuecomment-238386033 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDIzODM4NjAzMw== jsignell 4806877 2016-08-08T21:38:46Z 2016-08-08T21:38:46Z CONTRIBUTOR

Ok, I made the little changes. I will start working on the docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
236053258 https://github.com/pydata/xarray/pull/917#issuecomment-236053258 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDIzNjA1MzI1OA== jsignell 4806877 2016-07-28T23:18:45Z 2016-07-28T23:19:00Z CONTRIBUTOR

@shoyer I think I have done all the things that you mentioned and I added DataArray.from_dict().

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
235694195 https://github.com/pydata/xarray/pull/917#issuecomment-235694195 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDIzNTY5NDE5NQ== jsignell 4806877 2016-07-27T19:30:49Z 2016-07-27T19:43:20Z CONTRIBUTOR

Ok, I made the changes that you suggested. I still need to work on the from_dict validation to prompt users to give more specific dicts.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
235575744 https://github.com/pydata/xarray/pull/917#issuecomment-235575744 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDIzNTU3NTc0NA== jsignell 4806877 2016-07-27T12:53:53Z 2016-07-27T14:50:13Z CONTRIBUTOR

Ok, I wrote a Dataset.from_dict class method. I imagine the DataArray one will look pretty similar, so I just wanted to see what you think. The main issue that I see is that time doesn't round trip. I wasn't sure if the user should need to set a parse_date flag with the dim name or something or whether the function should try to convert to time any dim with the string 'time' in it?

``` @classmethod def from_dict(cls, d): """ Convert a dictionary into an xarray.Dataset. """ obj = cls()

    dims=OrderedDict([(k, d['coords'][k]) for k in d['dims']])
    for dim, dim_d in dims.items():
        obj[dim] = (dim_d['dims'], dim_d['data'], dim_d['attrs'])

    for var, var_d in d['data_vars'].items():
        obj[var] = (var_d['dims'], var_d['data'], var_d['attrs'])

    # what it coords aren't dims?
    coords = (set(d['coords'].keys()) - set(d['dims']))
    for coord in coords:
        coord_d = d['coords'][coord]
        obj[coord] = (coord_d['dims'], coord_d['data'], coord_d['attrs'])
    obj = obj.set_coords(coords)

    obj.attrs.update(d['attrs'])

    return(obj)

```

Regarding unit tests, I haven't ever written one before but I would be happy to try (I know they are an important part of good development).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
235606954 https://github.com/pydata/xarray/pull/917#issuecomment-235606954 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDIzNTYwNjk1NA== jsignell 4806877 2016-07-27T14:42:12Z 2016-07-27T14:42:12Z CONTRIBUTOR

Ok, I have committed a first pass at unit tests. I purposefully wrote a failing time test.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064

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