Skip to content

Commit 22977b3

Browse files
committed
FIX SPLATALOGUE DATA: Merge branch 'splatalogue-setupfix'
2 parents 38ba3cb + e0cf242 commit 22977b3

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

astroquery/splatalogue/setup_package.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44

55
def get_package_data():
66
paths_test = [os.path.join('data', 'CO_colons.csv')]
7+
paths_data = [os.path.join('data','*.json')]
78

8-
return {'astroquery.splatalogue.tests': paths_test}
9+
return {'astroquery.splatalogue.tests': paths_test,
10+
'astroquery.splatalogue': paths_data}

astroquery/splatalogue/tests/test_splatalogue.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ def test_init(patch_post):
4141
assert len(x) == len(y)
4242
assert all(y['Species'] == x['Species'])
4343
assert all(x['Chemical Name']==y['Chemical Name'])
44+
45+
def test_load_species_table():
46+
tbl = splatalogue.load_species_table.species_lookuptable()
47+
CO = tbl.find(' CO ')
48+
assert len(CO) == 4

setup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@
7070
extensions = []
7171

7272
# A dictionary to keep track of all package data to install
73-
package_data = {PACKAGENAME: ['data/*'],
74-
'astroquery.splatalogue':['astroquery/splatalogue/data/*.json']}
73+
package_data = {PACKAGENAME: ['data/*']}
7574

7675
# A dictionary to keep track of extra packagedir mappings
7776
package_dirs = {}
@@ -104,7 +103,6 @@
104103
scripts=scripts,
105104
requires=['astropy'],
106105
install_requires=['astropy'],
107-
data_files=[('astroquery.splatalogue',['astroquery/splatalogue/data/species.json'])],
108106
include_package_data=True,
109107
provides=[PACKAGENAME],
110108
license=LICENSE,

0 commit comments

Comments
 (0)