home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "CONTRIBUTOR" and issue = 520110180 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

  • juseg 4

issue 1

  • Add option to choose mfdataset attributes source. · 4 ✖

author_association 1

  • CONTRIBUTOR · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
565714909 https://github.com/pydata/xarray/pull/3498#issuecomment-565714909 https://api.github.com/repos/pydata/xarray/issues/3498 MDEyOklzc3VlQ29tbWVudDU2NTcxNDkwOQ== juseg 1186928 2019-12-14T13:00:28Z 2019-12-14T13:00:28Z CONTRIBUTOR

@TomNicholas I've had a closer look at the code. Nested lists of file paths are processed by:

https://github.com/pydata/xarray/blob/f2b2f9f62ea0f1020262a7ff563bfe74258ffaa1/xarray/backends/api.py#L881-L882

Using the method defined in:

https://github.com/pydata/xarray/blob/f2b2f9f62ea0f1020262a7ff563bfe74258ffaa1/xarray/core/combine.py#L15-L46

In Python 3.7+ the list of paths is essentially flattened list e.g.:

```

import xarray as xr paths = [list('abc'), list('def')] list(xr.core.combine._infer_concat_order_from_positions(paths).values()) ['a', 'b', 'c', 'd', 'e', 'f'] `` Unfortunately the current code uses a dictionary which means that in Python 3.6- the order is not guaranteed preserved. This also implies that the current default0` is not well defined in case of nested lists.

https://github.com/pydata/xarray/blob/f2b2f9f62ea0f1020262a7ff563bfe74258ffaa1/xarray/backends/api.py#L900 https://github.com/pydata/xarray/blob/f2b2f9f62ea0f1020262a7ff563bfe74258ffaa1/xarray/backends/api.py#L964

On the other hands the ids are essentially ND indexes that could perhaps be used...

```

list(xr.core.combine._infer_concat_order_from_positions(paths).keys()) [(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2)] ```

Or should we just stick to file paths as you suggest? And leave the default as is (e.g. ambiguous for Python 3.6-)?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option to choose mfdataset attributes source. 520110180
565555318 https://github.com/pydata/xarray/pull/3498#issuecomment-565555318 https://api.github.com/repos/pydata/xarray/issues/3498 MDEyOklzc3VlQ29tbWVudDU2NTU1NTMxOA== juseg 1186928 2019-12-13T18:31:09Z 2019-12-13T18:31:09Z CONTRIBUTOR

@TomNicholas Thanks for bringing the discussion live again! I'm not sure what happens in those cases, but I'm confident the default behaviour is unchanged, i.e. the attributes file is 0, whatever that 0 means (see my first commit).

If this is an issue I would suggest to discuss in a separate thread, as I think it is independent from my changes. On the other hand I am eager to keep the file number option because (1) attrs_file=-1 is the behaviour that I need (to ensure that history is always preserved) and (2) attrs_file=0 is the current behaviour (again, whatever that means for nested lists).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option to choose mfdataset attributes source. 520110180
554001471 https://github.com/pydata/xarray/pull/3498#issuecomment-554001471 https://api.github.com/repos/pydata/xarray/issues/3498 MDEyOklzc3VlQ29tbWVudDU1NDAwMTQ3MQ== juseg 1186928 2019-11-14T17:49:29Z 2019-11-14T17:49:29Z CONTRIBUTOR

This will add a new kwarg in open_mfdataset. The current name is attrs_file, defaulting to 0 (current behaviour). Or? Suggestions welcome.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option to choose mfdataset attributes source. 520110180
552398274 https://github.com/pydata/xarray/pull/3498#issuecomment-552398274 https://api.github.com/repos/pydata/xarray/issues/3498 MDEyOklzc3VlQ29tbWVudDU1MjM5ODI3NA== juseg 1186928 2019-11-11T11:05:52Z 2019-11-11T11:05:52Z CONTRIBUTOR

I think I'm done. Can someone look at it? The master_file keyword argument is borrowed from NetCDF (see #2382 and Unidata/netcdf4-python#835), although xarray's mechanism is independant.

The default is 0, which is consistent with current xarray behaviour. When concatenating model output in time it would be more logical to use -1, i.e. preserve history of the last file.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add option to choose mfdataset attributes source. 520110180

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