{"action":"created","comment":{"url":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/comments/155272223","pull_request_review_id":81563386,"id":155272223,"diff_hunk":"@@ -0,0 +1,96 @@\n+\"\"\"Imports entities into the database based on a CSV file.\n+\n+Subclasses indicate in the constructor the name of the entity (for logging purposes),\n+the DAO used to save the entity, the name of the primary key database ID field,\n+the name of the external ID (referenced in the CSV file), and columns that must be populated\n+with some value in the CSV.\n+\n+They then define _entity_from_row(row) to parse an entity out of a row dictionary.\n+\n+When dry_run flag is true, entities are not updated; instead logging indicates what would be","path":"rest-api/tools/csv_importer.py","position":null,"original_position":10,"commit_id":"526d3dce25b9b0f243996c2deb57d55317599084","original_commit_id":"4c01cc0e3928868e1e677b0b6c1c8e3f78982842","user":{"login":"danqrodney","id":12536316,"avatar_url":"https://avatars0.githubusercontent.com/u/12536316?v=4","gravatar_id":"","url":"https://api.github.com/users/danqrodney","html_url":"https://github.com/danqrodney","followers_url":"https://api.github.com/users/danqrodney/followers","following_url":"https://api.github.com/users/danqrodney/following{/other_user}","gists_url":"https://api.github.com/users/danqrodney/gists{/gist_id}","starred_url":"https://api.github.com/users/danqrodney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danqrodney/subscriptions","organizations_url":"https://api.github.com/users/danqrodney/orgs","repos_url":"https://api.github.com/users/danqrodney/repos","events_url":"https://api.github.com/users/danqrodney/events{/privacy}","received_events_url":"https://api.github.com/users/danqrodney/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2017-12-06T15:40:25Z","updated_at":"2017-12-06T15:47:19Z","html_url":"https://github.com/all-of-us/raw-data-repository/pull/544#discussion_r155272223","pull_request_url":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/544","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/comments/155272223"},"html":{"href":"https://github.com/all-of-us/raw-data-repository/pull/544#discussion_r155272223"},"pull_request":{"href":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/544"}},"in_reply_to_id":155073586},"pull_request":{"url":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/544","id":156508140,"html_url":"https://github.com/all-of-us/raw-data-repository/pull/544","diff_url":"https://github.com/all-of-us/raw-data-repository/pull/544.diff","patch_url":"https://github.com/all-of-us/raw-data-repository/pull/544.patch","issue_url":"https://api.github.com/repos/all-of-us/raw-data-repository/issues/544","number":544,"state":"open","locked":false,"title":"New awardee/organization/site importer script.","user":{"login":"danqrodney","id":12536316,"avatar_url":"https://avatars0.githubusercontent.com/u/12536316?v=4","gravatar_id":"","url":"https://api.github.com/users/danqrodney","html_url":"https://github.com/danqrodney","followers_url":"https://api.github.com/users/danqrodney/followers","following_url":"https://api.github.com/users/danqrodney/following{/other_user}","gists_url":"https://api.github.com/users/danqrodney/gists{/gist_id}","starred_url":"https://api.github.com/users/danqrodney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danqrodney/subscriptions","organizations_url":"https://api.github.com/users/danqrodney/orgs","repos_url":"https://api.github.com/users/danqrodney/repos","events_url":"https://api.github.com/users/danqrodney/events{/privacy}","received_events_url":"https://api.github.com/users/danqrodney/received_events","type":"User","site_admin":false},"body":"Refactoring common logic to CsvImporter class.\r\n\r\nNew script that exports data from Google Sheets in CSV format and puts in the data dir.\r\n\r\nChecking in new fake data files as well; won't be used in prod until we have real data that takes the place of our current data in test/test-data/hpos.csv and sites.csv.","created_at":"2017-12-05T16:20:36Z","updated_at":"2017-12-06T15:47:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffaf9f9561f7c07e361406c3516bdb6d36d43cd5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jmandel","id":313089,"avatar_url":"https://avatars0.githubusercontent.com/u/313089?v=4","gravatar_id":"","url":"https://api.github.com/users/jmandel","html_url":"https://github.com/jmandel","followers_url":"https://api.github.com/users/jmandel/followers","following_url":"https://api.github.com/users/jmandel/following{/other_user}","gists_url":"https://api.github.com/users/jmandel/gists{/gist_id}","starred_url":"https://api.github.com/users/jmandel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmandel/subscriptions","organizations_url":"https://api.github.com/users/jmandel/orgs","repos_url":"https://api.github.com/users/jmandel/repos","events_url":"https://api.github.com/users/jmandel/events{/privacy}","received_events_url":"https://api.github.com/users/jmandel/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/544/commits","review_comments_url":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/544/comments","review_comment_url":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/comments{/number}","comments_url":"https://api.github.com/repos/all-of-us/raw-data-repository/issues/544/comments","statuses_url":"https://api.github.com/repos/all-of-us/raw-data-repository/statuses/526d3dce25b9b0f243996c2deb57d55317599084","head":{"label":"all-of-us:danrodney/new_import","ref":"danrodney/new_import","sha":"526d3dce25b9b0f243996c2deb57d55317599084","user":{"login":"all-of-us","id":22846942,"avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"repo":{"id":66000771,"name":"raw-data-repository","full_name":"all-of-us/raw-data-repository","owner":{"login":"all-of-us","id":22846942,"avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/all-of-us/raw-data-repository","description":"PMI DRC data repositories and APIs","fork":false,"url":"https://api.github.com/repos/all-of-us/raw-data-repository","forks_url":"https://api.github.com/repos/all-of-us/raw-data-repository/forks","keys_url":"https://api.github.com/repos/all-of-us/raw-data-repository/keys{/key_id}","collaborators_url":"https://api.github.com/repos/all-of-us/raw-data-repository/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/all-of-us/raw-data-repository/teams","hooks_url":"https://api.github.com/repos/all-of-us/raw-data-repository/hooks","issue_events_url":"https://api.github.com/repos/all-of-us/raw-data-repository/issues/events{/number}","events_url":"https://api.github.com/repos/all-of-us/raw-data-repository/events","assignees_url":"https://api.github.com/repos/all-of-us/raw-data-repository/assignees{/user}","branches_url":"https://api.github.com/repos/all-of-us/raw-data-repository/branches{/branch}","tags_url":"https://api.github.com/repos/all-of-us/raw-data-repository/tags","blobs_url":"https://api.github.com/repos/all-of-us/raw-data-repository/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/all-of-us/raw-data-repository/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/all-of-us/raw-data-repository/git/refs{/sha}","trees_url":"https://api.github.com/repos/all-of-us/raw-data-repository/git/trees{/sha}","statuses_url":"https://api.github.com/repos/all-of-us/raw-data-repository/statuses/{sha}","languages_url":"https://api.github.com/repos/all-of-us/raw-data-repository/languages","stargazers_url":"https://api.github.com/repos/all-of-us/raw-data-repository/stargazers","contributors_url":"https://api.github.com/repos/all-of-us/raw-data-repository/contributors","subscribers_url":"https://api.github.com/repos/all-of-us/raw-data-repository/subscribers","subscription_url":"https://api.github.com/repos/all-of-us/raw-data-repository/subscription","commits_url":"https://api.github.com/repos/all-of-us/raw-data-repository/commits{/sha}","git_commits_url":"https://api.github.com/repos/all-of-us/raw-data-repository/git/commits{/sha}","comments_url":"https://api.github.com/repos/all-of-us/raw-data-repository/comments{/number}","issue_comment_url":"https://api.github.com/repos/all-of-us/raw-data-repository/issues/comments{/number}","contents_url":"https://api.github.com/repos/all-of-us/raw-data-repository/contents/{+path}","compare_url":"https://api.github.com/repos/all-of-us/raw-data-repository/compare/{base}...{head}","merges_url":"https://api.github.com/repos/all-of-us/raw-data-repository/merges","archive_url":"https://api.github.com/repos/all-of-us/raw-data-repository/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/all-of-us/raw-data-repository/downloads","issues_url":"https://api.github.com/repos/all-of-us/raw-data-repository/issues{/number}","pulls_url":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls{/number}","milestones_url":"https://api.github.com/repos/all-of-us/raw-data-repository/milestones{/number}","notifications_url":"https://api.github.com/repos/all-of-us/raw-data-repository/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/all-of-us/raw-data-repository/labels{/name}","releases_url":"https://api.github.com/repos/all-of-us/raw-data-repository/releases{/id}","deployments_url":"https://api.github.com/repos/all-of-us/raw-data-repository/deployments","created_at":"2016-08-18T13:47:08Z","updated_at":"2017-11-06T21:15:02Z","pushed_at":"2017-12-06T15:47:03Z","git_url":"git://github.com/all-of-us/raw-data-repository.git","ssh_url":"git@github.com:all-of-us/raw-data-repository.git","clone_url":"https://github.com/all-of-us/raw-data-repository.git","svn_url":"https://github.com/all-of-us/raw-data-repository","homepage":null,"size":1639,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":5,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"all-of-us:master","ref":"master","sha":"58b1187cd6c8148af37cf875a6fd4c98f8e98f04","user":{"login":"all-of-us","id":22846942,"avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"repo":{"id":66000771,"name":"raw-data-repository","full_name":"all-of-us/raw-data-repository","owner":{"login":"all-of-us","id":22846942,"avatar_url":"https://avatars0.githubusercontent.com/u/22846942?v=4","gravatar_id":"","url":"https://api.github.com/users/all-of-us","html_url":"https://github.com/all-of-us","followers_url":"https://api.github.com/users/all-of-us/followers","following_url":"https://api.github.com/users/all-of-us/following{/other_user}","gists_url":"https://api.github.com/users/all-of-us/gists{/gist_id}","starred_url":"https://api.github.com/users/all-of-us/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all-of-us/subscriptions","organizations_url":"https://api.github.com/users/all-of-us/orgs","repos_url":"https://api.github.com/users/all-of-us/repos","events_url":"https://api.github.com/users/all-of-us/events{/privacy}","received_events_url":"https://api.github.com/users/all-of-us/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/all-of-us/raw-data-repository","description":"PMI DRC data repositories and APIs","fork":false,"url":"https://api.github.com/repos/all-of-us/raw-data-repository","forks_url":"https://api.github.com/repos/all-of-us/raw-data-repository/forks","keys_url":"https://api.github.com/repos/all-of-us/raw-data-repository/keys{/key_id}","collaborators_url":"https://api.github.com/repos/all-of-us/raw-data-repository/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/all-of-us/raw-data-repository/teams","hooks_url":"https://api.github.com/repos/all-of-us/raw-data-repository/hooks","issue_events_url":"https://api.github.com/repos/all-of-us/raw-data-repository/issues/events{/number}","events_url":"https://api.github.com/repos/all-of-us/raw-data-repository/events","assignees_url":"https://api.github.com/repos/all-of-us/raw-data-repository/assignees{/user}","branches_url":"https://api.github.com/repos/all-of-us/raw-data-repository/branches{/branch}","tags_url":"https://api.github.com/repos/all-of-us/raw-data-repository/tags","blobs_url":"https://api.github.com/repos/all-of-us/raw-data-repository/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/all-of-us/raw-data-repository/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/all-of-us/raw-data-repository/git/refs{/sha}","trees_url":"https://api.github.com/repos/all-of-us/raw-data-repository/git/trees{/sha}","statuses_url":"https://api.github.com/repos/all-of-us/raw-data-repository/statuses/{sha}","languages_url":"https://api.github.com/repos/all-of-us/raw-data-repository/languages","stargazers_url":"https://api.github.com/repos/all-of-us/raw-data-repository/stargazers","contributors_url":"https://api.github.com/repos/all-of-us/raw-data-repository/contributors","subscribers_url":"https://api.github.com/repos/all-of-us/raw-data-repository/subscribers","subscription_url":"https://api.github.com/repos/all-of-us/raw-data-repository/subscription","commits_url":"https://api.github.com/repos/all-of-us/raw-data-repository/commits{/sha}","git_commits_url":"https://api.github.com/repos/all-of-us/raw-data-repository/git/commits{/sha}","comments_url":"https://api.github.com/repos/all-of-us/raw-data-repository/comments{/number}","issue_comment_url":"https://api.github.com/repos/all-of-us/raw-data-repository/issues/comments{/number}","contents_url":"https://api.github.com/repos/all-of-us/raw-data-repository/contents/{+path}","compare_url":"https://api.github.com/repos/all-of-us/raw-data-repository/compare/{base}...{head}","merges_url":"https://api.github.com/repos/all-of-us/raw-data-repository/merges","archive_url":"https://api.github.com/repos/all-of-us/raw-data-repository/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/all-of-us/raw-data-repository/downloads","issues_url":"https://api.github.com/repos/all-of-us/raw-data-repository/issues{/number}","pulls_url":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls{/number}","milestones_url":"https://api.github.com/repos/all-of-us/raw-data-repository/milestones{/number}","notifications_url":"https://api.github.com/repos/all-of-us/raw-data-repository/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/all-of-us/raw-data-repository/labels{/name}","releases_url":"https://api.github.com/repos/all-of-us/raw-data-repository/releases{/id}","deployments_url":"https://api.github.com/repos/all-of-us/raw-data-repository/deployments","created_at":"2016-08-18T13:47:08Z","updated_at":"2017-11-06T21:15:02Z","pushed_at":"2017-12-06T15:47:03Z","git_url":"git://github.com/all-of-us/raw-data-repository.git","ssh_url":"git@github.com:all-of-us/raw-data-repository.git","clone_url":"https://github.com/all-of-us/raw-data-repository.git","svn_url":"https://github.com/all-of-us/raw-data-repository","homepage":null,"size":1639,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":5,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/544"},"html":{"href":"https://github.com/all-of-us/raw-data-repository/pull/544"},"issue":{"href":"https://api.github.com/repos/all-of-us/raw-data-repository/issues/544"},"comments":{"href":"https://api.github.com/repos/all-of-us/raw-data-repository/issues/544/comments"},"review_comments":{"href":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/544/comments"},"review_comment":{"href":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/all-of-us/raw-data-repository/pulls/544/commits"},"statuses":{"href":"https://api.github.com/repos/all-of-us/raw-data-repository/statuses/526d3dce25b9b0f243996c2deb57d55317599084"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"danqrodney"}}