Skip to content

Commit ceecde0

Browse files
keflavichbsipocz
authored andcommitted
remove "top20" keyword argument as it is no longer used or supported
1 parent ad414a2 commit ceecde0

File tree

2 files changed

+2
-43
lines changed

2 files changed

+2
-43
lines changed

astroquery/splatalogue/core.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ class SplatalogueClass(BaseQuery):
4545
versions = ('v1.0', 'v2.0', 'v3.0', 'vall')
4646
# global constant, not user-configurable
4747
ALL_LINE_LISTS = ('LovasNIST', 'SLAIM', 'JPL', 'CDMS', 'ToyaMA', 'OSU',
48-
'Recombination', 'RFI')
49-
TOP20_LIST = ('comet', 'planet', 'top20', 'ism_hotcore', 'ism_darkcloud',
50-
'ism_diffusecloud')
48+
'TopModel', 'Recombination', 'RFI')
5149

5250
def __init__(self, **kwargs):
5351
"""
@@ -154,7 +152,7 @@ def _default_kwargs(self):
154152
return json.loads(self._parse_kwargs(**kwargs)['body'])
155153

156154
def _parse_kwargs(self, *, min_frequency=None, max_frequency=None,
157-
top20=None, chemical_name=None,
155+
chemical_name=None,
158156
chem_re_flags=0, energy_min=None, energy_max=None,
159157
energy_type=None, intensity_lower_limit=None,
160158
intensity_type=None, transition=None, version=None,
@@ -181,10 +179,6 @@ def _parse_kwargs(self, *, min_frequency=None, max_frequency=None,
181179
Minimum frequency (or any spectral() equivalent)
182180
max_frequency : `astropy.units`
183181
Maximum frequency (or any spectral() equivalent)
184-
top20: str
185-
One of ``'comet'``, ``'planet'``, ``'top20'``, ``'ism_hotcore'``,
186-
``'ism_darkcloud'``, ``'ism_diffusecloud'``.
187-
Overrides chemical_name
188182
chemical_name : str
189183
Name of the chemical to search for. Treated as a regular
190184
expression. An empty set ('', (), [], {}) will match *any*

astroquery/splatalogue/tests/test_splatalogue.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -75,41 +75,6 @@ def test_linelist_type():
7575
"names. See Splatalogue.ALL_LINE_LISTS")
7676

7777

78-
def test_top20_crashorno():
79-
splatalogue.core.Splatalogue.query_lines_async(min_frequency=114 * u.GHz,
80-
max_frequency=116 * u.GHz,
81-
top20='top20',
82-
get_query_payload=True)
83-
with pytest.raises(ValueError) as exc:
84-
splatalogue.core.Splatalogue.query_lines_async(
85-
min_frequency=114 * u.GHz, max_frequency=116 * u.GHz,
86-
top20='invalid', get_query_payload=True)
87-
assert exc.value.args[0] == "Top20 is not one of the allowed values"
88-
89-
90-
def test_band_crashorno():
91-
splatalogue.core.Splatalogue.query_lines_async(band='alma3',
92-
get_query_payload=True)
93-
with pytest.raises(ValueError) as exc:
94-
splatalogue.core.Splatalogue.query_lines_async(band='invalid',
95-
get_query_payload=True)
96-
assert exc.value.args[0] == "Invalid frequency band."
97-
98-
99-
# Upstream changed: there is no distinction between versions for this molecule
100-
# # regression test : version selection should work
101-
# # Unfortunately, it looks like version1 = version2 on the web page now, so this
102-
# # may no longer be a valid test
103-
# @pytest.mark.remote_data
104-
# def test_version_selection():
105-
# results = splatalogue.Splatalogue.query_lines(
106-
# min_frequency= 703*u.GHz,
107-
# max_frequency=706*u.GHz,
108-
# chemical_name='Acetaldehyde',
109-
# version='v1.0'
110-
# )
111-
# assert len(results)==1
112-
11378
def test_exclude(patch_post):
11479
# regression test for issue 616
11580
payload = splatalogue.Splatalogue.query_lines_async(min_frequency=114 * u.GHz,

0 commit comments

Comments
 (0)