{"action":"created","comment":{"url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/comments/31055502","id":31055502,"diff_hunk":"@@ -75,47 +84,35 @@ def setup(self):\n         if not self.options.columns:\n             self.options.columns = _header\n \n-    def parse_file(self):\n-        uri = self.options.uri\n-\n-        name = os.path.splitext(os.path.basename(uri))[0]\n-\n-        if not utils.is_remote(self.options.uri):\n-            uri = os.path.abspath(uri)\n-\n-        return {\n-            'origins:id': name,\n-            'prov:label': utils.prettify_name(name),\n-            'prov:type': 'File',\n-            'uri': uri,\n-        }\n-\n     def parse_columns(self):\n         columns = []\n-\n         for i, name in enumerate(self.options.columns):\n-            column = {\n-                'origins:id': name,\n-                'prov:label': name,\n-                'prov:type': 'Column',\n-                'index': i,\n-            }\n-\n-            columns.append(column)\n-\n+            columns.append(name)\n         return columns\n \n     def parse(self):\n-        file = self.parse_file()\n-        self.document.add('entity', file)\n-\n-        columns = self.parse_columns()\n-\n-        for column in columns:\n-            self.document.add('entity', column)\n-\n-            self.document.add('wasInfluencedBy', {\n-                'prov:influencer': file,\n-                'prov:influencee': column,\n-                'prov:type': 'origins:Edge',\n-            })\n+        FIELDS = self.parse_columns()\n+        with open(self.options.uri, 'rU', newline='') as f:\n+            yield [\n+                'operation',\n+                'domain',\n+                'entity',\n+                'attribute',\n+                'value',\n+                'valid_time'\n+            ]\n+\n+            reader = csv.DictReader(f, fieldnames=FIELDS,\n+                                    delimiter=self.options.delimiter)\n+            next(reader)\n+            for line in reader:\n+                for key, value in line.items():\n+                    if key != FIELDS[0]:","path":"origins_generators/sources/delimited.py","position":87,"original_position":87,"commit_id":"0a3de1df8792197bb368320550f7494332c867f9","original_commit_id":"0a3de1df8792197bb368320550f7494332c867f9","user":{"login":"bruth","id":515142,"avatar_url":"https://avatars.githubusercontent.com/u/515142?v=3","gravatar_id":"","url":"https://api.github.com/users/bruth","html_url":"https://github.com/bruth","followers_url":"https://api.github.com/users/bruth/followers","following_url":"https://api.github.com/users/bruth/following{/other_user}","gists_url":"https://api.github.com/users/bruth/gists{/gist_id}","starred_url":"https://api.github.com/users/bruth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruth/subscriptions","organizations_url":"https://api.github.com/users/bruth/orgs","repos_url":"https://api.github.com/users/bruth/repos","events_url":"https://api.github.com/users/bruth/events{/privacy}","received_events_url":"https://api.github.com/users/bruth/received_events","type":"User","site_admin":false},"body":"Edited the code example to use `enumerate(...)`.","created_at":"2015-05-26T17:01:00Z","updated_at":"2015-05-26T17:01:00Z","html_url":"https://github.com/chop-dbhi/origins-generator-service/pull/5#discussion_r31055502","pull_request_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/comments/31055502"},"html":{"href":"https://github.com/chop-dbhi/origins-generator-service/pull/5#discussion_r31055502"},"pull_request":{"href":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/5","id":34549987,"html_url":"https://github.com/chop-dbhi/origins-generator-service/pull/5","diff_url":"https://github.com/chop-dbhi/origins-generator-service/pull/5.diff","patch_url":"https://github.com/chop-dbhi/origins-generator-service/pull/5.patch","issue_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/issues/5","number":5,"state":"open","locked":false,"title":"Convert redcap_csv.py to csv fact generation","user":{"login":"swanijam","id":11722867,"avatar_url":"https://avatars.githubusercontent.com/u/11722867?v=3","gravatar_id":"","url":"https://api.github.com/users/swanijam","html_url":"https://github.com/swanijam","followers_url":"https://api.github.com/users/swanijam/followers","following_url":"https://api.github.com/users/swanijam/following{/other_user}","gists_url":"https://api.github.com/users/swanijam/gists{/gist_id}","starred_url":"https://api.github.com/users/swanijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swanijam/subscriptions","organizations_url":"https://api.github.com/users/swanijam/orgs","repos_url":"https://api.github.com/users/swanijam/repos","events_url":"https://api.github.com/users/swanijam/events{/privacy}","received_events_url":"https://api.github.com/users/swanijam/received_events","type":"User","site_admin":false},"body":"Signed-off-by: James Swanick <swanijam@gmail.com>","created_at":"2015-05-01T16:58:17Z","updated_at":"2015-05-26T17:01:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4ba6788da19ba8def23d119648e84b9bab6702c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/5/commits","review_comments_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/5/comments","review_comment_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/issues/5/comments","statuses_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/statuses/0a3de1df8792197bb368320550f7494332c867f9","head":{"label":"swanijam:master","ref":"master","sha":"0a3de1df8792197bb368320550f7494332c867f9","user":{"login":"swanijam","id":11722867,"avatar_url":"https://avatars.githubusercontent.com/u/11722867?v=3","gravatar_id":"","url":"https://api.github.com/users/swanijam","html_url":"https://github.com/swanijam","followers_url":"https://api.github.com/users/swanijam/followers","following_url":"https://api.github.com/users/swanijam/following{/other_user}","gists_url":"https://api.github.com/users/swanijam/gists{/gist_id}","starred_url":"https://api.github.com/users/swanijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swanijam/subscriptions","organizations_url":"https://api.github.com/users/swanijam/orgs","repos_url":"https://api.github.com/users/swanijam/repos","events_url":"https://api.github.com/users/swanijam/events{/privacy}","received_events_url":"https://api.github.com/users/swanijam/received_events","type":"User","site_admin":false},"repo":{"id":34907495,"name":"origins-generator-service","full_name":"swanijam/origins-generator-service","owner":{"login":"swanijam","id":11722867,"avatar_url":"https://avatars.githubusercontent.com/u/11722867?v=3","gravatar_id":"","url":"https://api.github.com/users/swanijam","html_url":"https://github.com/swanijam","followers_url":"https://api.github.com/users/swanijam/followers","following_url":"https://api.github.com/users/swanijam/following{/other_user}","gists_url":"https://api.github.com/users/swanijam/gists{/gist_id}","starred_url":"https://api.github.com/users/swanijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swanijam/subscriptions","organizations_url":"https://api.github.com/users/swanijam/orgs","repos_url":"https://api.github.com/users/swanijam/repos","events_url":"https://api.github.com/users/swanijam/events{/privacy}","received_events_url":"https://api.github.com/users/swanijam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/swanijam/origins-generator-service","description":"Provenance generator service for Origins","fork":true,"url":"https://api.github.com/repos/swanijam/origins-generator-service","forks_url":"https://api.github.com/repos/swanijam/origins-generator-service/forks","keys_url":"https://api.github.com/repos/swanijam/origins-generator-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swanijam/origins-generator-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swanijam/origins-generator-service/teams","hooks_url":"https://api.github.com/repos/swanijam/origins-generator-service/hooks","issue_events_url":"https://api.github.com/repos/swanijam/origins-generator-service/issues/events{/number}","events_url":"https://api.github.com/repos/swanijam/origins-generator-service/events","assignees_url":"https://api.github.com/repos/swanijam/origins-generator-service/assignees{/user}","branches_url":"https://api.github.com/repos/swanijam/origins-generator-service/branches{/branch}","tags_url":"https://api.github.com/repos/swanijam/origins-generator-service/tags","blobs_url":"https://api.github.com/repos/swanijam/origins-generator-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swanijam/origins-generator-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swanijam/origins-generator-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/swanijam/origins-generator-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swanijam/origins-generator-service/statuses/{sha}","languages_url":"https://api.github.com/repos/swanijam/origins-generator-service/languages","stargazers_url":"https://api.github.com/repos/swanijam/origins-generator-service/stargazers","contributors_url":"https://api.github.com/repos/swanijam/origins-generator-service/contributors","subscribers_url":"https://api.github.com/repos/swanijam/origins-generator-service/subscribers","subscription_url":"https://api.github.com/repos/swanijam/origins-generator-service/subscription","commits_url":"https://api.github.com/repos/swanijam/origins-generator-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/swanijam/origins-generator-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/swanijam/origins-generator-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/swanijam/origins-generator-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/swanijam/origins-generator-service/contents/{+path}","compare_url":"https://api.github.com/repos/swanijam/origins-generator-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swanijam/origins-generator-service/merges","archive_url":"https://api.github.com/repos/swanijam/origins-generator-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swanijam/origins-generator-service/downloads","issues_url":"https://api.github.com/repos/swanijam/origins-generator-service/issues{/number}","pulls_url":"https://api.github.com/repos/swanijam/origins-generator-service/pulls{/number}","milestones_url":"https://api.github.com/repos/swanijam/origins-generator-service/milestones{/number}","notifications_url":"https://api.github.com/repos/swanijam/origins-generator-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swanijam/origins-generator-service/labels{/name}","releases_url":"https://api.github.com/repos/swanijam/origins-generator-service/releases{/id}","created_at":"2015-05-01T14:48:41Z","updated_at":"2015-05-01T18:48:12Z","pushed_at":"2015-05-22T17:42:21Z","git_url":"git://github.com/swanijam/origins-generator-service.git","ssh_url":"git@github.com:swanijam/origins-generator-service.git","clone_url":"https://github.com/swanijam/origins-generator-service.git","svn_url":"https://github.com/swanijam/origins-generator-service","homepage":"","size":2008,"stargazers_count":0,"watchers_count":0,"language":"PLpgSQL","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"chop-dbhi:master","ref":"master","sha":"1a49a0820801da2d9d7126642e4af1841322e46d","user":{"login":"chop-dbhi","id":709892,"avatar_url":"https://avatars.githubusercontent.com/u/709892?v=3","gravatar_id":"","url":"https://api.github.com/users/chop-dbhi","html_url":"https://github.com/chop-dbhi","followers_url":"https://api.github.com/users/chop-dbhi/followers","following_url":"https://api.github.com/users/chop-dbhi/following{/other_user}","gists_url":"https://api.github.com/users/chop-dbhi/gists{/gist_id}","starred_url":"https://api.github.com/users/chop-dbhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chop-dbhi/subscriptions","organizations_url":"https://api.github.com/users/chop-dbhi/orgs","repos_url":"https://api.github.com/users/chop-dbhi/repos","events_url":"https://api.github.com/users/chop-dbhi/events{/privacy}","received_events_url":"https://api.github.com/users/chop-dbhi/received_events","type":"Organization","site_admin":false},"repo":{"id":22381159,"name":"origins-generator-service","full_name":"chop-dbhi/origins-generator-service","owner":{"login":"chop-dbhi","id":709892,"avatar_url":"https://avatars.githubusercontent.com/u/709892?v=3","gravatar_id":"","url":"https://api.github.com/users/chop-dbhi","html_url":"https://github.com/chop-dbhi","followers_url":"https://api.github.com/users/chop-dbhi/followers","following_url":"https://api.github.com/users/chop-dbhi/following{/other_user}","gists_url":"https://api.github.com/users/chop-dbhi/gists{/gist_id}","starred_url":"https://api.github.com/users/chop-dbhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chop-dbhi/subscriptions","organizations_url":"https://api.github.com/users/chop-dbhi/orgs","repos_url":"https://api.github.com/users/chop-dbhi/repos","events_url":"https://api.github.com/users/chop-dbhi/events{/privacy}","received_events_url":"https://api.github.com/users/chop-dbhi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chop-dbhi/origins-generator-service","description":"Provenance generator service for Origins","fork":false,"url":"https://api.github.com/repos/chop-dbhi/origins-generator-service","forks_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/forks","keys_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/teams","hooks_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/hooks","issue_events_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/issues/events{/number}","events_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/events","assignees_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/assignees{/user}","branches_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/branches{/branch}","tags_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/tags","blobs_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/statuses/{sha}","languages_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/languages","stargazers_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/stargazers","contributors_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/contributors","subscribers_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/subscribers","subscription_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/subscription","commits_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/contents/{+path}","compare_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/merges","archive_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/downloads","issues_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/issues{/number}","pulls_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls{/number}","milestones_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/milestones{/number}","notifications_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/labels{/name}","releases_url":"https://api.github.com/repos/chop-dbhi/origins-generator-service/releases{/id}","created_at":"2014-07-29T13:41:11Z","updated_at":"2015-01-15T22:48:37Z","pushed_at":"2015-05-22T17:42:22Z","git_url":"git://github.com/chop-dbhi/origins-generator-service.git","ssh_url":"git@github.com:chop-dbhi/origins-generator-service.git","clone_url":"https://github.com/chop-dbhi/origins-generator-service.git","svn_url":"https://github.com/chop-dbhi/origins-generator-service","homepage":"","size":1873,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/5"},"html":{"href":"https://github.com/chop-dbhi/origins-generator-service/pull/5"},"issue":{"href":"https://api.github.com/repos/chop-dbhi/origins-generator-service/issues/5"},"comments":{"href":"https://api.github.com/repos/chop-dbhi/origins-generator-service/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chop-dbhi/origins-generator-service/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/chop-dbhi/origins-generator-service/statuses/0a3de1df8792197bb368320550f7494332c867f9"}}}}