From 8e07662e654cdceeb4288ab9002aa855dde3efd0 Mon Sep 17 00:00:00 2001 From: Paul Makepeace Date: Thu, 21 Jul 2011 17:03:17 +0000 Subject: [PATCH] Remove incomplete reconciliation response parsing. It's not exposed in the API yet and changed from Refine 2.0 to 2.1 --- google/refine/refine.py | 24 ------------------------ tests/test_refine_small.py | 4 ---- 2 files changed, 28 deletions(-) diff --git a/google/refine/refine.py b/google/refine/refine.py index 8cd01a1..ce6abc1 100644 --- a/google/refine/refine.py +++ b/google/refine/refine.py @@ -211,9 +211,6 @@ def RowsResponseFactory(column_index): self.index = row_response['i'] self.row = [c['v'] if c else None for c in row_response['cells']] - # list of reconciliation ids indexing into self.recons - self.recon = [c.get('r', None) if c else None - for c in row_response['cells']] def __getitem__(self, column): # Trailing nulls seem to be stripped from row data try: @@ -237,27 +234,6 @@ def RowsResponseFactory(column_index): self.start = response['start'] self.limit = response['limit'] self.total = response['total'] - self.pool = response['pool'] - self.recons = self.pool['recons'] - #"1307457513974512303": { - # "id": 1307457513974512303, - # "service": "http://.../reconcile/", - # "identifierSpace": "http://.../ns/authority", - # "schemaSpace": "http://.../ns/type", - # # j for judgment - # "j": "none", # "matched" - # # c for candidates. Indexes into self.recon_candidates - # "c": ["/domain/type/id", ...] - #} - # Recon data structure changed after Refine 2.0 - if 'reconCandidates' in self.pool: - self.recon_candidates = self.pool['reconCandidates'] - #"/domain/type/id": { - # "id": "/domain/type/id", - # "name": "...", - # "score": 0.439394, - # "types": ["/domain/type"] - #} self.rows = self.RefineRows(response['rows']) return RowsResponse diff --git a/tests/test_refine_small.py b/tests/test_refine_small.py index 48b3135..4559b44 100644 --- a/tests/test_refine_small.py +++ b/tests/test_refine_small.py @@ -33,10 +33,6 @@ class RefineRowsTest(unittest.TestCase): u'mode': u'row-based', u'filtered': 10, u'total': 10, - u'pool': { - u'recons': {}, - u'reconCandidates': {} - } }) self.assertEqual(len(response.rows), 1) # test iteration