Skip to content

Commit

Permalink
add aff_raw field to augment pipeline message
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacemanSteve authored and SpacemanSteve committed Jan 8, 2020
1 parent ad4778a commit 0ab8b32
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
15 changes: 11 additions & 4 deletions adsmsg/protobuf/augmentrecord_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions adsmsg/tests/test_affiliation_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def test_affiliation_response(self):
"aff_id": ['placeholder'],
"institution": [
"CfA"
],
'aff_raw': [
"Harvard-Smithsonian Center for Astrophysics, Cambridge, MA."
]
}
a = AugmentAffiliationResponseRecord(**d)
Expand All @@ -82,6 +85,7 @@ def test_affiliation_response(self):
self.assertEqual(a.aff_canonical, d['aff_canonical'])
self.assertEqual(a.aff_facet_hier, d['aff_facet_hier'])
self.assertEqual(a.aff_id, d['aff_id'])
self.assertEqual(a.aff_raw, d['aff_raw'])
self.assertEqual(a.institution, d['institution'])

def test_affiliation_response_list(self):
Expand All @@ -108,6 +112,9 @@ def test_affiliation_response_list(self):
"aff_id": ['placeholder'],
"institution": [
"CfA"
],
'aff_raw': [
"Harvard-Smithsonian Center for Astrophysics, Cambridge, MA."
]
}
d_list = [d]
Expand All @@ -124,4 +131,5 @@ def test_affiliation_response_list(self):
self.assertEqual(m.affiliation_responses[i].aff_canonical, d_list[i]['aff_canonical'])
self.assertEqual(m.affiliation_responses[i].aff_facet_hier, d_list[i]['aff_facet_hier'])
self.assertEqual(m.affiliation_responses[i].aff_id, d_list[i]['aff_id'])
self.assertEqual(m.affiliation_responses[i].aff_raw, d_list[i]['aff_raw'])
self.assertEqual(m.affiliation_responses[i].institution, d_list[i]['institution'])
1 change: 1 addition & 0 deletions specs/augmentrecord.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ message AugmentAffiliationResponseRecord {
repeated string aff_facet_hier = 8;
repeated string aff_id = 9;
repeated string institution = 10;
repeated string aff_raw = 11;
}

// also support lists of the above
Expand Down

0 comments on commit 0ab8b32

Please sign in to comment.