{"action":"created","comment":{"url":"https://api.github.com/repos/src-d/ast2vec/pulls/comments/131163863","pull_request_review_id":54115599,"id":131163863,"diff_hunk":"@@ -36,26 +35,23 @@ def sources(self):\n         \"\"\"\n         return self._sources\n \n-    @property\n-    def uasts(self):\n+    def __getitem__(self, item):\n         \"\"\"\n-        Returns all usts of code in the saved repo\n+        Returns file name, source code and uast for the given file index.\n+\n+        :param item: File index.\n+        :return: name, source code, uast\n         \"\"\"\n-        return self._uasts\n+        return (self._filenames[item],) + super(Source, self).__getitem__(item)\n \n-    @property\n-    def filenames(self):\n+    def __iter__(self):\n         \"\"\"\n-        Returns all filenames in the saved repo\n+        Iterator over the items.\n         \"\"\"\n-        return self._filenames\n-\n-    def save(self, output, deps=None):\n-        if not deps:\n-            deps = tuple()\n-        self._meta = generate_meta(self.NAME, ast2vec.__version__, *deps)\n-        write_model(self._meta,\n-                    {\"filenames\": merge_strings(self.filenames),\n-                     \"sources\": merge_strings(self.sources),\n-                     \"uasts\": [uast.SerializeToString() for uast in self.uasts]},\n-                    output)\n+        for item in zip(self._filenames, *super(Source, self).__iter__()):","path":"ast2vec/source.py","position":73,"original_position":73,"commit_id":"f5721c5fba7db3c00649599460add5ec2a319c2f","original_commit_id":"f5721c5fba7db3c00649599460add5ec2a319c2f","user":{"login":"vmarkovtsev","id":2793551,"avatar_url":"https://avatars3.githubusercontent.com/u/2793551?v=4","gravatar_id":"","url":"https://api.github.com/users/vmarkovtsev","html_url":"https://github.com/vmarkovtsev","followers_url":"https://api.github.com/users/vmarkovtsev/followers","following_url":"https://api.github.com/users/vmarkovtsev/following{/other_user}","gists_url":"https://api.github.com/users/vmarkovtsev/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarkovtsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarkovtsev/subscriptions","organizations_url":"https://api.github.com/users/vmarkovtsev/orgs","repos_url":"https://api.github.com/users/vmarkovtsev/repos","events_url":"https://api.github.com/users/vmarkovtsev/events{/privacy}","received_events_url":"https://api.github.com/users/vmarkovtsev/received_events","type":"User","site_admin":false},"body":"return iter(zip())","created_at":"2017-08-03T14:49:54Z","updated_at":"2017-08-03T14:53:06Z","html_url":"https://github.com/src-d/ast2vec/pull/41#discussion_r131163863","pull_request_url":"https://api.github.com/repos/src-d/ast2vec/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/src-d/ast2vec/pulls/comments/131163863"},"html":{"href":"https://github.com/src-d/ast2vec/pull/41#discussion_r131163863"},"pull_request":{"href":"https://api.github.com/repos/src-d/ast2vec/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/src-d/ast2vec/pulls/41","id":133916601,"html_url":"https://github.com/src-d/ast2vec/pull/41","diff_url":"https://github.com/src-d/ast2vec/pull/41.diff","patch_url":"https://github.com/src-d/ast2vec/pull/41.patch","issue_url":"https://api.github.com/repos/src-d/ast2vec/issues/41","number":41,"state":"open","locked":false,"title":"Split Source model to Source and UAST","user":{"login":"zurk","id":516045,"avatar_url":"https://avatars1.githubusercontent.com/u/516045?v=4","gravatar_id":"","url":"https://api.github.com/users/zurk","html_url":"https://github.com/zurk","followers_url":"https://api.github.com/users/zurk/followers","following_url":"https://api.github.com/users/zurk/following{/other_user}","gists_url":"https://api.github.com/users/zurk/gists{/gist_id}","starred_url":"https://api.github.com/users/zurk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zurk/subscriptions","organizations_url":"https://api.github.com/users/zurk/orgs","repos_url":"https://api.github.com/users/zurk/repos","events_url":"https://api.github.com/users/zurk/events{/privacy}","received_events_url":"https://api.github.com/users/zurk/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-03T11:00:20Z","updated_at":"2017-08-03T14:53:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41c06a3d2f280063bec39c254b6e1171e6fb0d94","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/src-d/ast2vec/pulls/41/commits","review_comments_url":"https://api.github.com/repos/src-d/ast2vec/pulls/41/comments","review_comment_url":"https://api.github.com/repos/src-d/ast2vec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/src-d/ast2vec/issues/41/comments","statuses_url":"https://api.github.com/repos/src-d/ast2vec/statuses/f5721c5fba7db3c00649599460add5ec2a319c2f","head":{"label":"zurk:develop","ref":"develop","sha":"f5721c5fba7db3c00649599460add5ec2a319c2f","user":{"login":"zurk","id":516045,"avatar_url":"https://avatars1.githubusercontent.com/u/516045?v=4","gravatar_id":"","url":"https://api.github.com/users/zurk","html_url":"https://github.com/zurk","followers_url":"https://api.github.com/users/zurk/followers","following_url":"https://api.github.com/users/zurk/following{/other_user}","gists_url":"https://api.github.com/users/zurk/gists{/gist_id}","starred_url":"https://api.github.com/users/zurk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zurk/subscriptions","organizations_url":"https://api.github.com/users/zurk/orgs","repos_url":"https://api.github.com/users/zurk/repos","events_url":"https://api.github.com/users/zurk/events{/privacy}","received_events_url":"https://api.github.com/users/zurk/received_events","type":"User","site_admin":false},"repo":{"id":97717753,"name":"ast2vec","full_name":"zurk/ast2vec","owner":{"login":"zurk","id":516045,"avatar_url":"https://avatars1.githubusercontent.com/u/516045?v=4","gravatar_id":"","url":"https://api.github.com/users/zurk","html_url":"https://github.com/zurk","followers_url":"https://api.github.com/users/zurk/followers","following_url":"https://api.github.com/users/zurk/following{/other_user}","gists_url":"https://api.github.com/users/zurk/gists{/gist_id}","starred_url":"https://api.github.com/users/zurk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zurk/subscriptions","organizations_url":"https://api.github.com/users/zurk/orgs","repos_url":"https://api.github.com/users/zurk/repos","events_url":"https://api.github.com/users/zurk/events{/privacy}","received_events_url":"https://api.github.com/users/zurk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zurk/ast2vec","description":null,"fork":true,"url":"https://api.github.com/repos/zurk/ast2vec","forks_url":"https://api.github.com/repos/zurk/ast2vec/forks","keys_url":"https://api.github.com/repos/zurk/ast2vec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zurk/ast2vec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zurk/ast2vec/teams","hooks_url":"https://api.github.com/repos/zurk/ast2vec/hooks","issue_events_url":"https://api.github.com/repos/zurk/ast2vec/issues/events{/number}","events_url":"https://api.github.com/repos/zurk/ast2vec/events","assignees_url":"https://api.github.com/repos/zurk/ast2vec/assignees{/user}","branches_url":"https://api.github.com/repos/zurk/ast2vec/branches{/branch}","tags_url":"https://api.github.com/repos/zurk/ast2vec/tags","blobs_url":"https://api.github.com/repos/zurk/ast2vec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zurk/ast2vec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zurk/ast2vec/git/refs{/sha}","trees_url":"https://api.github.com/repos/zurk/ast2vec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zurk/ast2vec/statuses/{sha}","languages_url":"https://api.github.com/repos/zurk/ast2vec/languages","stargazers_url":"https://api.github.com/repos/zurk/ast2vec/stargazers","contributors_url":"https://api.github.com/repos/zurk/ast2vec/contributors","subscribers_url":"https://api.github.com/repos/zurk/ast2vec/subscribers","subscription_url":"https://api.github.com/repos/zurk/ast2vec/subscription","commits_url":"https://api.github.com/repos/zurk/ast2vec/commits{/sha}","git_commits_url":"https://api.github.com/repos/zurk/ast2vec/git/commits{/sha}","comments_url":"https://api.github.com/repos/zurk/ast2vec/comments{/number}","issue_comment_url":"https://api.github.com/repos/zurk/ast2vec/issues/comments{/number}","contents_url":"https://api.github.com/repos/zurk/ast2vec/contents/{+path}","compare_url":"https://api.github.com/repos/zurk/ast2vec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zurk/ast2vec/merges","archive_url":"https://api.github.com/repos/zurk/ast2vec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zurk/ast2vec/downloads","issues_url":"https://api.github.com/repos/zurk/ast2vec/issues{/number}","pulls_url":"https://api.github.com/repos/zurk/ast2vec/pulls{/number}","milestones_url":"https://api.github.com/repos/zurk/ast2vec/milestones{/number}","notifications_url":"https://api.github.com/repos/zurk/ast2vec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zurk/ast2vec/labels{/name}","releases_url":"https://api.github.com/repos/zurk/ast2vec/releases{/id}","deployments_url":"https://api.github.com/repos/zurk/ast2vec/deployments","created_at":"2017-07-19T13:13:41Z","updated_at":"2017-07-13T04:00:00Z","pushed_at":"2017-08-03T13:43:06Z","git_url":"git://github.com/zurk/ast2vec.git","ssh_url":"git@github.com:zurk/ast2vec.git","clone_url":"https://github.com/zurk/ast2vec.git","svn_url":"https://github.com/zurk/ast2vec","homepage":null,"size":30116,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"src-d:develop","ref":"develop","sha":"25e69c325df7e4a0440d07a37a9d3994e103cb61","user":{"login":"src-d","id":15128793,"avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/src-d","html_url":"https://github.com/src-d","followers_url":"https://api.github.com/users/src-d/followers","following_url":"https://api.github.com/users/src-d/following{/other_user}","gists_url":"https://api.github.com/users/src-d/gists{/gist_id}","starred_url":"https://api.github.com/users/src-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-d/subscriptions","organizations_url":"https://api.github.com/users/src-d/orgs","repos_url":"https://api.github.com/users/src-d/repos","events_url":"https://api.github.com/users/src-d/events{/privacy}","received_events_url":"https://api.github.com/users/src-d/received_events","type":"Organization","site_admin":false},"repo":{"id":94111019,"name":"ast2vec","full_name":"src-d/ast2vec","owner":{"login":"src-d","id":15128793,"avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/src-d","html_url":"https://github.com/src-d","followers_url":"https://api.github.com/users/src-d/followers","following_url":"https://api.github.com/users/src-d/following{/other_user}","gists_url":"https://api.github.com/users/src-d/gists{/gist_id}","starred_url":"https://api.github.com/users/src-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-d/subscriptions","organizations_url":"https://api.github.com/users/src-d/orgs","repos_url":"https://api.github.com/users/src-d/repos","events_url":"https://api.github.com/users/src-d/events{/privacy}","received_events_url":"https://api.github.com/users/src-d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/src-d/ast2vec","description":null,"fork":false,"url":"https://api.github.com/repos/src-d/ast2vec","forks_url":"https://api.github.com/repos/src-d/ast2vec/forks","keys_url":"https://api.github.com/repos/src-d/ast2vec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/src-d/ast2vec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/src-d/ast2vec/teams","hooks_url":"https://api.github.com/repos/src-d/ast2vec/hooks","issue_events_url":"https://api.github.com/repos/src-d/ast2vec/issues/events{/number}","events_url":"https://api.github.com/repos/src-d/ast2vec/events","assignees_url":"https://api.github.com/repos/src-d/ast2vec/assignees{/user}","branches_url":"https://api.github.com/repos/src-d/ast2vec/branches{/branch}","tags_url":"https://api.github.com/repos/src-d/ast2vec/tags","blobs_url":"https://api.github.com/repos/src-d/ast2vec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/src-d/ast2vec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/src-d/ast2vec/git/refs{/sha}","trees_url":"https://api.github.com/repos/src-d/ast2vec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/src-d/ast2vec/statuses/{sha}","languages_url":"https://api.github.com/repos/src-d/ast2vec/languages","stargazers_url":"https://api.github.com/repos/src-d/ast2vec/stargazers","contributors_url":"https://api.github.com/repos/src-d/ast2vec/contributors","subscribers_url":"https://api.github.com/repos/src-d/ast2vec/subscribers","subscription_url":"https://api.github.com/repos/src-d/ast2vec/subscription","commits_url":"https://api.github.com/repos/src-d/ast2vec/commits{/sha}","git_commits_url":"https://api.github.com/repos/src-d/ast2vec/git/commits{/sha}","comments_url":"https://api.github.com/repos/src-d/ast2vec/comments{/number}","issue_comment_url":"https://api.github.com/repos/src-d/ast2vec/issues/comments{/number}","contents_url":"https://api.github.com/repos/src-d/ast2vec/contents/{+path}","compare_url":"https://api.github.com/repos/src-d/ast2vec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/src-d/ast2vec/merges","archive_url":"https://api.github.com/repos/src-d/ast2vec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/src-d/ast2vec/downloads","issues_url":"https://api.github.com/repos/src-d/ast2vec/issues{/number}","pulls_url":"https://api.github.com/repos/src-d/ast2vec/pulls{/number}","milestones_url":"https://api.github.com/repos/src-d/ast2vec/milestones{/number}","notifications_url":"https://api.github.com/repos/src-d/ast2vec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/src-d/ast2vec/labels{/name}","releases_url":"https://api.github.com/repos/src-d/ast2vec/releases{/id}","deployments_url":"https://api.github.com/repos/src-d/ast2vec/deployments","created_at":"2017-06-12T15:21:41Z","updated_at":"2017-07-27T11:52:44Z","pushed_at":"2017-08-03T13:43:07Z","git_url":"git://github.com/src-d/ast2vec.git","ssh_url":"git@github.com:src-d/ast2vec.git","clone_url":"https://github.com/src-d/ast2vec.git","svn_url":"https://github.com/src-d/ast2vec","homepage":null,"size":30111,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/src-d/ast2vec/pulls/41"},"html":{"href":"https://github.com/src-d/ast2vec/pull/41"},"issue":{"href":"https://api.github.com/repos/src-d/ast2vec/issues/41"},"comments":{"href":"https://api.github.com/repos/src-d/ast2vec/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/src-d/ast2vec/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/src-d/ast2vec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/src-d/ast2vec/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/src-d/ast2vec/statuses/f5721c5fba7db3c00649599460add5ec2a319c2f"}}}}
{"actor":{"display_login":"vmarkovtsev"}}