Skip to content

Commit

Permalink
Merge pull request #92 from spacemansteve/master
Browse files Browse the repository at this point in the history
support for new institution field
  • Loading branch information
spacemansteve committed Apr 17, 2019
2 parents 938928b + 58931fa commit 8d6b585
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion adsmp/solr_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ def extract_augments_pipeline(db_augments, solrdoc):
'aff_canonical': db_augments.get('aff_canonical', None),
'aff_facet': db_augments.get('aff_facet', None),
'aff_facet_hier': db_augments.get('aff_facet_hier', None),
'aff_id': db_augments.get('aff_id', None)}
'aff_id': db_augments.get('aff_id', None),
'institution': db_augments.get('institution', None)}


def extract_fulltext(data, solrdoc):
Expand Down
4 changes: 3 additions & 1 deletion adsmp/tests/test_solr_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ def test_solr_transformer(self):
u'aff_canonical': [u'-', u'-', u'-', u'-'],
u'aff_facet': [u'-', u'-', u'-', u'-'],
u'aff_facet_hier': [u'-', u'-', u'-', u'-'],
u'aff_id': [u'-', u'-', u'-', u'-']})
u'aff_id': [u'-', u'-', u'-', u'-'],
u'institution': [u'-', u'-', u'-', u'-']})

rec = self.app.get_record('bibcode')
self.assertDictContainsSubset({u'abstract': u'abstract text',
Expand All @@ -188,6 +189,7 @@ def test_solr_transformer(self):
u'aff_facet': [u'-', u'-', u'-', u'-'],
u'aff_facet_hier': [u'-', u'-', u'-', u'-'],
u'aff_id': [u'-', u'-', u'-', u'-'],
u'institution': [u'-', u'-', u'-', u'-'],
u'alternate_bibcode': [u'2003adass..12..283B'],
u'author': [u'Blecksmith, E.', u'Paltani, S.', u'Rots, A.', u'Winkelman, S.'],
u'author_count': 4,
Expand Down
3 changes: 2 additions & 1 deletion adsmp/tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def test_task_update_record_augments(self):
u"Kurtz, M. K.",
u"Stevenson, W. H."
],
u"bibcode": u"1971SPIE...26..187M"
u"bibcode": u"1971SPIE...26..187M",
u"institution": []
}
tasks.task_update_record(AugmentAffiliationResponseRecord(**d))
db_rec = self.app.get_record(bibcode='1971SPIE...26..187M')
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
git+https://github.com/adsabs/ADSPipelineUtils.git@v1.0.10
git+https://github.com/adsabs/ADSPipelineUtils.git@v1.0.12
alembic==0.9.1
DateTime==4.1.1
librabbitmq==1.6.1
Expand Down

0 comments on commit 8d6b585

Please sign in to comment.