home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • dnowacki-usgs 10

issue 1

  • Recreate @gajomi's #2070 to keep attrs when calling astype() · 10 ✖

author_association 1

  • CONTRIBUTOR · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
676579147 https://github.com/pydata/xarray/pull/4314#issuecomment-676579147 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3NjU3OTE0Nw== dnowacki-usgs 13837821 2020-08-19T18:08:12Z 2020-08-19T18:09:33Z CONTRIBUTOR

Ah, I see, merge instead of rebase. I'll try that next time.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
676571966 https://github.com/pydata/xarray/pull/4314#issuecomment-676571966 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3NjU3MTk2Ng== dnowacki-usgs 13837821 2020-08-19T17:53:14Z 2020-08-19T17:53:55Z CONTRIBUTOR

Ugh, sorry about that. I'm following the instructions in contributing to xarray. It's a fetch/rebase. Happy to do it another way if there is a better practice. Thanks.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
676548419 https://github.com/pydata/xarray/pull/4314#issuecomment-676548419 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3NjU0ODQxOQ== dnowacki-usgs 13837821 2020-08-19T17:05:33Z 2020-08-19T17:06:29Z CONTRIBUTOR

Updated the try/except following @keewis's lead. Also sparse 0.11.0 has been released so I was able to check that the warning is correctly issued for 0.10.0, then I upgraded, and the warning is no longer issued (and sparse doesn't choke on the casting kwarg).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
674191679 https://github.com/pydata/xarray/pull/4314#issuecomment-674191679 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3NDE5MTY3OQ== dnowacki-usgs 13837821 2020-08-14T17:52:52Z 2020-08-14T17:52:52Z CONTRIBUTOR

Thanks for the review @dcherian. I modified the tests as suggested and added some docstring updates. Let me know what you think.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
673640237 https://github.com/pydata/xarray/pull/4314#issuecomment-673640237 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3MzY0MDIzNw== dnowacki-usgs 13837821 2020-08-13T18:29:48Z 2020-08-13T18:29:48Z CONTRIBUTOR

Did a fetch and rebase, not sure why commits from other PRs added to master in the meantime show up in this one 🤷

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
672129254 https://github.com/pydata/xarray/pull/4314#issuecomment-672129254 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3MjEyOTI1NA== dnowacki-usgs 13837821 2020-08-11T17:46:30Z 2020-08-11T17:46:30Z CONTRIBUTOR

I think(?) the pep warnings are from the commits @max-sixty pushed several days ago during testing

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
670769708 https://github.com/pydata/xarray/pull/4314#issuecomment-670769708 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3MDc2OTcwOA== dnowacki-usgs 13837821 2020-08-07T22:32:10Z 2020-08-07T22:32:10Z CONTRIBUTOR

Maybe I am overcomplicating things but I came up with this solution:

Catch the error. If it is the unallowed casting kwarg error, and we are dealing with a sparse array, pop the casting kwarg and issue a RuntimeWarning that we are doing so. Otherwise, raise the original error since it might be something else non-sparse related.

Does that seem reasonable?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
670197090 https://github.com/pydata/xarray/pull/4314#issuecomment-670197090 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3MDE5NzA5MA== dnowacki-usgs 13837821 2020-08-06T21:18:40Z 2020-08-06T21:18:40Z CONTRIBUTOR

My solution of try/except and popping casting from kwargs felt a bit kludgey, so I'm definitely open to other ideas. Letting it raise and xfailing the test would mean that we can no longer perform astype on sparse arrays until a new sparse version is released in the future. Though I suppose that would depends on the next xarray vs sparse release timeline.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
670148385 https://github.com/pydata/xarray/pull/4314#issuecomment-670148385 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY3MDE0ODM4NQ== dnowacki-usgs 13837821 2020-08-06T19:26:48Z 2020-08-06T19:26:48Z CONTRIBUTOR

Nice! Thanks a million @dcherian for raising that issue over at sparse.

@max-sixty regarding the minimum version, it seems like sparse has a relatively infrequent release cycle (many months) so it could be a while before we have a minimum version to require. Could we check whether we are dealing with a sparse array and call the numpy method instead for that use case, until sparse supports it?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961
669599057 https://github.com/pydata/xarray/pull/4314#issuecomment-669599057 https://api.github.com/repos/pydata/xarray/issues/4314 MDEyOklzc3VlQ29tbWVudDY2OTU5OTA1Nw== dnowacki-usgs 13837821 2020-08-05T23:37:07Z 2020-08-05T23:37:07Z CONTRIBUTOR

Thanks @max-sixty. I pushed a second commit, including adding a keep_attrs argument so people can keep the old behavior of losing the attrs. I added a bit more testing on for general astype behavior, checking dtypes are correct and values are similar.

What do you make of the failing tests in test_sparse.py (test_dataarray_method and test_variable_method)? I'm not really familiar enough with the pytest parametrize syntax to figure out what's going on.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Recreate @gajomi's #2070 to keep attrs when calling astype() 673757961

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