Skip to content

Commit e0cf242

Browse files
committed
move splatalogue setup to its own setup_package and add a new test
1 parent c5a7aab commit e0cf242

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 = {}
@@ -93,7 +92,6 @@
9392
scripts=scripts,
9493
requires=['astropy'],
9594
install_requires=['astropy'],
96-
data_files=[('astroquery.splatalogue',['astroquery/splatalogue/data/species.json'])],
9795
include_package_data=True,
9896
provides=[PACKAGENAME],
9997
license=LICENSE,

0 commit comments

Comments
 (0)