You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve discoverability of index build options #8002
Currently Dataset.set_xindex(coord_names, index_cls=None, **options) allows passing index build options (if any) via the **options arguments. Those options are not easily discoverable, though (no auto-completion, etc.).
So if I understand this correctly the advantage of with_options is that is would allow the author of the custom index to define the signature of additional arguments it expects? I think that's useful.
I also think it's generally a bit confusing that in all these index examples __init__ is defined but not actually how the index is first created. I understand why, but the intended patterns could be more clearly documented.
So if I understand this correctly the advantage of with_options is that is would allow the author of the custom index to define the signature of additional arguments it expects?
Yes and it would expose the signature directly to the users of the index (type checking, auto-completion, etc.).
I also think it's generally a bit confusing that in all these index examples init is defined but not actually how the index is first created. I understand why, but the intended patterns could be more clearly documented.
Yeah this may be confusing I agree. And I also agree about clarifying it in the documentation.
Activity
TomNicholas commentedon Jul 19, 2023
So if I understand this correctly the advantage of
with_optionsis that is would allow the author of the custom index to define the signature of additional arguments it expects? I think that's useful.I also think it's generally a bit confusing that in all these index examples
__init__is defined but not actually how the index is first created. I understand why, but the intended patterns could be more clearly documented.benbovy commentedon Jul 19, 2023
Yes and it would expose the signature directly to the users of the index (type checking, auto-completion, etc.).
Yeah this may be confusing I agree. And I also agree about clarifying it in the documentation.