home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

13 rows where issue = 831008649 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 7

  • alexamici 3
  • Illviljan 3
  • shoyer 2
  • aurghs 2
  • kmuehlbauer 1
  • mathause 1
  • pep8speaks 1

author_association 3

  • MEMBER 10
  • COLLABORATOR 2
  • NONE 1

issue 1

  • Allow using a custom engine class directly in xr.open_dataset · 13 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
819976858 https://github.com/pydata/xarray/pull/5033#issuecomment-819976858 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxOTk3Njg1OA== shoyer 1217238 2021-04-15T02:02:10Z 2021-04-15T02:02:10Z MEMBER

thanks!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
798793556 https://github.com/pydata/xarray/pull/5033#issuecomment-798793556 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDc5ODc5MzU1Ng== pep8speaks 24736507 2021-03-13T22:12:43Z 2021-04-15T01:45:12Z NONE

Hello @Illviljan! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2021-04-15 01:45:12 UTC
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
819702450 https://github.com/pydata/xarray/pull/5033#issuecomment-819702450 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxOTcwMjQ1MA== kmuehlbauer 5821660 2021-04-14T17:45:22Z 2021-04-14T17:45:22Z MEMBER

I really like to see this getting merged and I think subclassing isn't a big of a problem. Thanks for working on this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
819671545 https://github.com/pydata/xarray/pull/5033#issuecomment-819671545 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxOTY3MTU0NQ== shoyer 1217238 2021-04-14T16:58:52Z 2021-04-14T16:58:52Z MEMBER

My perspective:

  • Generally I like this PR. This is a nice, more explicit alternative to registering an entry-point.
  • I do think we should require using a subclass of Xarray's BackendEntrypoint. Subclassing is a standard way to express interfaces in Python. It is less error prone than supporting a dict, for example, which can more easily have misspelled names.
{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
819654025 https://github.com/pydata/xarray/pull/5033#issuecomment-819654025 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxOTY1NDAyNQ== aurghs 35919497 2021-04-14T16:31:52Z 2021-04-14T16:31:52Z COLLABORATOR

@Illviljan I see your point, but the subclassing doesn't add too much complexity and for consistency would be better to add a check on the class. After that, I think we can merge it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
816517328 https://github.com/pydata/xarray/pull/5033#issuecomment-816517328 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxNjUxNzMyOA== aurghs 35919497 2021-04-09T08:31:05Z 2021-04-09T08:31:27Z COLLABORATOR

Making a backend doesn't have to be super difficult either depending if you already have a nice 3rd party module you can thinly wrap to return a Dataset instead of whatever is the default

I agree. Adding a plugin is not really very difficult, but in some cases could be discouraging especially if you are just exploring how the backends work.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
816258482 https://github.com/pydata/xarray/pull/5033#issuecomment-816258482 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxNjI1ODQ4Mg== alexamici 226037 2021-04-08T22:01:50Z 2021-04-08T22:07:27Z MEMBER

Making a backend doesn't have to be super difficult either depending if you already have a nice 3rd party module you can thinly wrap to return a Dataset instead of whatever is the default

Absolutely agree: https://github.com/corteva/rioxarray/blob/master/rioxarray/xarray_plugin.py

(the PR took a grand total of 48 hours from open to merge: https://github.com/corteva/rioxarray/pull/281)

It's funny how different our backgrounds are, I don't think I've had to deal with console_scripts.

$ grep -r console_scripts develop/ | wc -l 23

😅

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
816214036 https://github.com/pydata/xarray/pull/5033#issuecomment-816214036 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxNjIxNDAzNg== Illviljan 14371165 2021-04-08T21:20:38Z 2021-04-08T21:20:38Z MEMBER

Well, based on the amount of complexity a developer needs to master in order to write the backend, I would consider the registration to be a relatively trivial bit, especially because the syntax is the same as for the well known console_script.

Making a backend doesn't have to be super difficult either depending if you already have a nice 3rd party module you can thinly wrap to return a Dataset instead of whatever is the default

It's funny how different our backgrounds are, I don't think I've had to deal with console_scripts.

{
    "total_count": 2,
    "+1": 0,
    "-1": 0,
    "laugh": 2,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
816173649 https://github.com/pydata/xarray/pull/5033#issuecomment-816173649 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxNjE3MzY0OQ== alexamici 226037 2021-04-08T20:41:29Z 2021-04-08T20:41:29Z MEMBER

The first comment is that I see the point of the feature at a theoretical level, but I'm at the third external backend that I'm writing and I didn't miss it. Adding an entrypoint is very easy and works seamlessly during development. Do you have in mind any use case where this is more convenient than adding an entrypoint?

I simply want to do:

```python from custom_backend import engine

ds = xr.load_dataset(filename, engine=engine) ```

That is much simpler than having to figure out what the How to register a backend is talking about. Because I'm a user who doesn't have any grand dreams (yet?) of creating public backend modules I therefore don't see the point in having to do all this extra paperwork.

Well, based on the amount of complexity a developer needs to master in order to write the backend, I would consider the registration to be a relatively trivial bit, especially because the syntax is the same as for the well known console_script.

On one hand I judge the feature to be relatively simple to support in the long long term, on the other hand I still feel that its benefit will be be quite marginal. Therefore I'm still a mild -1.

... we ask backend developers to inherit from BackendEntrypoint, for the sake of consistency I would enforce it here as well, instead to use duck-typing.

That's not how I read the docs. If this is how we actually want it then some words in it should be replaced with "must" and "requires".

But I don't think that should be such a hard requirement when a user insists on using a custom engine this way. I see it as an advanced option where it's the users responsibility to make sure that the engine class has

  • the open_dataset method
  • the open_dataset_parameters attribute
  • the guess_can_open method

Which is very simple to do, see the test for an example. Subclassing using BackendEntrypoint adds complexity and readability issues so I want to at least feel a little motivated to use it but there's nothing fancy going on there, is there any plans?

On this one I can side with you. The initial proposal from @aurghs and myself was to use a dict 😄 .

This one is a higher lever design decisione, I think @jhamman and @shoyer need to weight in.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
816088476 https://github.com/pydata/xarray/pull/5033#issuecomment-816088476 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxNjA4ODQ3Ng== Illviljan 14371165 2021-04-08T19:21:10Z 2021-04-08T19:21:10Z MEMBER

The first comment is that I see the point of the feature at a theoretical level, but I'm at the third external backend that I'm writing and I didn't miss it. Adding an entrypoint is very easy and works seamlessly during development.

Do you have in mind any use case where this is more convenient than adding an entrypoint?

I simply want to do: ```python from custom_backend import engine

ds = xr.load_dataset(filename, engine=engine) ``` That is much simpler than having to figure out what the How to register a backend is talking about. Because I'm a user who doesn't have any grand dreams (yet?) of creating public backend modules I therefore don't see the point in having to do all this extra paperwork.

... we ask backend developers to inherit from BackendEntrypoint, for the sake of consistency I would enforce it here as well, instead to use duck-typing.

That's not how I read the docs. If this is how we actually want it then some words in it should be replaced with "must" and "requires".

But I don't think that should be such a hard requirement when a user insists on using a custom engine this way. I see it as an advanced option where it's the users responsibility to make sure that the engine class has * the open_dataset method * the open_dataset_parameters attribute * the guess_can_open method

Which is very simple to do, see the test for an example. Subclassing using BackendEntrypoint adds complexity and readability issues so I want to at least feel a little motivated to use it but there's nothing fancy going on there, is there any plans?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
815841228 https://github.com/pydata/xarray/pull/5033#issuecomment-815841228 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxNTg0MTIyOA== alexamici 226037 2021-04-08T13:49:55Z 2021-04-08T13:49:55Z MEMBER

@Illviljan sorry for being late to the party.

The first comment is that I see the point of the feature at a theoretical level, but I'm at the third external backend that I'm writing and I didn't miss it. Adding an entrypoint is very easy and works seamlessly during development.

Do you have in mind any use case where this is more convenient than adding an entrypoint?

WRT the implementation, at the request of @shoyer and @jhamman, we ask backend developers to inherit from BackendEntrypoint, for the sake of consistency I would enforce it here as well, instead to use duck-typing.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
815806368 https://github.com/pydata/xarray/pull/5033#issuecomment-815806368 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgxNTgwNjM2OA== mathause 10194086 2021-04-08T13:02:58Z 2021-04-08T13:02:58Z MEMBER

@alexamici ok if we merge this?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649
806373273 https://github.com/pydata/xarray/pull/5033#issuecomment-806373273 https://api.github.com/repos/pydata/xarray/issues/5033 MDEyOklzc3VlQ29tbWVudDgwNjM3MzI3Mw== Illviljan 14371165 2021-03-25T05:24:25Z 2021-03-25T05:24:25Z MEMBER

Maybe @aurghs or @alexamici can take a look as well?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Allow using a custom engine class directly in xr.open_dataset 831008649

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