astropy / astroquery

Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8
http://astroquery.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
705 stars 397 forks source link

API discussion for `list_collections` #3077

Open bsipocz opened 3 months ago

bsipocz commented 3 months ago

Now that I'm adding SSA methods, it becomes clear that some of the arguments and functionality is named very similarly as those of SIA's. Namely we work with collections.

So, the question would be: which one do you find more user friends? Adding new methods, e.g. list_collections_ssa (and then also rename the currently existing list_collections to list_collections_sia, or instead add a kwarg that is either sia or ssa, and defaulting it to sia to keep the current behaviour?

cc @andamian and @keflavich

(Currently this affects the IRSA module, but ultimately will affect other ones as we turn to use SIAv2 and SSA backends instead of the webforms)

keflavich commented 3 months ago

I am very slightly in favor of list_collections_{sia,ssa} because of improved discoverability (tab-completion will show those). But I am also perfectly happy with the other option.

bsipocz commented 3 months ago

That also means to deprecate the current list_collections() method.

andamian commented 2 months ago

list_collections is pretty basic right now. I would use optional filtering arguments at the expense of discoverability to leave the door open for other potential orthogonal filters.

bsipocz commented 2 months ago

I'm even more inclined to doing the list_collections() way, as it seems that we'll get all collections combined with a simple CAOM search, so will in fact need to do more filtering to get either SIA or SSA. And who knows, maybe there will be use cases where having the combined list is useful.