Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding planetary feature #47

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adsdata/file_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
data_files['data_link'] = {'path': 'links/facet_datasources/datasources.links', 'default_value': {},
'extra_values': {'link_type': 'DATA', 'property': ['DATA']}, 'multiline': True,
'subparts': ['link_sub_type', 'item_count', ['url'], ['title']]}
data_files['gpn'] = {'path': 'links/gpn/all.links', 'default_value': [], 'multiline': True}
data_files['planetary_feature'] = {'path': 'links/gpn/all.links', 'default_value': [], 'multiline': True}
data_files['uat'] = {'path': 'links/uat/all.links', 'default_value': [], 'multiline': True}

# file properties definitions required to generate metrics for CitationCapture records
Expand Down
4 changes: 2 additions & 2 deletions adsdata/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_read(self):
self.assertEqual(d['private'], {'private': False})
self.assertEqual(d['pub_openaccess'], {'pub_openaccess': False})
self.assertEqual(d['refereed'], {'refereed': False})
self.assertFalse(d['gpn'])
self.assertFalse(d['planetary_feature'])
self.assertEqual(d['uat'], ['cosmology/origin of the universe/early universe/recombination (cosmology)/cosmic background radiation/cosmic microwave background radiation/322',
'cosmology/origin of the universe/big bang theory/recombination (cosmology)/cosmic background radiation/cosmic microwave background radiation/322',
'observational astronomy/astronomical methods/radio astronomy/cosmic noise/cosmic background radiation/cosmic microwave background radiation/322',
Expand All @@ -70,7 +70,7 @@ def test_read(self):
self.assertEqual(d['private'], {'private': False})
self.assertEqual(d['pub_openaccess'], {'pub_openaccess': False})
self.assertEqual(d['refereed'], {'refereed': False})
self.assertEqual(d['gpn'], ['Moon/Mare/Mare Imbrium/3678', 'Moon/Crater/Alder/171', 'Moon/Crater/Finsen/1959', 'Moon/Crater/Leibnitz/3335'])
self.assertEqual(d['planetary_feature'], ['Moon/Mare/Mare Imbrium/3678', 'Moon/Crater/Alder/171', 'Moon/Crater/Finsen/1959', 'Moon/Crater/Leibnitz/3335'])

def test_protobuf(self):
"""make sure protobuf are created without an exception"""
Expand Down
6 changes: 3 additions & 3 deletions adsdata/tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ def test_bibgroup(self):
self.assertEqual({"bibgroup": []}, f.read_value_for('2021ZZZZZ.502..510J'))

def test_planetary_names(self):
f = reader.NonbibFileReader('gpn', data_files['gpn'])
self.assertEqual({'gpn': ['Moon/Crater/Langrenus/3273']}, f.read_value_for('2000Icar..146..420D'))
self.assertEqual({'gpn': ['Mars/Patera/Apollinaris Patera/323', 'Mars/Fossa/Medusae Fossae/3795', 'Mars/Fossa/Sirenum Fossae/5575', 'Mars/Terra/Terra Cimmeria/5930', 'Mars/Terra/Terra Sirenum/5932', 'Mars/Crater/Copernicus/1297','Mars/Crater/Gusev/2289','Mars/Crater/Kepler/2991','Mars/Crater/New Plymouth/4231','Mars/Crater/Newton/4236'] },f.read_value_for('2004JGRE..10912009I'))
f = reader.NonbibFileReader('planetary_feature', data_files['planetary_feature'])
self.assertEqual({'planetary_feature': ['Moon/Crater/Langrenus/3273']}, f.read_value_for('2000Icar..146..420D'))
self.assertEqual({'planetary_feature': ['Mars/Patera/Apollinaris Patera/323', 'Mars/Fossa/Medusae Fossae/3795', 'Mars/Fossa/Sirenum Fossae/5575', 'Mars/Terra/Terra Cimmeria/5930', 'Mars/Terra/Terra Sirenum/5932', 'Mars/Crater/Copernicus/1297','Mars/Crater/Gusev/2289','Mars/Crater/Kepler/2991','Mars/Crater/New Plymouth/4231','Mars/Crater/Newton/4236'] },f.read_value_for('2004JGRE..10912009I'))

def test_uat(self):
f = reader.NonbibFileReader('uat', data_files['uat'])
Expand Down