html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/7000#issuecomment-1281108096,https://api.github.com/repos/pydata/xarray/issues/7000,1281108096,IC_kwDOAMm_X85MXCiA,2448579,2022-10-17T16:04:49Z,2022-10-17T16:04:49Z,MEMBER,@headtr1ck the typing changes didn't work. Can you send in a separate PR for that please?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1279048760,https://api.github.com/repos/pydata/xarray/issues/7000,1279048760,IC_kwDOAMm_X85MPLw4,11756442,2022-10-14T13:59:06Z,2022-10-14T13:59:06Z,MEMBER,"> Couple of minor comments, then we can merge. @headtr1ck GitHub is unhelpfully not showing me any comments. Can you share a screen shot or something so I can address them? Thanks!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1266031250,https://api.github.com/repos/pydata/xarray/issues/7000,1266031250,IC_kwDOAMm_X85LdhqS,2448579,2022-10-03T20:50:18Z,2022-10-03T20:50:18Z,MEMBER,"> We discussed this with Jessica in the xarray community meeting today Did you discuss adding `xr.show_engines()` or are we pointing all users to `xr.backends.list_engines()`?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1261359689,https://api.github.com/repos/pydata/xarray/issues/7000,1261359689,IC_kwDOAMm_X85LLtJJ,35968931,2022-09-28T19:16:04Z,2022-09-29T21:38:09Z,MEMBER,"> Does anyone know if the backentrypoints are supposed to have an available attribute? Looks like they are - every subclass of `BackendEntryPoint` seems to define `.available`. In each case it points to the corresponding `has_[package]` flag. I think it might be safe to set `.available` to default to `True` in the base class? That way if the backend requires no special dependencies it would by default return True. If we think that makes sense then I'm happy to add a commit doing that so this can be merged. EDIT: (Actually we should wait to put tests in too really)","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1247111973,https://api.github.com/repos/pydata/xarray/issues/7000,1247111973,IC_kwDOAMm_X85KVWsl,35968931,2022-09-14T17:52:12Z,2022-09-14T17:52:12Z,MEMBER,"We discussed this with Jessica in the xarray community meeting today and I think the conclusion was to return a dict of backend objects with nice reprs to begin with, and if there is appetite then prettify it later, likely with a custom mutable mapping with special repr. ","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1244529390,https://api.github.com/repos/pydata/xarray/issues/7000,1244529390,IC_kwDOAMm_X85KLgLu,35968931,2022-09-12T21:40:06Z,2022-09-12T21:43:34Z,MEMBER,"> If the dict repr from list_engines is still not good enough maybe replacing the dict with a custom MutableMapping with a good repr format could be a way forward? I like this idea more than using a `pd.dataframe`, which is quite a heavy dependency to use for just displaying some strings. (We have other plans to eventually make pandas an optional import too). That would also be consistent with the approach we use for `ds.coords` and similar. EDIT: This would also be a good thing to split out into an (optional) future PR though, and merge returning a dict of objects with nice individual reprs for now.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1244499083,https://api.github.com/repos/pydata/xarray/issues/7000,1244499083,IC_kwDOAMm_X85KLYyL,14371165,2022-09-12T21:22:31Z,2022-09-12T21:22:31Z,MEMBER,"My 2 cents is that `list_engines` should be good enough and the issue is the lack of a good repr on the backend classes. If the dict repr from `list_engines` is still not good enough maybe replacing the dict with a custom MutableMapping with a good repr format could be a way forward?","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1244154384,https://api.github.com/repos/pydata/xarray/issues/7000,1244154384,IC_kwDOAMm_X85KKEoQ,11756442,2022-09-12T18:49:37Z,2022-09-12T18:49:37Z,MEMBER,"> add `list_backends` under `Advanced API` Turns out it was already available so I added it to the Advance API docs as well as https://docs.xarray.dev/en/stable/internals/how-to-add-new-backend.html. @dcherian I'll bookmark adding it to https://tutorial.xarray.dev/advanced/backends/backends.html. @Illviljan, in case you didn't see this prior discussion: > > So what would the return type need to be to get a nice table representation, but also allow you to select out individual backend objects? A pandas object containing the backend objects? Some kind of BackendList class? > > ... I haven't dreamed up an answer to this question yet. We could set it up so that `__str__` instead returns a pandas series, but I don't see another way we can have a pretty `__str__` that will also directly feed into a nicely formated table for `avail_engines()`. Do you have any suggestions? Note: `avail_engines()` has been renamed to `show_engines()`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1244125614,https://api.github.com/repos/pydata/xarray/issues/7000,1244125614,IC_kwDOAMm_X85KJ9mu,14371165,2022-09-12T18:21:05Z,2022-09-12T18:21:05Z,MEMBER,"``` >>> xr.backends.plugins.list_engines() {'scipy': , 'rasterio': , 'store': } ``` I wonder if these classes had a proper repr wouldn't that be enough?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1243941285,https://api.github.com/repos/pydata/xarray/issues/7000,1243941285,IC_kwDOAMm_X85KJQml,2448579,2022-09-12T15:51:34Z,2022-09-12T15:51:34Z,MEMBER,"Thanks Jessica! > ""I'm a developer who is trying to add a new backend and I want to see all the actual BackendEntrypoint objects"". We could also just document using `xr.backends.plugins.list_engines()` in https://docs.xarray.dev/en/stable/internals/how-to-add-new-backend.html and https://tutorial.xarray.dev/advanced/backends/backends.html","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1243873325,https://api.github.com/repos/pydata/xarray/issues/7000,1243873325,IC_kwDOAMm_X85KJAAt,35968931,2022-09-12T15:01:07Z,2022-09-12T15:01:07Z,MEMBER,"> We can certainly change the name of avail_engines() to display_backends(). Is there then a dev need to have another version of list_backends(), or would a ""see also"" to list_engines() be a solution here? I think exposing a `backends.display_backends()` (defined in `backends.api` like `BackendEntrypoint` is) and then also pointing from there to the lower-level `xr.backends.plugins.list_engines()` would be great. That way there is only one more function listed in xarray's main API docs, and `list_backends` can be for dev use if necessary. Expanding on that, we could put `display_backends` in the API docs under `IO / conversion` and add `list_backends` under `Advanced API`. That would keep distinct the two use cases of (1) ""I'm a user and want to know what backends are installed for use as `engine=...`"", and (2) ""I'm a developer who is trying to add a new backend and I want to see all the actual `BackendEntrypoint` objects"".","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1243848597,https://api.github.com/repos/pydata/xarray/issues/7000,1243848597,IC_kwDOAMm_X85KI5-V,11756442,2022-09-12T14:43:04Z,2022-09-12T14:43:04Z,MEMBER,"> we also probably don't want to pollute xarray's public namespace with multiple functions that do basically the same thing. Though maybe as it's all behind the backends namespace that doesn't matter so much? Then we might have `list_backends` and `display_backends` or something? Currently there is this method: ``` >>> xr.backends.plugins.list_engines() {'scipy': , 'rasterio': , 'store': } ``` and here we're adding (essentially to more effectively and prettily surface the above results to the user): ``` >>> xr.backends.api.avail_engines() Engine Description Documentation scipy rasterio store ``` The goal that led us (@snowman2 @dcherian @scottyhq) to create the initial issue was giving the user an easy, obvious way to find out what engines were actually available to them in their current environment. In the process of figuring out how to do this, @snowman2 and I discovered that `list_engines()` already existed, we just needed to add the attributes we wanted to display, make it pretty, and put it somewhere a user might look for it. We can certainly change the name of `avail_engines()` to `display_backends()`. Is there then a dev need to have another version of `list_backends()`, or would a ""see also"" to `list_engines()` be a solution here?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1243754342,https://api.github.com/repos/pydata/xarray/issues/7000,1243754342,IC_kwDOAMm_X85KIi9m,35968931,2022-09-12T13:35:37Z,2022-09-12T13:35:37Z,MEMBER,"> Agreed. I added a __str__ to the BackendEntrypoint class, but... This is helpful already, thank you. > Does it need to be the same method? Why not a method that simply returns a list of classes and another method that prints a nicely formatted list? I guess not, but we also probably don't want to pollute xarray's public namespace with multiple functions that do basically the same thing. Though maybe as it's all behind the backends namespace that doesn't matter so much? Then we might have `list_backends` and `display_backends` or something?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1241174924,https://api.github.com/repos/pydata/xarray/issues/7000,1241174924,IC_kwDOAMm_X85J-tOM,11756442,2022-09-08T20:03:11Z,2022-09-08T20:03:11Z,MEMBER,"> That would not display in a nice table though. But might be anyway nice to add ;) Agreed. I added a `__str__` to the `BackendEntrypoint` class, but... > So what would the return type need to be to get a nice table representation, but also allow you to select out individual backend objects? A pandas object containing the backend objects? Some kind of BackendList class? ... I haven't dreamed up an answer to this question yet. We could set it up so that `__str__` instead returns a pandas series, but I don't see another way we can have a pretty `__str__` that will also directly feed into a nicely formated table for `avail_engines()`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1240920968,https://api.github.com/repos/pydata/xarray/issues/7000,1240920968,IC_kwDOAMm_X85J9vOI,35968931,2022-09-08T16:05:01Z,2022-09-08T16:09:05Z,MEMBER,"> That would not display in a nice table though. But might be anyway nice to add ;) So what would the return type need to be to get a nice table representation, but also allow you to select out individual backend objects? A pandas object containing the backend objects? Some kind of `BackendList` class? > What about `type(self).__name__` Correct me if I'm wrong, but if a subclassed `ZarrBackend` object was added as an entrypoint under the key `""zarr""`, wouldn't `type(self).__name__` return `""ZarrBackend""` rather than `""zarr""`, even though `""zarr""` is what the user would actually have to pass to the `engine` kwarg of `open_dataset` to use that backend? Not ideal :/","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1240883537,https://api.github.com/repos/pydata/xarray/issues/7000,1240883537,IC_kwDOAMm_X85J9mFR,35968931,2022-09-08T15:34:11Z,2022-09-08T15:34:11Z,MEMBER,"Hey @JessicaS11! Nice to see you here. This is a going to be a great first-time contribution! > I know that it is more work but I think it would be more beneficial to have this information formated nicely than simply returning some lists. Maybe similar to a pandas dataframe? One approach might be to add a nice `__str__`, `__repr__`, (or even `_repr_html_`) to the `BackendEntrypoint` class. That way printing a list (or better a dict) of the engine-specific subclasses would automatically look decent. Something roughly like ```python class BackendEntryPoint: ... def __str__(self) -> str: txt += self.backend_description if self.backend_url: txt += f""\nFind more info at {self.backend_url}"" return txt ``` What might be clearer is if this backend class knew it's own name, but I'm not sure it can, hmmm ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1363829843 https://github.com/pydata/xarray/pull/7000#issuecomment-1239824690,https://api.github.com/repos/pydata/xarray/issues/7000,1239824690,IC_kwDOAMm_X85J5jky,11756442,2022-09-07T20:12:51Z,2022-09-07T20:12:51Z,MEMBER,"> I know that it is more work but I think it would be more beneficial to have this information formated nicely than simply returning some lists. Sounds good - I'll make that happen!","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,1363829843