{"action":"created","comment":{"url":"https://api.github.com/repos/18F/openFEC/pulls/comments/46843809","id":46843809,"diff_hunk":"@@ -50,6 +50,17 @@ def execute_sql_folder(path, processes):\n             execute_sql_file(path)\n \n @manager.command\n+def load_nicknames():\n+    import pandas as pd\n+    import sqlalchemy as sa\n+    try:\n+        table = sa.Table('ofec_nicknames', db.metadata, autoload_with=db.engine)\n+        db.engine.execute(table.delete())\n+    except sa.exc.NoSuchTableError:\n+        pass\n+    load_table(pd.read_csv('data/nicknames.csv'), 'ofec_nicknames')\n+\n+@manager.command\n def load_pacronyms():","path":"manage.py","position":null,"original_position":15,"commit_id":"9126f690669aa4fae2589b811ea926c71112146c","original_commit_id":"f03f108f22bb81d88aa6e9fbab8d11cec1375241","user":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"body":"Thanks, I updated the patch and don't see this happening anymore. Can you verify that it's behaving as expected on your side as well?","created_at":"2015-12-07T16:44:45Z","updated_at":"2015-12-07T16:44:45Z","html_url":"https://github.com/18F/openFEC/pull/1374#discussion_r46843809","pull_request_url":"https://api.github.com/repos/18F/openFEC/pulls/1374","_links":{"self":{"href":"https://api.github.com/repos/18F/openFEC/pulls/comments/46843809"},"html":{"href":"https://github.com/18F/openFEC/pull/1374#discussion_r46843809"},"pull_request":{"href":"https://api.github.com/repos/18F/openFEC/pulls/1374"}}},"pull_request":{"url":"https://api.github.com/repos/18F/openFEC/pulls/1374","id":51960020,"html_url":"https://github.com/18F/openFEC/pull/1374","diff_url":"https://github.com/18F/openFEC/pull/1374.diff","patch_url":"https://github.com/18F/openFEC/pull/1374.patch","issue_url":"https://api.github.com/repos/18F/openFEC/issues/1374","number":1374,"state":"open","locked":false,"title":"Feature/candidate nicknames","user":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"body":"Add table of hard-coded candidate nicknames, analogous to committee\r\n\"pacronyms\". Nicknames are grouped by candidate and added to the\r\ncandidate fulltext table on building materialized views.\r\n\r\n[Resolves https://github.com/18F/FEC/issues/165]\r\n\r\n@leahbannon @LindsayYoung: so far, this only includes Bernie Sanders. We should still go over the major candidate and add them to the nicknames table included in this patch as necessary. And we still likely want to think about a more general fix for nicknames--this is just a quick fix that hard-codes names for important candidates.","created_at":"2015-11-27T04:53:00Z","updated_at":"2015-12-07T16:44:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed89c239e309f558d954fbf539056fb7a304ca9b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/18F/openFEC/pulls/1374/commits","review_comments_url":"https://api.github.com/repos/18F/openFEC/pulls/1374/comments","review_comment_url":"https://api.github.com/repos/18F/openFEC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/18F/openFEC/issues/1374/comments","statuses_url":"https://api.github.com/repos/18F/openFEC/statuses/9126f690669aa4fae2589b811ea926c71112146c","head":{"label":"jmcarp:feature/candidate-nicknames","ref":"feature/candidate-nicknames","sha":"9126f690669aa4fae2589b811ea926c71112146c","user":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"repo":{"id":33560779,"name":"openFEC","full_name":"jmcarp/openFEC","owner":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmcarp/openFEC","description":"An experiment in taking data from the Federal Election Commission and harmonizing/cleaning it up to make it easier for external developers to use and analyze.","fork":true,"url":"https://api.github.com/repos/jmcarp/openFEC","forks_url":"https://api.github.com/repos/jmcarp/openFEC/forks","keys_url":"https://api.github.com/repos/jmcarp/openFEC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmcarp/openFEC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmcarp/openFEC/teams","hooks_url":"https://api.github.com/repos/jmcarp/openFEC/hooks","issue_events_url":"https://api.github.com/repos/jmcarp/openFEC/issues/events{/number}","events_url":"https://api.github.com/repos/jmcarp/openFEC/events","assignees_url":"https://api.github.com/repos/jmcarp/openFEC/assignees{/user}","branches_url":"https://api.github.com/repos/jmcarp/openFEC/branches{/branch}","tags_url":"https://api.github.com/repos/jmcarp/openFEC/tags","blobs_url":"https://api.github.com/repos/jmcarp/openFEC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmcarp/openFEC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmcarp/openFEC/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmcarp/openFEC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmcarp/openFEC/statuses/{sha}","languages_url":"https://api.github.com/repos/jmcarp/openFEC/languages","stargazers_url":"https://api.github.com/repos/jmcarp/openFEC/stargazers","contributors_url":"https://api.github.com/repos/jmcarp/openFEC/contributors","subscribers_url":"https://api.github.com/repos/jmcarp/openFEC/subscribers","subscription_url":"https://api.github.com/repos/jmcarp/openFEC/subscription","commits_url":"https://api.github.com/repos/jmcarp/openFEC/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmcarp/openFEC/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmcarp/openFEC/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmcarp/openFEC/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmcarp/openFEC/contents/{+path}","compare_url":"https://api.github.com/repos/jmcarp/openFEC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmcarp/openFEC/merges","archive_url":"https://api.github.com/repos/jmcarp/openFEC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmcarp/openFEC/downloads","issues_url":"https://api.github.com/repos/jmcarp/openFEC/issues{/number}","pulls_url":"https://api.github.com/repos/jmcarp/openFEC/pulls{/number}","milestones_url":"https://api.github.com/repos/jmcarp/openFEC/milestones{/number}","notifications_url":"https://api.github.com/repos/jmcarp/openFEC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmcarp/openFEC/labels{/name}","releases_url":"https://api.github.com/repos/jmcarp/openFEC/releases{/id}","created_at":"2015-04-07T18:28:37Z","updated_at":"2015-04-07T18:28:38Z","pushed_at":"2015-12-07T16:37:41Z","git_url":"git://github.com/jmcarp/openFEC.git","ssh_url":"git@github.com:jmcarp/openFEC.git","clone_url":"https://github.com/jmcarp/openFEC.git","svn_url":"https://github.com/jmcarp/openFEC","homepage":null,"size":48337,"stargazers_count":0,"watchers_count":0,"language":"SQLPL","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"18F:develop","ref":"develop","sha":"751ecff8aee79989f07ec7345a399b042ea04b76","user":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"repo":{"id":23116127,"name":"openFEC","full_name":"18F/openFEC","owner":{"login":"18F","id":6233994,"avatar_url":"https://avatars.githubusercontent.com/u/6233994?v=3","gravatar_id":"","url":"https://api.github.com/users/18F","html_url":"https://github.com/18F","followers_url":"https://api.github.com/users/18F/followers","following_url":"https://api.github.com/users/18F/following{/other_user}","gists_url":"https://api.github.com/users/18F/gists{/gist_id}","starred_url":"https://api.github.com/users/18F/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/18F/subscriptions","organizations_url":"https://api.github.com/users/18F/orgs","repos_url":"https://api.github.com/users/18F/repos","events_url":"https://api.github.com/users/18F/events{/privacy}","received_events_url":"https://api.github.com/users/18F/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/18F/openFEC","description":"The first RESTful API for the Federal Election Commission. We're aiming to make campaign finance more accessible for journalists, academics, developers, and other transparency seekers.","fork":false,"url":"https://api.github.com/repos/18F/openFEC","forks_url":"https://api.github.com/repos/18F/openFEC/forks","keys_url":"https://api.github.com/repos/18F/openFEC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/18F/openFEC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/18F/openFEC/teams","hooks_url":"https://api.github.com/repos/18F/openFEC/hooks","issue_events_url":"https://api.github.com/repos/18F/openFEC/issues/events{/number}","events_url":"https://api.github.com/repos/18F/openFEC/events","assignees_url":"https://api.github.com/repos/18F/openFEC/assignees{/user}","branches_url":"https://api.github.com/repos/18F/openFEC/branches{/branch}","tags_url":"https://api.github.com/repos/18F/openFEC/tags","blobs_url":"https://api.github.com/repos/18F/openFEC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/18F/openFEC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/18F/openFEC/git/refs{/sha}","trees_url":"https://api.github.com/repos/18F/openFEC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/18F/openFEC/statuses/{sha}","languages_url":"https://api.github.com/repos/18F/openFEC/languages","stargazers_url":"https://api.github.com/repos/18F/openFEC/stargazers","contributors_url":"https://api.github.com/repos/18F/openFEC/contributors","subscribers_url":"https://api.github.com/repos/18F/openFEC/subscribers","subscription_url":"https://api.github.com/repos/18F/openFEC/subscription","commits_url":"https://api.github.com/repos/18F/openFEC/commits{/sha}","git_commits_url":"https://api.github.com/repos/18F/openFEC/git/commits{/sha}","comments_url":"https://api.github.com/repos/18F/openFEC/comments{/number}","issue_comment_url":"https://api.github.com/repos/18F/openFEC/issues/comments{/number}","contents_url":"https://api.github.com/repos/18F/openFEC/contents/{+path}","compare_url":"https://api.github.com/repos/18F/openFEC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/18F/openFEC/merges","archive_url":"https://api.github.com/repos/18F/openFEC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/18F/openFEC/downloads","issues_url":"https://api.github.com/repos/18F/openFEC/issues{/number}","pulls_url":"https://api.github.com/repos/18F/openFEC/pulls{/number}","milestones_url":"https://api.github.com/repos/18F/openFEC/milestones{/number}","notifications_url":"https://api.github.com/repos/18F/openFEC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/18F/openFEC/labels{/name}","releases_url":"https://api.github.com/repos/18F/openFEC/releases{/id}","created_at":"2014-08-19T15:51:14Z","updated_at":"2015-12-06T11:12:41Z","pushed_at":"2015-12-07T16:37:41Z","git_url":"git://github.com/18F/openFEC.git","ssh_url":"git@github.com:18F/openFEC.git","clone_url":"https://github.com/18F/openFEC.git","svn_url":"https://github.com/18F/openFEC","homepage":"https://api.open.fec.gov/developers","size":44907,"stargazers_count":116,"watchers_count":116,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":66,"forks":26,"open_issues":66,"watchers":116,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/18F/openFEC/pulls/1374"},"html":{"href":"https://github.com/18F/openFEC/pull/1374"},"issue":{"href":"https://api.github.com/repos/18F/openFEC/issues/1374"},"comments":{"href":"https://api.github.com/repos/18F/openFEC/issues/1374/comments"},"review_comments":{"href":"https://api.github.com/repos/18F/openFEC/pulls/1374/comments"},"review_comment":{"href":"https://api.github.com/repos/18F/openFEC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/18F/openFEC/pulls/1374/commits"},"statuses":{"href":"https://api.github.com/repos/18F/openFEC/statuses/9126f690669aa4fae2589b811ea926c71112146c"}}}}