home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

13 rows where issue = 551680561 and user = 14808389 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

  • keewis · 13 ✖

issue 1

  • Pint support for variables · 13 ✖

author_association 1

  • MEMBER 13
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
590083269 https://github.com/pydata/xarray/pull/3706#issuecomment-590083269 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU5MDA4MzI2OQ== keewis 14808389 2020-02-23T15:55:31Z 2020-02-23T15:55:31Z MEMBER

@shoyer, I added the notes

@max-sixty, @jthielen: the identical tests will be skipped for now. At the moment that does not make any difference since identical is the same as equals with additionally checking the attributes (any changes to it are not limited to pint, so I guess we should open a new issue for discussion).

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
588356641 https://github.com/pydata/xarray/pull/3706#issuecomment-588356641 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU4ODM1NjY0MQ== keewis 14808389 2020-02-19T17:56:09Z 2020-02-19T17:56:09Z MEMBER

If strict unit checking is required, I think that may be better served by an additional assert unit == "meter" type statement.

which is what I've been doing with assert_units_equal. I'll change the tests for identical, then.

Also, concerning the commutative operations: should we wait for hgrecco/pint#1019 and remove the flipped parameters or should we merge as is and possibly revert once pint implements a type casting hierarchy?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
583349241 https://github.com/pydata/xarray/pull/3706#issuecomment-583349241 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU4MzM0OTI0MQ== keewis 14808389 2020-02-07T11:21:55Z 2020-02-07T11:21:55Z MEMBER

when writing the unit tests, we decided the definition of equals to be different from identical (see https://github.com/pydata/xarray/pull/3238#issuecomment-533145925 and https://github.com/pydata/xarray/pull/3238#issuecomment-533181017) which would be consistent with the behaviour of identical when a "units" attribute is set.

As far as I know there was no real use case (except from being able to use assert_identical in the unit tests), so we can change that.

cc @jthielen

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
582530089 https://github.com/pydata/xarray/pull/3706#issuecomment-582530089 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU4MjUzMDA4OQ== keewis 14808389 2020-02-05T17:51:03Z 2020-02-05T23:39:46Z MEMBER

it should be ready now

Edit: the failures are unrelated (#3751) Edit2: the documentation of this change does not exist, yet. It will be added in a new PR and is a task in #3594

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
582492045 https://github.com/pydata/xarray/pull/3706#issuecomment-582492045 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU4MjQ5MjA0NQ== keewis 14808389 2020-02-05T16:29:32Z 2020-02-05T16:29:32Z MEMBER

this should be ready for review and merge once the tests pass.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
582444857 https://github.com/pydata/xarray/pull/3706#issuecomment-582444857 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU4MjQ0NDg1Nw== keewis 14808389 2020-02-05T14:53:09Z 2020-02-05T14:53:09Z MEMBER

these issues (rolling_window and identical) seem too big to discuss here, so in order to keep moving forward let's mark these tests as xfail and discuss this in their own issues / PRs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
581160780 https://github.com/pydata/xarray/pull/3706#issuecomment-581160780 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU4MTE2MDc4MA== keewis 14808389 2020-02-02T18:03:50Z 2020-02-02T18:03:50Z MEMBER

gentle ping, @shoyer

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
578143916 https://github.com/pydata/xarray/pull/3706#issuecomment-578143916 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU3ODE0MzkxNg== keewis 14808389 2020-01-24T14:07:08Z 2020-01-24T14:07:08Z MEMBER

I think a separate units_equiv function may be cleaner?

I agree. However, I'm reluctant to add that function since that would be the first pint dependent code we have except from the unit tests (but do tell me if that's not an issue).

I'm inclined to provide some kind of hook for wrapped libraries instead (allow them to define a method like metadata_identical or something that does the check for us) so the code in identical would become something like ```python def metadata_identical(arr1, arr2): if hasattr(arr1, "metadata_identical"): return arr1.metadata_identical(arr2) elif hasattr(arr2, "metadata_identical"): return arr2.metadata_identical(arr1) else: return True

return ( self.dims == other.dims and (self._data is other._data or equiv(self.data, other.data)) and metadata_identical(self.data, other.data) ) ```

Note that we explicitly use lazy_array_equiv in concat so it'd be nice to have something that could be easily used there too

I don't think that's a problem since what calls lazy_array_equiv is Variable.identical and if identical works correctly this should, too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
577922953 https://github.com/pydata/xarray/pull/3706#issuecomment-577922953 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU3NzkyMjk1Mw== keewis 14808389 2020-01-23T23:19:20Z 2020-01-23T23:19:20Z MEMBER

hrmm... I had investigated this before and thought I remembered correctly. I can't put it in lazy_array_equiv, though, since array_equiv is also used by equals (which should not check the units, only the dimensionality)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
577890246 https://github.com/pydata/xarray/pull/3706#issuecomment-577890246 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU3Nzg5MDI0Ng== keewis 14808389 2020-01-23T21:41:50Z 2020-01-23T21:41:50Z MEMBER

I think your units_equiv thing could go in duck_array_ops.lazy_array_equiv

that could work for Dataset.identical but not Variable.identical, which I believe by default directly calls array_equiv

re rolling_window: should I leave it as xfail for now?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
577832822 https://github.com/pydata/xarray/pull/3706#issuecomment-577832822 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU3NzgzMjgyMg== keewis 14808389 2020-01-23T19:18:38Z 2020-01-23T19:18:38Z MEMBER

the easiest way to fix identical would be to pass a equiv function that forwards to duck_array_ops.array_equiv but also checks the units: ```python def units_equiv(a, b): if hasattr(a, "units") or hasattr(b, "units"): units_a = getattr(a, "units", None) units_b = getattr(b, "units", None)

registry = getattr(units_a, "_REGISTRY", None) or getattr(b, "_REGISTRY", None)

units_a = units_a or registry.dimensionless
units_b = units_b or registry.dimensionless

return units_a == units_b
else:
# no units at all
return True

def equiv_with_units(a, b): return duck_array_ops.array_equiv(a, b) and units_equiv(a, b) `` However, I'm out of ideas on how to automatically use that (I'd like to avoid having to calla.identical(b, equiv=equiv_with_units)`).


There is also rolling_window that strips the units due to calling numpy.lib.stride_tricks.as_strided, but I don't know how to fix that unless we rewrite _rolling_window or dispatch differently in rolling_window.

There seems to have been some work to add a function named numpy.rolling_window or numpy.sliding_window that could then be overridden by pint, but I think that effort has stalled?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
576078008 https://github.com/pydata/xarray/pull/3706#issuecomment-576078008 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU3NjA3ODAwOA== keewis 14808389 2020-01-20T02:05:56Z 2020-01-20T17:12:38Z MEMBER

I'm not sure why, but dask==1.2 fails where later versions work: pytb ValueError: operands could not be broadcast together with shapes (2,0) (2,2)

Edit: Seems we can just bump dask to dask==2.1 or dask==2.2 and not worry about this. I'd wait on #3660 with this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561
576057519 https://github.com/pydata/xarray/pull/3706#issuecomment-576057519 https://api.github.com/repos/pydata/xarray/issues/3706 MDEyOklzc3VlQ29tbWVudDU3NjA1NzUxOQ== keewis 14808389 2020-01-19T23:02:40Z 2020-01-20T00:41:37Z MEMBER

I fixed the tests that were easier, but I have no idea about rolling_window / as_strided because I don't understand how it works, and identical would be easy to fix if we special-cased pint, but I'd like to avoid that

Edit: seems there are some issues with np.pad support in dask==1.2: __array_function__ support is probably only in later versions so we'd need to use da.pad instead, but that raises an error, too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Pint support for variables 551680561

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