From f7517f886d3db62c92871e66a6def811875f9c44 Mon Sep 17 00:00:00 2001 From: Ricky Nilsson Date: Thu, 23 Jan 2025 15:06:13 -0800 Subject: [PATCH 1/3] Fix InvalidTableError when attempting to query DI_STARS_EXEP or TD tables. --- astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py b/astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py index 0a23ebac80..23376341cf 100644 --- a/astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py +++ b/astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py @@ -233,7 +233,7 @@ def query_criteria_async(self, table, get_query_payload=False, cache=None, **cri if cache is None: cache = self.CACHE - if table in self.TAP_TABLES: + if table in [tab.lower() for tab in self.TAP_TABLES]: tap = pyvo.dal.tap.TAPService(baseurl=self.URL_TAP, session=self._session) # construct query from table and request_payload (including format) tap_query = self._request_to_sql(request_payload) From 9c024c533fa39ad34dfe364e2669d6ef6b112782 Mon Sep 17 00:00:00 2001 From: Ricky Nilsson Date: Thu, 23 Jan 2025 15:16:15 -0800 Subject: [PATCH 2/3] Edit change log. --- CHANGES.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 07f7b054f2..00915e7c4f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -74,6 +74,8 @@ ipac.nexsci.nasa_exoplanet_archive - Add missing unit strings to unit mapper. ``micron``, ``microns``, and ``uas``. [#3188] +- Fixed InvalidTableError for DI_STARS_EXEP and TD tables. [#3189] + Infrastructure, Utility and Other Changes and Additions ------------------------------------------------------- From a10f569555b0a782b31013fdfa8fc9cb18bdcbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Thu, 23 Jan 2025 21:24:03 -0800 Subject: [PATCH 3/3] TST: adding regression test --- .../tests/test_nasa_exoplanet_archive_remote.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/astroquery/ipac/nexsci/nasa_exoplanet_archive/tests/test_nasa_exoplanet_archive_remote.py b/astroquery/ipac/nexsci/nasa_exoplanet_archive/tests/test_nasa_exoplanet_archive_remote.py index 979c5d3764..eceac794c1 100644 --- a/astroquery/ipac/nexsci/nasa_exoplanet_archive/tests/test_nasa_exoplanet_archive_remote.py +++ b/astroquery/ipac/nexsci/nasa_exoplanet_archive/tests/test_nasa_exoplanet_archive_remote.py @@ -185,3 +185,10 @@ def test_format(): with pytest.raises(InvalidQueryError) as error: NasaExoplanetArchive.query_object("HAT-P-11 b", format="json") assert "json" in str(error) + + +@pytest.mark.remote_data +def test_table_case_sensivity(): + # Regression test from #3090 + table = NasaExoplanetArchive.query_criteria(table='DI_STARS_EXEP', select='*') + assert len(table) > 0