home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where issue = 806811808 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 5

  • keewis 5
  • dcherian 2
  • shoyer 1
  • max-sixty 1
  • github-actions[bot] 1

author_association 2

  • MEMBER 9
  • CONTRIBUTOR 1

issue 1

  • support passing a function to combine_attrs · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
857207204 https://github.com/pydata/xarray/pull/4896#issuecomment-857207204 https://api.github.com/repos/pydata/xarray/issues/4896 MDEyOklzc3VlQ29tbWVudDg1NzIwNzIwNA== github-actions[bot] 41898282 2021-06-08T22:07:49Z 2021-06-08T22:07:49Z CONTRIBUTOR

Unit Test Results

0 files  ±0  0 suites  ±0   0s :stopwatch: ±0s 0 tests ±0  0 :heavy_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit e87d65b7. ± Comparison against base commit e87d65b7.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  support passing a function to combine_attrs 806811808
857182694 https://github.com/pydata/xarray/pull/4896#issuecomment-857182694 https://api.github.com/repos/pydata/xarray/issues/4896 MDEyOklzc3VlQ29tbWVudDg1NzE4MjY5NA== keewis 14808389 2021-06-08T21:41:37Z 2021-06-08T21:41:37Z MEMBER

thanks for the reviews, @shoyer, @dcherian, @max-sixty

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  support passing a function to combine_attrs 806811808
856873157 https://github.com/pydata/xarray/pull/4896#issuecomment-856873157 https://api.github.com/repos/pydata/xarray/issues/4896 MDEyOklzc3VlQ29tbWVudDg1Njg3MzE1Nw== dcherian 2448579 2021-06-08T15:30:34Z 2021-06-08T15:30:34Z MEMBER

let's merge this as-is

Works for me. Once merged perhaps @huard or @DamienIrving can help us iterate on context

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  support passing a function to combine_attrs 806811808
856793544 https://github.com/pydata/xarray/pull/4896#issuecomment-856793544 https://api.github.com/repos/pydata/xarray/issues/4896 MDEyOklzc3VlQ29tbWVudDg1Njc5MzU0NA== keewis 14808389 2021-06-08T13:59:18Z 2021-06-08T13:59:18Z MEMBER

let's merge this as-is (unless there are any comments on the current state?) and I'll add the construction of the context objects in a new PR.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  support passing a function to combine_attrs 806811808
849236342 https://github.com/pydata/xarray/pull/4896#issuecomment-849236342 https://api.github.com/repos/pydata/xarray/issues/4896 MDEyOklzc3VlQ29tbWVudDg0OTIzNjM0Mg== shoyer 1217238 2021-05-27T01:08:10Z 2021-05-27T01:08:10Z MEMBER

Also, how do we best construct that object without a lot of overhead? We need to get at least the function name, but if we pass that manually it's one more place to update when renaming something (not that we do that very often). Using inspect is possible but might be too complicated:

Rather than introspection, I think we should try to be fully explicit about the function being called. Trying to introspect it from stack-frames is madness :)

So in that case, we would need to pass down the context information from the top level functions in xarray, e.g., everything that takes a combine_attrs argument.

In terms of the overall interface, one other concern I have is about the information we make available to users of this API. I can imagine that they might not only want attributes but also the complete xarray objects on which the function is being called. If that's the case, then they would also need more information from the global context.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  support passing a function to combine_attrs 806811808
849183582 https://github.com/pydata/xarray/pull/4896#issuecomment-849183582 https://api.github.com/repos/pydata/xarray/issues/4896 MDEyOklzc3VlQ29tbWVudDg0OTE4MzU4Mg== keewis 14808389 2021-05-26T23:22:38Z 2021-05-27T00:09:15Z MEMBER

there's two remaining issues: should we use a namedtuple / a dataclass for Context instead of the custom class? We basically want a struct without methods (for now?).

Also, how do we best construct that object without a lot of overhead? We need to get at least the function name, but if we pass that manually it's one more place to update when renaming something (not that we do that very often). Using inspect is possible but might be too complicated: python In [5]: import inspect ...: ...: def current_function_name(): ...: frame = inspect.currentframe() ...: try: ...: caller = frame.f_back ...: name = caller.f_code.co_name ...: finally: ...: del frame ...: del caller ...: ...: return name ...: ...: def func(): ...: print(current_function_name()) ...: ...: def another_func(): ...: print(current_function_name()) ...: ...: class A: ...: def method(self): ...: print(current_function_name()) ...: ...: f = func ...: ...: func() ...: another_func() ...: f() ...: ...: a = A() ...: a.method() func another_func func method With this we can only get the name of the definition so this might break for injected methods, but I guess for injected methods it would be difficult to manually pass the function name, anyways.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  support passing a function to combine_attrs 806811808
822788888 https://github.com/pydata/xarray/pull/4896#issuecomment-822788888 https://api.github.com/repos/pydata/xarray/issues/4896 MDEyOklzc3VlQ29tbWVudDgyMjc4ODg4OA== keewis 14808389 2021-04-19T21:13:53Z 2021-04-19T21:13:53Z MEMBER

not sure. There are a few questions about the signature of the user functions (see https://github.com/pydata/xarray/pull/4896#issuecomment-779862647 and https://github.com/pydata/xarray/issues/3891#issuecomment-818377781), which I would like to answer before including this in a release (I might be wrong, but I think changing the signature after releasing is pretty hard)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  support passing a function to combine_attrs 806811808
822030670 https://github.com/pydata/xarray/pull/4896#issuecomment-822030670 https://api.github.com/repos/pydata/xarray/issues/4896 MDEyOklzc3VlQ29tbWVudDgyMjAzMDY3MA== max-sixty 5635139 2021-04-18T17:45:15Z 2021-04-18T17:45:15Z MEMBER

Shall we merge?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  support passing a function to combine_attrs 806811808
780680130 https://github.com/pydata/xarray/pull/4896#issuecomment-780680130 https://api.github.com/repos/pydata/xarray/issues/4896 MDEyOklzc3VlQ29tbWVudDc4MDY4MDEzMA== keewis 14808389 2021-02-17T16:29:58Z 2021-02-17T16:29:58Z MEMBER

sounds reasonable, but that would require a bigger change than just extending merge_attrs (which currently ignores encoding)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  support passing a function to combine_attrs 806811808
779862647 https://github.com/pydata/xarray/pull/4896#issuecomment-779862647 https://api.github.com/repos/pydata/xarray/issues/4896 MDEyOklzc3VlQ29tbWVudDc3OTg2MjY0Nw== dcherian 2448579 2021-02-16T14:13:43Z 2021-02-16T14:13:43Z MEMBER

One thing to think about is .encoding.

IIUC we want to treat .encoding like .attrs eventually, so we need to design the signature of this callable to handle that especially since .encoding can contain "useful" attributes like "coordinates" and "bounds" after #2844.

One option would be ``` def my_combine_attrs(list_of_attrs_dicts, list_of_encoding_dicts): attrs = ... encoding = ... return attrs, encoding

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  support passing a function to combine_attrs 806811808

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