home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 365367839 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • shoyer 1
  • jacobtomlinson 1
  • jhamman 1
  • DPeterK 1

author_association 3

  • MEMBER 2
  • CONTRIBUTOR 1
  • NONE 1

issue 1

  • Add 'to_iris' and 'from_iris' to methods Dataset · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
456766782 https://github.com/pydata/xarray/pull/2449#issuecomment-456766782 https://api.github.com/repos/pydata/xarray/issues/2449 MDEyOklzc3VlQ29tbWVudDQ1Njc2Njc4Mg== DPeterK 3473068 2019-01-23T11:24:49Z 2019-01-23T11:24:49Z NONE

Apologies about adding my thoughts after a bit of a gap on here...

My only hesitation here is on the name

I like the to_iris and from_iris method names suggested here. They're consistent with existing functionality available for DataArray, and I think it's reasonable to expect that as DataArrays map to cubes, so also for Datasets and CubeLists. As it's possible for both Datasets and CubeLists to contain only a single object there could be some extra logic to return a DataArray or cube respectively in such a case, but I think that would add needless complexity as it's not hard from a user perspective to get back to the single item from the Dataset or CubeList.

We have some special logic already for figuring out names in DataArray.from_iris

Does this logic include handling multiple cubes of the same name in a single CubeList? Iris will quite happily handle this, but I guess the name:DataArray mapping in Xarray requires unique names. For example:

```python

names = [c.name() for c in cubes] print(names) ['air_pressure', 'air_pressure', 'air_pressure_at_sea_level', 'air_temperature', 'air_temperature', 'air_temperature', 'air_temperature', 'air_temperature', 'dew_point_temperature', 'geopotential_height', 'relative_humidity', 'relative_humidity', 'specific_humidity', 'surface_air_pressure', 'upward_air_velocity', 'x_wind', 'x_wind', 'x_wind', 'y_wind', 'y_wind', 'y_wind'] ```

The differences between these cubes is one or more of: * one cube describes the phenomenon at the surface, and * another cube the phenomenon on height or pressure levels, or * another cube describes the phenomenon after statistical processing, and so on.

If such a case isn't currently handled, it could be handled by using this differing metadata to modify the name used for the key; for example air_temperature --> air_temperature__maximum_1_hr – so long as returning to a CubeList will also return the names to their originals.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add 'to_iris' and 'from_iris' to methods Dataset 365367839
436018235 https://github.com/pydata/xarray/pull/2449#issuecomment-436018235 https://api.github.com/repos/pydata/xarray/issues/2449 MDEyOklzc3VlQ29tbWVudDQzNjAxODIzNQ== jhamman 2443309 2018-11-05T20:11:23Z 2018-11-05T20:11:23Z MEMBER

I wonder if we can get @pelson to weigh in here. Like @shoyer said, whatever the Iris users think makes most sense for the naming of these methods is fine by me.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add 'to_iris' and 'from_iris' to methods Dataset 365367839
427554497 https://github.com/pydata/xarray/pull/2449#issuecomment-427554497 https://api.github.com/repos/pydata/xarray/issues/2449 MDEyOklzc3VlQ29tbWVudDQyNzU1NDQ5Nw== shoyer 1217238 2018-10-06T07:49:55Z 2018-10-06T07:49:55Z MEMBER

I'm happy to defer to Iris users (like you) on what they would expect for converting to/from an xarray.Dataset.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add 'to_iris' and 'from_iris' to methods Dataset 365367839
426377254 https://github.com/pydata/xarray/pull/2449#issuecomment-426377254 https://api.github.com/repos/pydata/xarray/issues/2449 MDEyOklzc3VlQ29tbWVudDQyNjM3NzI1NA== jacobtomlinson 1610850 2018-10-02T18:15:28Z 2018-10-02T18:15:28Z CONTRIBUTOR

Thanks for the feedback.

I think when working in iris that you expect multiple cubes to be returned as a cube list. Also when calling iris.load you expect a cubelist.

I would propose that to_iris is fine, however if you feel strongly I would be happy to change it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add 'to_iris' and 'from_iris' to methods Dataset 365367839

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