{"action":"created","comment":{"url":"https://api.github.com/repos/nromashchenko/nir/pulls/comments/64005272","id":64005272,"diff_hunk":"@@ -2,13 +2,15 @@\n \n from ..lib.dist import kmerize_samples\n \n+ids = [\"1\", \"2\"]\n+samples = {}\n+for id in ids:\n+    samples[id] = [\"\".join(random.choice(\"ATGC\") for _ in range(20))\n+                   for _ in range(10)]\n \n-samples = {\n-    \"1\": [\"\".join(\n-        random.choice(\"ATGC\") for _ in range(100)) for _ in range(10)],\n-    \"2\": [\"\".join(\n-        random.choice(\"ATGC\") for _ in range(100)) for _ in range(10)]\n-}\n \n+kmerized = kmerize_samples(samples, 10)\n \n-print(kmerize_samples(samples, 10))\n+for id in ids:\n+    assert id in kmerized.keys()\n+    assert len(kmerized[id]) > 0","path":"src/python/src/test/dist.py","position":22,"original_position":22,"commit_id":"2d6fb7ed2f52484a99cb3cdd6a72613124b2ab20","original_commit_id":"2d6fb7ed2f52484a99cb3cdd6a72613124b2ab20","user":{"login":"grayfall","id":6906110,"avatar_url":"https://avatars.githubusercontent.com/u/6906110?v=3","gravatar_id":"","url":"https://api.github.com/users/grayfall","html_url":"https://github.com/grayfall","followers_url":"https://api.github.com/users/grayfall/followers","following_url":"https://api.github.com/users/grayfall/following{/other_user}","gists_url":"https://api.github.com/users/grayfall/gists{/gist_id}","starred_url":"https://api.github.com/users/grayfall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grayfall/subscriptions","organizations_url":"https://api.github.com/users/grayfall/orgs","repos_url":"https://api.github.com/users/grayfall/repos","events_url":"https://api.github.com/users/grayfall/events{/privacy}","received_events_url":"https://api.github.com/users/grayfall/received_events","type":"User","site_admin":false},"body":"Я понял, где они терялись. Забыл склеить вывод с разных процессов reduce-ом. Мой тупняк. \n\n> On 20 May 2016, at 02:38, Nikolay Romashchenko <notifications@github.com> wrote:\n> \n> In src/python/src/test/dist.py <https://github.com/nromashchenko/nir/pull/2#discussion_r63969629>:\n> \n> >  \n> > -print(kmerize_samples(samples, 10))\n> > +for id in ids:\n> > +    assert id in kmerized.keys()\n> > +    assert len(kmerized[id]) > 0\n> Твой тест возвращал что-то вроде [ {'2' : Counter(...) } ], хотя ожидаются каунтеры ко всем образцам. Такие простые ассерты не работали, т.к. где-то по пути каунтеры ко всем образцам, кроме последнего, терялись. Я вдумчиво смотрел на это, не понимал, в чем дело и в итоге переписал так, как ты наблюдаешь.\n> \n> —\n> You are receiving this because you were assigned.\n> Reply to this email directly or view it on GitHub <https://github.com/nromashchenko/nir/pull/2/files/2d6fb7ed2f52484a99cb3cdd6a72613124b2ab20#r63969629>\n\n","created_at":"2016-05-20T08:20:30Z","updated_at":"2016-05-20T08:20:30Z","html_url":"https://github.com/nromashchenko/nir/pull/2#discussion_r64005272","pull_request_url":"https://api.github.com/repos/nromashchenko/nir/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/nromashchenko/nir/pulls/comments/64005272"},"html":{"href":"https://github.com/nromashchenko/nir/pull/2#discussion_r64005272"},"pull_request":{"href":"https://api.github.com/repos/nromashchenko/nir/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/nromashchenko/nir/pulls/2","id":70780188,"html_url":"https://github.com/nromashchenko/nir/pull/2","diff_url":"https://github.com/nromashchenko/nir/pull/2.diff","patch_url":"https://github.com/nromashchenko/nir/pull/2.patch","issue_url":"https://api.github.com/repos/nromashchenko/nir/issues/2","number":2,"state":"closed","locked":false,"title":"Merge requeset (kmerize fixing)","user":{"login":"nromashchenko","id":3009011,"avatar_url":"https://avatars.githubusercontent.com/u/3009011?v=3","gravatar_id":"","url":"https://api.github.com/users/nromashchenko","html_url":"https://github.com/nromashchenko","followers_url":"https://api.github.com/users/nromashchenko/followers","following_url":"https://api.github.com/users/nromashchenko/following{/other_user}","gists_url":"https://api.github.com/users/nromashchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/nromashchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nromashchenko/subscriptions","organizations_url":"https://api.github.com/users/nromashchenko/orgs","repos_url":"https://api.github.com/users/nromashchenko/repos","events_url":"https://api.github.com/users/nromashchenko/events{/privacy}","received_events_url":"https://api.github.com/users/nromashchenko/received_events","type":"User","site_admin":false},"body":"Мне не удалось запустить твои правки даже с нашими маленькими данными. Мои соображения в данном реквесте.","created_at":"2016-05-19T23:11:43Z","updated_at":"2016-05-20T08:20:31Z","closed_at":"2016-05-20T08:11:04Z","merged_at":"2016-05-20T08:11:04Z","merge_commit_sha":"97603c87607bc6aac80e4af7755412192fe8024e","assignee":{"login":"grayfall","id":6906110,"avatar_url":"https://avatars.githubusercontent.com/u/6906110?v=3","gravatar_id":"","url":"https://api.github.com/users/grayfall","html_url":"https://github.com/grayfall","followers_url":"https://api.github.com/users/grayfall/followers","following_url":"https://api.github.com/users/grayfall/following{/other_user}","gists_url":"https://api.github.com/users/grayfall/gists{/gist_id}","starred_url":"https://api.github.com/users/grayfall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grayfall/subscriptions","organizations_url":"https://api.github.com/users/grayfall/orgs","repos_url":"https://api.github.com/users/grayfall/repos","events_url":"https://api.github.com/users/grayfall/events{/privacy}","received_events_url":"https://api.github.com/users/grayfall/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/nromashchenko/nir/pulls/2/commits","review_comments_url":"https://api.github.com/repos/nromashchenko/nir/pulls/2/comments","review_comment_url":"https://api.github.com/repos/nromashchenko/nir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nromashchenko/nir/issues/2/comments","statuses_url":"https://api.github.com/repos/nromashchenko/nir/statuses/2d6fb7ed2f52484a99cb3cdd6a72613124b2ab20","head":{"label":"nromashchenko:kmerizing","ref":"kmerizing","sha":"2d6fb7ed2f52484a99cb3cdd6a72613124b2ab20","user":{"login":"nromashchenko","id":3009011,"avatar_url":"https://avatars.githubusercontent.com/u/3009011?v=3","gravatar_id":"","url":"https://api.github.com/users/nromashchenko","html_url":"https://github.com/nromashchenko","followers_url":"https://api.github.com/users/nromashchenko/followers","following_url":"https://api.github.com/users/nromashchenko/following{/other_user}","gists_url":"https://api.github.com/users/nromashchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/nromashchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nromashchenko/subscriptions","organizations_url":"https://api.github.com/users/nromashchenko/orgs","repos_url":"https://api.github.com/users/nromashchenko/repos","events_url":"https://api.github.com/users/nromashchenko/events{/privacy}","received_events_url":"https://api.github.com/users/nromashchenko/received_events","type":"User","site_admin":false},"repo":{"id":53497181,"name":"nir","full_name":"nromashchenko/nir","owner":{"login":"nromashchenko","id":3009011,"avatar_url":"https://avatars.githubusercontent.com/u/3009011?v=3","gravatar_id":"","url":"https://api.github.com/users/nromashchenko","html_url":"https://github.com/nromashchenko","followers_url":"https://api.github.com/users/nromashchenko/followers","following_url":"https://api.github.com/users/nromashchenko/following{/other_user}","gists_url":"https://api.github.com/users/nromashchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/nromashchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nromashchenko/subscriptions","organizations_url":"https://api.github.com/users/nromashchenko/orgs","repos_url":"https://api.github.com/users/nromashchenko/repos","events_url":"https://api.github.com/users/nromashchenko/events{/privacy}","received_events_url":"https://api.github.com/users/nromashchenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nromashchenko/nir","description":"","fork":false,"url":"https://api.github.com/repos/nromashchenko/nir","forks_url":"https://api.github.com/repos/nromashchenko/nir/forks","keys_url":"https://api.github.com/repos/nromashchenko/nir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nromashchenko/nir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nromashchenko/nir/teams","hooks_url":"https://api.github.com/repos/nromashchenko/nir/hooks","issue_events_url":"https://api.github.com/repos/nromashchenko/nir/issues/events{/number}","events_url":"https://api.github.com/repos/nromashchenko/nir/events","assignees_url":"https://api.github.com/repos/nromashchenko/nir/assignees{/user}","branches_url":"https://api.github.com/repos/nromashchenko/nir/branches{/branch}","tags_url":"https://api.github.com/repos/nromashchenko/nir/tags","blobs_url":"https://api.github.com/repos/nromashchenko/nir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nromashchenko/nir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nromashchenko/nir/git/refs{/sha}","trees_url":"https://api.github.com/repos/nromashchenko/nir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nromashchenko/nir/statuses/{sha}","languages_url":"https://api.github.com/repos/nromashchenko/nir/languages","stargazers_url":"https://api.github.com/repos/nromashchenko/nir/stargazers","contributors_url":"https://api.github.com/repos/nromashchenko/nir/contributors","subscribers_url":"https://api.github.com/repos/nromashchenko/nir/subscribers","subscription_url":"https://api.github.com/repos/nromashchenko/nir/subscription","commits_url":"https://api.github.com/repos/nromashchenko/nir/commits{/sha}","git_commits_url":"https://api.github.com/repos/nromashchenko/nir/git/commits{/sha}","comments_url":"https://api.github.com/repos/nromashchenko/nir/comments{/number}","issue_comment_url":"https://api.github.com/repos/nromashchenko/nir/issues/comments{/number}","contents_url":"https://api.github.com/repos/nromashchenko/nir/contents/{+path}","compare_url":"https://api.github.com/repos/nromashchenko/nir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nromashchenko/nir/merges","archive_url":"https://api.github.com/repos/nromashchenko/nir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nromashchenko/nir/downloads","issues_url":"https://api.github.com/repos/nromashchenko/nir/issues{/number}","pulls_url":"https://api.github.com/repos/nromashchenko/nir/pulls{/number}","milestones_url":"https://api.github.com/repos/nromashchenko/nir/milestones{/number}","notifications_url":"https://api.github.com/repos/nromashchenko/nir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nromashchenko/nir/labels{/name}","releases_url":"https://api.github.com/repos/nromashchenko/nir/releases{/id}","deployments_url":"https://api.github.com/repos/nromashchenko/nir/deployments","created_at":"2016-03-09T12:48:43Z","updated_at":"2016-03-10T13:49:47Z","pushed_at":"2016-05-20T08:14:08Z","git_url":"git://github.com/nromashchenko/nir.git","ssh_url":"git@github.com:nromashchenko/nir.git","clone_url":"https://github.com/nromashchenko/nir.git","svn_url":"https://github.com/nromashchenko/nir","homepage":null,"size":99,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"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":"nromashchenko:master","ref":"master","sha":"0ca38df585ee257f7d4c2b78941b3004d543f518","user":{"login":"nromashchenko","id":3009011,"avatar_url":"https://avatars.githubusercontent.com/u/3009011?v=3","gravatar_id":"","url":"https://api.github.com/users/nromashchenko","html_url":"https://github.com/nromashchenko","followers_url":"https://api.github.com/users/nromashchenko/followers","following_url":"https://api.github.com/users/nromashchenko/following{/other_user}","gists_url":"https://api.github.com/users/nromashchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/nromashchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nromashchenko/subscriptions","organizations_url":"https://api.github.com/users/nromashchenko/orgs","repos_url":"https://api.github.com/users/nromashchenko/repos","events_url":"https://api.github.com/users/nromashchenko/events{/privacy}","received_events_url":"https://api.github.com/users/nromashchenko/received_events","type":"User","site_admin":false},"repo":{"id":53497181,"name":"nir","full_name":"nromashchenko/nir","owner":{"login":"nromashchenko","id":3009011,"avatar_url":"https://avatars.githubusercontent.com/u/3009011?v=3","gravatar_id":"","url":"https://api.github.com/users/nromashchenko","html_url":"https://github.com/nromashchenko","followers_url":"https://api.github.com/users/nromashchenko/followers","following_url":"https://api.github.com/users/nromashchenko/following{/other_user}","gists_url":"https://api.github.com/users/nromashchenko/gists{/gist_id}","starred_url":"https://api.github.com/users/nromashchenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nromashchenko/subscriptions","organizations_url":"https://api.github.com/users/nromashchenko/orgs","repos_url":"https://api.github.com/users/nromashchenko/repos","events_url":"https://api.github.com/users/nromashchenko/events{/privacy}","received_events_url":"https://api.github.com/users/nromashchenko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nromashchenko/nir","description":"","fork":false,"url":"https://api.github.com/repos/nromashchenko/nir","forks_url":"https://api.github.com/repos/nromashchenko/nir/forks","keys_url":"https://api.github.com/repos/nromashchenko/nir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nromashchenko/nir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nromashchenko/nir/teams","hooks_url":"https://api.github.com/repos/nromashchenko/nir/hooks","issue_events_url":"https://api.github.com/repos/nromashchenko/nir/issues/events{/number}","events_url":"https://api.github.com/repos/nromashchenko/nir/events","assignees_url":"https://api.github.com/repos/nromashchenko/nir/assignees{/user}","branches_url":"https://api.github.com/repos/nromashchenko/nir/branches{/branch}","tags_url":"https://api.github.com/repos/nromashchenko/nir/tags","blobs_url":"https://api.github.com/repos/nromashchenko/nir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nromashchenko/nir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nromashchenko/nir/git/refs{/sha}","trees_url":"https://api.github.com/repos/nromashchenko/nir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nromashchenko/nir/statuses/{sha}","languages_url":"https://api.github.com/repos/nromashchenko/nir/languages","stargazers_url":"https://api.github.com/repos/nromashchenko/nir/stargazers","contributors_url":"https://api.github.com/repos/nromashchenko/nir/contributors","subscribers_url":"https://api.github.com/repos/nromashchenko/nir/subscribers","subscription_url":"https://api.github.com/repos/nromashchenko/nir/subscription","commits_url":"https://api.github.com/repos/nromashchenko/nir/commits{/sha}","git_commits_url":"https://api.github.com/repos/nromashchenko/nir/git/commits{/sha}","comments_url":"https://api.github.com/repos/nromashchenko/nir/comments{/number}","issue_comment_url":"https://api.github.com/repos/nromashchenko/nir/issues/comments{/number}","contents_url":"https://api.github.com/repos/nromashchenko/nir/contents/{+path}","compare_url":"https://api.github.com/repos/nromashchenko/nir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nromashchenko/nir/merges","archive_url":"https://api.github.com/repos/nromashchenko/nir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nromashchenko/nir/downloads","issues_url":"https://api.github.com/repos/nromashchenko/nir/issues{/number}","pulls_url":"https://api.github.com/repos/nromashchenko/nir/pulls{/number}","milestones_url":"https://api.github.com/repos/nromashchenko/nir/milestones{/number}","notifications_url":"https://api.github.com/repos/nromashchenko/nir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nromashchenko/nir/labels{/name}","releases_url":"https://api.github.com/repos/nromashchenko/nir/releases{/id}","deployments_url":"https://api.github.com/repos/nromashchenko/nir/deployments","created_at":"2016-03-09T12:48:43Z","updated_at":"2016-03-10T13:49:47Z","pushed_at":"2016-05-20T08:14:08Z","git_url":"git://github.com/nromashchenko/nir.git","ssh_url":"git@github.com:nromashchenko/nir.git","clone_url":"https://github.com/nromashchenko/nir.git","svn_url":"https://github.com/nromashchenko/nir","homepage":null,"size":99,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/nromashchenko/nir/pulls/2"},"html":{"href":"https://github.com/nromashchenko/nir/pull/2"},"issue":{"href":"https://api.github.com/repos/nromashchenko/nir/issues/2"},"comments":{"href":"https://api.github.com/repos/nromashchenko/nir/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/nromashchenko/nir/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/nromashchenko/nir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nromashchenko/nir/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/nromashchenko/nir/statuses/2d6fb7ed2f52484a99cb3cdd6a72613124b2ab20"}}}}
{"actor":{"display_login":"grayfall"}}