home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

8 rows where author_association = "MEMBER" and issue = 1332231863 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 4

  • TomNicholas 4
  • keewis 2
  • jhamman 1
  • Illviljan 1

issue 1

  • Public testing framework for duck array integration · 8 ✖

author_association 1

  • MEMBER · 8 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1255644395 https://github.com/pydata/xarray/issues/6894#issuecomment-1255644395 https://api.github.com/repos/pydata/xarray/issues/6894 IC_kwDOAMm_X85K15zr TomNicholas 35968931 2022-09-22T23:06:21Z 2022-09-22T23:06:21Z MEMBER

Looks like these

https://data-apis.org/array-api-tests/.

use these

experimental array api strategies

Would that be useful here?

I think they are complementary. In theory if xarray supports the array API standard and a library passes all the data array API tests, then it should also pass all of xarray's tests (rendering the latter uneccessary). But in practice I think the tests here would still be useful, if only for the possible case of libraries that don't fully meet the API standard yet would still work fine in xarray.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Public testing framework for duck array integration 1332231863
1255626863 https://github.com/pydata/xarray/issues/6894#issuecomment-1255626863 https://api.github.com/repos/pydata/xarray/issues/6894 IC_kwDOAMm_X85K11hv jhamman 2443309 2022-09-22T22:35:58Z 2022-09-22T22:35:58Z MEMBER

@asmeurer recently pointed me to https://data-apis.org/array-api-tests/. Would that be useful here?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Public testing framework for duck array integration 1332231863
1216451559 https://github.com/pydata/xarray/issues/6894#issuecomment-1216451559 https://api.github.com/repos/pydata/xarray/issues/6894 IC_kwDOAMm_X85IgZPn keewis 14808389 2022-08-16T10:25:43Z 2022-08-16T10:25:43Z MEMBER

there's also the experimental array api strategies built into hypothesis

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Public testing framework for duck array integration 1332231863
1210187154 https://github.com/pydata/xarray/issues/6894#issuecomment-1210187154 https://api.github.com/repos/pydata/xarray/issues/6894 IC_kwDOAMm_X85IIf2S TomNicholas 35968931 2022-08-10T05:42:34Z 2022-08-10T05:42:34Z MEMBER

Another thing that might be useful is the hypothesis strategies in the test suite for the array API consortium standard (cc @keewis).

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Public testing framework for duck array integration 1332231863
1209758257 https://github.com/pydata/xarray/issues/6894#issuecomment-1209758257 https://api.github.com/repos/pydata/xarray/issues/6894 IC_kwDOAMm_X85IG3Ix TomNicholas 35968931 2022-08-09T18:53:58Z 2022-08-09T18:53:58Z MEMBER

Typing duck array is also a little challenging I find

Thanks @Illviljan - I was literally just thinking about that here.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Public testing framework for duck array integration 1332231863
1209756650 https://github.com/pydata/xarray/issues/6894#issuecomment-1209756650 https://api.github.com/repos/pydata/xarray/issues/6894 IC_kwDOAMm_X85IG2vq Illviljan 14371165 2022-08-09T18:52:13Z 2022-08-09T18:52:13Z MEMBER

Typing duck array is also a little challenging I find, we pretty much only do Any at the moment. I found some nice references and discussions that might be interesting for this: https://github.com/pmeier/array-protocol https://github.com/data-apis/array-api/issues/229

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Public testing framework for duck array integration 1332231863
1209519085 https://github.com/pydata/xarray/issues/6894#issuecomment-1209519085 https://api.github.com/repos/pydata/xarray/issues/6894 IC_kwDOAMm_X85IF8vt TomNicholas 35968931 2022-08-09T15:17:12Z 2022-08-09T15:17:12Z MEMBER

you should already be able to specify a hypothesis strategy to create e.g. a random awkward array

Sounds good!

or maybe it should be just check?

Yes just check probably.

However, maybe we should just not use parametrize but instead define separate functions for each reduce operation?

But then the user writing the test code would have to write one of their own tests per xarray method wouldn't they? I think we should avoid putting that much work on them if we can. I think your current approach seems fine so far...

the pint tests use old versions of the conversion functions from pint-xarray

That's basically technical debt, so we should make a point to remove them from xarray eventually.

the tests for pint seem to increase the total test coverage of xarray https://github.com/pydata/xarray/pull/5692#issuecomment-1040002844. I guess that just means we'd have to improve the rest of the testsuite?

So long as @benbovy (or someone) writes new tests to cover the bugs that were revealed then this is fine.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Public testing framework for duck array integration 1332231863
1209144356 https://github.com/pydata/xarray/issues/6894#issuecomment-1209144356 https://api.github.com/repos/pydata/xarray/issues/6894 IC_kwDOAMm_X85IEhQk keewis 14808389 2022-08-09T09:33:07Z 2022-08-09T09:33:07Z MEMBER

with the implementation in #4972 you should already be able to specify a hypothesis strategy to create e.g. a random awkward array. Same with dask or other parallel computing frameworks: if you can construct a hypothesis strategy for them the testing framework should be able to use that. check_reduce (or maybe it should be just check?) should allow customizing the comparison (or actually, that's the entire test code at the moment), so putting compute (or todense / get) calls should be easy.

For setup and teardown I think we could use pytest fixtures (and apply them automatically to each function). However, maybe we should just not use parametrize but instead define separate functions for each reduce operation? Then it would be possible to override that manually. As far as I remember I chose not to do that because tests that only delegate to super().test_function() just are not great design – if we can think of a way to do that while avoiding those kinds of test redefinitions I'd be happy with that (and then we could get rid of the apply_marks function which is a ugly hack of pytest internals).

I agree that moving the array library tests to dedicated repositories makes a lot sense (for example, the pint tests use old versions of the conversion functions from pint-xarray), but note that at the moment the tests for pint seem to increase the total test coverage of xarray a bit. I guess that just means we'd have to improve the rest of the testsuite?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Public testing framework for duck array integration 1332231863

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