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
699 stars 397 forks source link

Exoplanet Archive alias queries not cached #2373

Open bmorris3 opened 2 years ago

bmorris3 commented 2 years ago

The astroquery API allows for users to submit cached alias queries like this:

        from astroquery.ipac.nexsci.nasa_exoplanet_archive import NasaExoplanetArchive
        aliases = NasaExoplanetArchive.query_aliases(
            "HAT-P-11", cache=True
        )

but the function doesn't do anything with the value cache (see source). Would it be possible to cache aliases?

bmorris3 commented 2 years ago

Also, by default query_object* will has the regularize kwarg set to True, which calls self._regularize_object_name(object_name), which calls self.query_aliases(object_name, cache=False), where the last cache kwarg is ignored. So right now the default query_object method fails to cache the name and has to do a lookup online each time it is called, even when cache=True.