Switch to dict instead of ordered dict in Vizier find_catalogs
Since astroquery is for python > 3.10, I was wondering if you'd be on board to switch the result of Vizier.find_tables to normal dictionaries here:
https://github.com/astropy/astroquery/blob/25e6521ad3e86f5b2285d08e736cd3417159482d/astroquery/vizier/core.py#L836
I was thinking something like:
return {R.name: R.description for R in vo_tree.resources}
And I guess the changes to the API would be minimal, but we'd have a nicer repr. Or is there a specific reason that I missed for this?
Also,could we return the description directly instead of the astropy.io.votable.tree.Resource ? The only other information that I think might be useful would be the number of rows in the catalog.
I'm onboard with both changes.
Yeap, both sounds reasonable.
So, this motivated #3028 which will make find_catalogs way faster. However, switching to a dictionary will remove the possibility to do this (in the docs here):
from astroquery.vizier import Vizier
catalog_list = Vizier.find_catalogs('Kang W51')
catalogs = Vizier.get_catalogs(catalog_list.values())
print(catalogs)
Where we use values instead of keys. So that's actually a change of API. Maybe not such a good idea.
Not sure this is worth the API change anymore, I'm happy with the speed-up from the maintenance PR