Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list available backends and basic descriptors #7000
list available backends and basic descriptors #7000
Changes from 26 commits
b48dc55
ea0af7f
88fcd7d
f9e61d1
7aa2d70
c8dfb2f
e2fc425
a0fc0c2
d405717
73580dc
6af2891
897c204
623bb31
33412c4
06861fa
1dd69ac
14fa13d
4fdfad1
a6b6f55
02de430
b410eec
0a48f20
d076fba
c3c157f
3d37077
f40660e
1d78879
089393f
331acf5
98b85dc
fc4c93a
b6e6a23
db9c422
1a7707d
b978583
0fdff0c
28a0799
3b7fece
988af43
6f88789
fdd1346
bf5ad18
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's how I would format it. I don't think the attributes are necessary and can live in the repr. The entrypoints xarray support should be updated with meaningful descriptions and links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then all external backend will have to re-implement the repr and might not follow the indentation. Personally I like the attributes approach more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's okay, it's easy enough to copy/paste the base repr.
I suspect the
url
will be a wasted attribute as some engines might not have a homepage.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took an approach somewhere in between. If we make the descriptions part of the base repr instead of attributes, then it will either have filler text (as above) or funny spacing (if we let
description/url = ""
) if each Backend doesn't fill in the repr fields. I did change it to__repr__
and add the nice indentation (though the dict doesn't print with newlines after each key in my output window, which makes it slightly confusing to look at):Happy to make further adjustments but trying to include all suggestions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think whether or not the description and url live in the attributes is not a big deal, and it would be great to just get get this merged as is so we can include it in the upcoming release! 😀
I think you're going to have this problem with any solution that still uses a dict of reprs. (Not sure why that doesn't seem to be the case in @Illviljan's example though.)