home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 398041758 and user = 6628425 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

  • spencerkclark · 5 ✖

issue 1

  • enable internal plotting with cftime datetime · 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
457792344 https://github.com/pydata/xarray/pull/2665#issuecomment-457792344 https://api.github.com/repos/pydata/xarray/issues/2665 MDEyOklzc3VlQ29tbWVudDQ1Nzc5MjM0NA== spencerkclark 6628425 2019-01-26T02:16:58Z 2019-01-26T02:16:58Z MEMBER

I think it would make sense to follow this example, but use cftime.datetime objects instead. You might want to add a test for a 2D plot just to be sure. https://github.com/pydata/xarray/blob/2e99c7dde32e396dd2c5fc6261a2d06217621e10/xarray/tests/test_plot.py#L1797-L1813 Note you'll also need to add nc-time-axis to some CI environments so that things run in some Travis/AppVeyor builds, probably best in: - ci/requirements-py37.yml - ci/requirements-py37-windows.yml

and add some decorators to skip the tests if the needed packages (cftime and nc-time-axis) are not installed. @requires_cftime already exists, but I think you'll have to write your own @requires_nc_time_axis decorator, which you can do, e.g., here: https://github.com/pydata/xarray/blob/2e99c7dde32e396dd2c5fc6261a2d06217621e10/xarray/tests/init.py#L65 Maybe by leaving nc-time-axis out of the py36 test environment (which has cftime) you can use it to test the error message if nc-time-axis is not installed?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  enable internal plotting with cftime datetime 398041758
457592632 https://github.com/pydata/xarray/pull/2665#issuecomment-457592632 https://api.github.com/repos/pydata/xarray/issues/2665 MDEyOklzc3VlQ29tbWVudDQ1NzU5MjYzMg== spencerkclark 6628425 2019-01-25T14:38:35Z 2019-01-25T14:38:35Z MEMBER

@jbusecke SciTools/nc-time-axis#42 has been merged, and a new release has been made (it's already available on conda-forge)! It would be great if you could update this PR to use this latest version of nc-time-axis -- you should no longer need to convert dates to CalendarDateTime objects.

Thanks again @lbdreyer for your help.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  enable internal plotting with cftime datetime 398041758
456902372 https://github.com/pydata/xarray/pull/2665#issuecomment-456902372 https://api.github.com/repos/pydata/xarray/issues/2665 MDEyOklzc3VlQ29tbWVudDQ1NjkwMjM3Mg== spencerkclark 6628425 2019-01-23T17:55:52Z 2019-01-23T17:55:52Z MEMBER

I agree @dcherian; I just pinged the PR again, but if there is no activity there by this time next week, I think we should probably move forward here.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  enable internal plotting with cftime datetime 398041758
453314045 https://github.com/pydata/xarray/pull/2665#issuecomment-453314045 https://api.github.com/repos/pydata/xarray/issues/2665 MDEyOklzc3VlQ29tbWVudDQ1MzMxNDA0NQ== spencerkclark 6628425 2019-01-11T00:16:49Z 2019-01-11T00:38:44Z MEMBER

I pinged the met-office folks about your PR. Hopefully that get's merged.

I appreciate it @jhamman; we'll see what happens there.

Oh shoot, I now remember seeing this. If this will be implemented soon I guess the PR can be discarded.

Or this PR could be amended :). We'd still need to make some changes to xarray along the lines of what you've started on here for the optional import of nc-time-axis, addition of cftime.datetime as a plottable type, and updates to the error messages.

Any chance you would have a quick solution for the pcolormesh plot error (second example in the PR)

CalendarDateTime objects are limited in the operations they support, e.g. >= is not supported, which is used in _infer_interval_breaks, which by default is called in xarray's pcolormesh. So this is one place in xarray where being able to use true cftime.datetime objects would really help. Otherwise you'd need to either wait to convert to CalendarDateTime until just before you passed data to a matplotlib function in xarray, or hack _infer_interval_breaks to make it compatible with input arrays of CalendarDateTime objects by converting to them cftime.datetime and back.

If you're in pinch I think things would work here if you passed infer_intervals=False as an argument to plot: python da2.plot(infer_intervals=False) though in general infer_intervals is used for a reason (see https://github.com/pydata/xarray/issues/781#issuecomment-191546524).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  enable internal plotting with cftime datetime 398041758
453293382 https://github.com/pydata/xarray/pull/2665#issuecomment-453293382 https://api.github.com/repos/pydata/xarray/issues/2665 MDEyOklzc3VlQ29tbWVudDQ1MzI5MzM4Mg== spencerkclark 6628425 2019-01-10T23:09:10Z 2019-01-10T23:09:10Z MEMBER

Note I have a PR open in nc-time-axis, which enables plotting of cftime.datetime objects directly (without having to convert to CalendarDateTime objects). This would make this easier in xarray and elsewhere.

That said, I'm not sure if/when it will be merged, so it probably makes sense to go forward with this approach for now.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  enable internal plotting with cftime datetime 398041758

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