{"action":"closed","number":25,"pull_request":{"url":"https://api.github.com/repos/datamade/dedupe-examples/pulls/25","id":42614663,"html_url":"https://github.com/datamade/dedupe-examples/pull/25","diff_url":"https://github.com/datamade/dedupe-examples/pull/25.diff","patch_url":"https://github.com/datamade/dedupe-examples/pull/25.patch","issue_url":"https://api.github.com/repos/datamade/dedupe-examples/issues/25","number":25,"state":"closed","locked":false,"title":"Update call to dedupe.blocker.index in pgsql_big_dedupe_example for dedupe v0.8.0.1.7.","user":{"login":"manleyjster","id":1668487,"avatar_url":"https://avatars.githubusercontent.com/u/1668487?v=3","gravatar_id":"","url":"https://api.github.com/users/manleyjster","html_url":"https://github.com/manleyjster","followers_url":"https://api.github.com/users/manleyjster/followers","following_url":"https://api.github.com/users/manleyjster/following{/other_user}","gists_url":"https://api.github.com/users/manleyjster/gists{/gist_id}","starred_url":"https://api.github.com/users/manleyjster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manleyjster/subscriptions","organizations_url":"https://api.github.com/users/manleyjster/orgs","repos_url":"https://api.github.com/users/manleyjster/repos","events_url":"https://api.github.com/users/manleyjster/events{/privacy}","received_events_url":"https://api.github.com/users/manleyjster/received_events","type":"User","site_admin":false},"body":"As it stands, pgsql_big_dedupe_example fails when run with dedupe v0.8.0.1.7 (the latest currently available on pypi). Running `python pgsql_big_dedupe_example.py` generates the following output:\r\n\r\n```\r\nINFO:root:Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt\r\nINFO:root:Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt\r\nreading from  pgsql_big_dedupe_example_settings\r\nblocking...\r\ncreating blocking_map database\r\ncreating inverted index\r\nTraceback (most recent call last):\r\n  File \"pgsql_big_dedupe_example.py\", line 177, in <module>\r\n    deduper.blocker.index(field_data, field)\r\n  File \"/home/ec2-user/dedupe-examples/pgsql_big_dedupe_example/local/lib/python2.7/site-packages/dedupe/blocking.py\", line 74, in index\r\n    index.index(preprocess(doc))\r\n  File \"/home/ec2-user/dedupe-examples/pgsql_big_dedupe_example/local/lib/python2.7/site-packages/dedupe/predicates.py\", line 161, in preprocess\r\n    return tuple(ngrams(doc.replace(' ', ''), 2))\r\nAttributeError: 'tuple' object has no attribute 'replace'\r\n```\r\n\r\nThis PR fixes this issue by bringing the call to `deduper.blocker.index` up to date with the [current documentation for dedupe v0.8](http://dedupe.readthedocs.org/en/latest/API-documentation.html): \r\n\r\n> **blocker.index(*field_data*, *field*)**\r\n> Indexes the data from a field for use in a index predicate.\r\n\r\n> **Parameters**:\t\r\n> **field data** (set) – The unique field values that appear in your data.\r\n> **field** (string) – The name of the field\r\n```python\r\n> for field in deduper.blocker.index_fields :\r\n>     field_data = set(record[field] for record in data)\r\n>     deduper.index(field_data, field)\r\n````\r\n\r\n","created_at":"2015-08-17T17:48:29Z","updated_at":"2015-08-19T21:49:26Z","closed_at":"2015-08-19T21:49:26Z","merged_at":"2015-08-19T21:49:26Z","merge_commit_sha":"0c4f711cd700eaa55132b225f4ae94a910b46cca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/datamade/dedupe-examples/pulls/25/commits","review_comments_url":"https://api.github.com/repos/datamade/dedupe-examples/pulls/25/comments","review_comment_url":"https://api.github.com/repos/datamade/dedupe-examples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/datamade/dedupe-examples/issues/25/comments","statuses_url":"https://api.github.com/repos/datamade/dedupe-examples/statuses/d7e3de4c68a20c83dbbdaf0aeb350fc83bcb21aa","head":{"label":"manleyjster:update-pgsql-big-example","ref":"update-pgsql-big-example","sha":"d7e3de4c68a20c83dbbdaf0aeb350fc83bcb21aa","user":{"login":"manleyjster","id":1668487,"avatar_url":"https://avatars.githubusercontent.com/u/1668487?v=3","gravatar_id":"","url":"https://api.github.com/users/manleyjster","html_url":"https://github.com/manleyjster","followers_url":"https://api.github.com/users/manleyjster/followers","following_url":"https://api.github.com/users/manleyjster/following{/other_user}","gists_url":"https://api.github.com/users/manleyjster/gists{/gist_id}","starred_url":"https://api.github.com/users/manleyjster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manleyjster/subscriptions","organizations_url":"https://api.github.com/users/manleyjster/orgs","repos_url":"https://api.github.com/users/manleyjster/repos","events_url":"https://api.github.com/users/manleyjster/events{/privacy}","received_events_url":"https://api.github.com/users/manleyjster/received_events","type":"User","site_admin":false},"repo":{"id":40915134,"name":"dedupe-examples","full_name":"manleyjster/dedupe-examples","owner":{"login":"manleyjster","id":1668487,"avatar_url":"https://avatars.githubusercontent.com/u/1668487?v=3","gravatar_id":"","url":"https://api.github.com/users/manleyjster","html_url":"https://github.com/manleyjster","followers_url":"https://api.github.com/users/manleyjster/followers","following_url":"https://api.github.com/users/manleyjster/following{/other_user}","gists_url":"https://api.github.com/users/manleyjster/gists{/gist_id}","starred_url":"https://api.github.com/users/manleyjster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manleyjster/subscriptions","organizations_url":"https://api.github.com/users/manleyjster/orgs","repos_url":"https://api.github.com/users/manleyjster/repos","events_url":"https://api.github.com/users/manleyjster/events{/privacy}","received_events_url":"https://api.github.com/users/manleyjster/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manleyjster/dedupe-examples","description":"Examples for using the dedupe library","fork":true,"url":"https://api.github.com/repos/manleyjster/dedupe-examples","forks_url":"https://api.github.com/repos/manleyjster/dedupe-examples/forks","keys_url":"https://api.github.com/repos/manleyjster/dedupe-examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manleyjster/dedupe-examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manleyjster/dedupe-examples/teams","hooks_url":"https://api.github.com/repos/manleyjster/dedupe-examples/hooks","issue_events_url":"https://api.github.com/repos/manleyjster/dedupe-examples/issues/events{/number}","events_url":"https://api.github.com/repos/manleyjster/dedupe-examples/events","assignees_url":"https://api.github.com/repos/manleyjster/dedupe-examples/assignees{/user}","branches_url":"https://api.github.com/repos/manleyjster/dedupe-examples/branches{/branch}","tags_url":"https://api.github.com/repos/manleyjster/dedupe-examples/tags","blobs_url":"https://api.github.com/repos/manleyjster/dedupe-examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manleyjster/dedupe-examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manleyjster/dedupe-examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/manleyjster/dedupe-examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manleyjster/dedupe-examples/statuses/{sha}","languages_url":"https://api.github.com/repos/manleyjster/dedupe-examples/languages","stargazers_url":"https://api.github.com/repos/manleyjster/dedupe-examples/stargazers","contributors_url":"https://api.github.com/repos/manleyjster/dedupe-examples/contributors","subscribers_url":"https://api.github.com/repos/manleyjster/dedupe-examples/subscribers","subscription_url":"https://api.github.com/repos/manleyjster/dedupe-examples/subscription","commits_url":"https://api.github.com/repos/manleyjster/dedupe-examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/manleyjster/dedupe-examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/manleyjster/dedupe-examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/manleyjster/dedupe-examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/manleyjster/dedupe-examples/contents/{+path}","compare_url":"https://api.github.com/repos/manleyjster/dedupe-examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manleyjster/dedupe-examples/merges","archive_url":"https://api.github.com/repos/manleyjster/dedupe-examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manleyjster/dedupe-examples/downloads","issues_url":"https://api.github.com/repos/manleyjster/dedupe-examples/issues{/number}","pulls_url":"https://api.github.com/repos/manleyjster/dedupe-examples/pulls{/number}","milestones_url":"https://api.github.com/repos/manleyjster/dedupe-examples/milestones{/number}","notifications_url":"https://api.github.com/repos/manleyjster/dedupe-examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manleyjster/dedupe-examples/labels{/name}","releases_url":"https://api.github.com/repos/manleyjster/dedupe-examples/releases{/id}","created_at":"2015-08-17T17:39:53Z","updated_at":"2015-08-17T17:39:54Z","pushed_at":"2015-08-18T03:27:56Z","git_url":"git://github.com/manleyjster/dedupe-examples.git","ssh_url":"git@github.com:manleyjster/dedupe-examples.git","clone_url":"https://github.com/manleyjster/dedupe-examples.git","svn_url":"https://github.com/manleyjster/dedupe-examples","homepage":null,"size":5325,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"datamade:master","ref":"master","sha":"d1e5fee98174292f67de34ef1dabb784afbeb244","user":{"login":"datamade","id":3723931,"avatar_url":"https://avatars.githubusercontent.com/u/3723931?v=3","gravatar_id":"","url":"https://api.github.com/users/datamade","html_url":"https://github.com/datamade","followers_url":"https://api.github.com/users/datamade/followers","following_url":"https://api.github.com/users/datamade/following{/other_user}","gists_url":"https://api.github.com/users/datamade/gists{/gist_id}","starred_url":"https://api.github.com/users/datamade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datamade/subscriptions","organizations_url":"https://api.github.com/users/datamade/orgs","repos_url":"https://api.github.com/users/datamade/repos","events_url":"https://api.github.com/users/datamade/events{/privacy}","received_events_url":"https://api.github.com/users/datamade/received_events","type":"Organization","site_admin":false},"repo":{"id":18366570,"name":"dedupe-examples","full_name":"datamade/dedupe-examples","owner":{"login":"datamade","id":3723931,"avatar_url":"https://avatars.githubusercontent.com/u/3723931?v=3","gravatar_id":"","url":"https://api.github.com/users/datamade","html_url":"https://github.com/datamade","followers_url":"https://api.github.com/users/datamade/followers","following_url":"https://api.github.com/users/datamade/following{/other_user}","gists_url":"https://api.github.com/users/datamade/gists{/gist_id}","starred_url":"https://api.github.com/users/datamade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datamade/subscriptions","organizations_url":"https://api.github.com/users/datamade/orgs","repos_url":"https://api.github.com/users/datamade/repos","events_url":"https://api.github.com/users/datamade/events{/privacy}","received_events_url":"https://api.github.com/users/datamade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datamade/dedupe-examples","description":"Examples for using the dedupe library","fork":false,"url":"https://api.github.com/repos/datamade/dedupe-examples","forks_url":"https://api.github.com/repos/datamade/dedupe-examples/forks","keys_url":"https://api.github.com/repos/datamade/dedupe-examples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datamade/dedupe-examples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datamade/dedupe-examples/teams","hooks_url":"https://api.github.com/repos/datamade/dedupe-examples/hooks","issue_events_url":"https://api.github.com/repos/datamade/dedupe-examples/issues/events{/number}","events_url":"https://api.github.com/repos/datamade/dedupe-examples/events","assignees_url":"https://api.github.com/repos/datamade/dedupe-examples/assignees{/user}","branches_url":"https://api.github.com/repos/datamade/dedupe-examples/branches{/branch}","tags_url":"https://api.github.com/repos/datamade/dedupe-examples/tags","blobs_url":"https://api.github.com/repos/datamade/dedupe-examples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datamade/dedupe-examples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datamade/dedupe-examples/git/refs{/sha}","trees_url":"https://api.github.com/repos/datamade/dedupe-examples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datamade/dedupe-examples/statuses/{sha}","languages_url":"https://api.github.com/repos/datamade/dedupe-examples/languages","stargazers_url":"https://api.github.com/repos/datamade/dedupe-examples/stargazers","contributors_url":"https://api.github.com/repos/datamade/dedupe-examples/contributors","subscribers_url":"https://api.github.com/repos/datamade/dedupe-examples/subscribers","subscription_url":"https://api.github.com/repos/datamade/dedupe-examples/subscription","commits_url":"https://api.github.com/repos/datamade/dedupe-examples/commits{/sha}","git_commits_url":"https://api.github.com/repos/datamade/dedupe-examples/git/commits{/sha}","comments_url":"https://api.github.com/repos/datamade/dedupe-examples/comments{/number}","issue_comment_url":"https://api.github.com/repos/datamade/dedupe-examples/issues/comments{/number}","contents_url":"https://api.github.com/repos/datamade/dedupe-examples/contents/{+path}","compare_url":"https://api.github.com/repos/datamade/dedupe-examples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datamade/dedupe-examples/merges","archive_url":"https://api.github.com/repos/datamade/dedupe-examples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datamade/dedupe-examples/downloads","issues_url":"https://api.github.com/repos/datamade/dedupe-examples/issues{/number}","pulls_url":"https://api.github.com/repos/datamade/dedupe-examples/pulls{/number}","milestones_url":"https://api.github.com/repos/datamade/dedupe-examples/milestones{/number}","notifications_url":"https://api.github.com/repos/datamade/dedupe-examples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datamade/dedupe-examples/labels{/name}","releases_url":"https://api.github.com/repos/datamade/dedupe-examples/releases{/id}","created_at":"2014-04-02T13:04:28Z","updated_at":"2015-07-09T21:06:50Z","pushed_at":"2015-08-19T21:49:26Z","git_url":"git://github.com/datamade/dedupe-examples.git","ssh_url":"git@github.com:datamade/dedupe-examples.git","clone_url":"https://github.com/datamade/dedupe-examples.git","svn_url":"https://github.com/datamade/dedupe-examples","homepage":null,"size":6014,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":6,"forks":17,"open_issues":6,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/datamade/dedupe-examples/pulls/25"},"html":{"href":"https://github.com/datamade/dedupe-examples/pull/25"},"issue":{"href":"https://api.github.com/repos/datamade/dedupe-examples/issues/25"},"comments":{"href":"https://api.github.com/repos/datamade/dedupe-examples/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/datamade/dedupe-examples/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/datamade/dedupe-examples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/datamade/dedupe-examples/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/datamade/dedupe-examples/statuses/d7e3de4c68a20c83dbbdaf0aeb350fc83bcb21aa"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"fgregg","id":536941,"avatar_url":"https://avatars.githubusercontent.com/u/536941?v=3","gravatar_id":"","url":"https://api.github.com/users/fgregg","html_url":"https://github.com/fgregg","followers_url":"https://api.github.com/users/fgregg/followers","following_url":"https://api.github.com/users/fgregg/following{/other_user}","gists_url":"https://api.github.com/users/fgregg/gists{/gist_id}","starred_url":"https://api.github.com/users/fgregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgregg/subscriptions","organizations_url":"https://api.github.com/users/fgregg/orgs","repos_url":"https://api.github.com/users/fgregg/repos","events_url":"https://api.github.com/users/fgregg/events{/privacy}","received_events_url":"https://api.github.com/users/fgregg/received_events","type":"User","site_admin":false},"comments":0,"review_comments":3,"commits":2,"additions":2,"deletions":9,"changed_files":1}}