{"action":"created","comment":{"url":"https://api.github.com/repos/coala/coala-quickstart/pulls/comments/128919503","pull_request_review_id":51635319,"id":128919503,"diff_hunk":"@@ -21,27 +28,79 @@ def filter_relevant_bears(used_languages, arg_parser=None):\n     log_printer = LogPrinter(NullPrinter())\n     used_languages.append((\"All\", 100))\n \n-    all_bears_by_lang = {\n+    bears_by_lang = {\n         lang: set(inverse_dicts(*get_filtered_bears([lang],\n                                                     log_printer,\n                                                     arg_parser)).keys())\n         for lang, _ in used_languages\n     }\n \n-    bears_by_lang = {}\n-    for lang in all_bears_by_lang:\n-        if lang in IMPORTANT_BEAR_LIST:\n-            bears_by_lang[lang] = {bear for bear in all_bears_by_lang[lang]\n-                                   if bear.name in IMPORTANT_BEAR_LIST[lang]}\n-        else:\n-            bears_by_lang[lang] = all_bears_by_lang[lang]\n-\n     # Each language would also have the language independent bears. We remove\n     # those and put them in the \"All\" category.\n-    lang_bears = {lang: bears_by_lang[lang] - bears_by_lang[\"All\"]\n-                  for lang, _ in used_languages}\n-    lang_bears[\"All\"] = bears_by_lang[\"All\"]\n-    return lang_bears\n+    all_lang_bears = bears_by_lang[\"All\"]\n+    bears_by_lang = {lang: bears_by_lang[lang] - bears_by_lang[\"All\"]\n+                     for lang, _ in used_languages}\n+    bears_by_lang[\"All\"] = all_lang_bears\n+\n+    selected_bears = {}\n+    candidate_bears = copy.copy(bears_by_lang)\n+    to_propose_bears = {}\n+\n+    # Initialize selected_bears with IMPORTANT_BEAR_LIST\n+    for lang, lang_bears in candidate_bears.items():\n+        if lang_bears and lang in IMPORTANT_BEAR_LIST:\n+            selected_bears[lang] = set()\n+            for bear in lang_bears:\n+                if bear.__name__ in IMPORTANT_BEAR_LIST[lang]:\n+                    selected_bears[lang].add(bear)\n+        if lang_bears and lang not in IMPORTANT_BEAR_LIST:\n+            selected_bears[lang] = lang_bears\n+\n+        candidate_bears[lang] = set(\n+            [bear for bear in lang_bears\n+             if lang in selected_bears and\n+             bear not in selected_bears[lang]])\n+\n+    project_dependency_info = extracted_info.get(\"ProjectDependencyInfo\")\n+\n+    # Use project_dependency_info to propose bears to user.\n+    if project_dependency_info:\n+        for lang, lang_bears in candidate_bears.items():\n+            matching_dep_bears = get_bears_with_matching_dependencies(\n+                lang_bears, project_dependency_info)\n+            to_propose_bears[lang] = set(matching_dep_bears)\n+            bears_to_remove = [match for match in matching_dep_bears]","path":"coala_quickstart/generation/Bears.py","position":106,"original_position":80,"commit_id":"19a8a9dc84499eae9db93d3cc52e5ce18a610bbd","original_commit_id":"c81b4d6c7a6c68b044d8410d8f5b0e4b58ced7b5","user":{"login":"adtac","id":7521600,"avatar_url":"https://avatars2.githubusercontent.com/u/7521600?v=4","gravatar_id":"","url":"https://api.github.com/users/adtac","html_url":"https://github.com/adtac","followers_url":"https://api.github.com/users/adtac/followers","following_url":"https://api.github.com/users/adtac/following{/other_user}","gists_url":"https://api.github.com/users/adtac/gists{/gist_id}","starred_url":"https://api.github.com/users/adtac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adtac/subscriptions","organizations_url":"https://api.github.com/users/adtac/orgs","repos_url":"https://api.github.com/users/adtac/repos","events_url":"https://api.github.com/users/adtac/events{/privacy}","received_events_url":"https://api.github.com/users/adtac/received_events","type":"User","site_admin":false},"body":"this is kinda redundant, don't you think? ;)","created_at":"2017-07-23T13:27:28Z","updated_at":"2017-07-23T13:39:57Z","html_url":"https://github.com/coala/coala-quickstart/pull/133#discussion_r128919503","pull_request_url":"https://api.github.com/repos/coala/coala-quickstart/pulls/133","_links":{"self":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/comments/128919503"},"html":{"href":"https://github.com/coala/coala-quickstart/pull/133#discussion_r128919503"},"pull_request":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/133"}}},"pull_request":{"url":"https://api.github.com/repos/coala/coala-quickstart/pulls/133","id":130401144,"html_url":"https://github.com/coala/coala-quickstart/pull/133","diff_url":"https://github.com/coala/coala-quickstart/pull/133.diff","patch_url":"https://github.com/coala/coala-quickstart/pull/133.patch","issue_url":"https://api.github.com/repos/coala/coala-quickstart/issues/133","number":133,"state":"open","locked":false,"title":"gsoc: cEP-0014 implementation","user":{"login":"satwikkansal","id":10217535,"avatar_url":"https://avatars1.githubusercontent.com/u/10217535?v=4","gravatar_id":"","url":"https://api.github.com/users/satwikkansal","html_url":"https://github.com/satwikkansal","followers_url":"https://api.github.com/users/satwikkansal/followers","following_url":"https://api.github.com/users/satwikkansal/following{/other_user}","gists_url":"https://api.github.com/users/satwikkansal/gists{/gist_id}","starred_url":"https://api.github.com/users/satwikkansal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satwikkansal/subscriptions","organizations_url":"https://api.github.com/users/satwikkansal/orgs","repos_url":"https://api.github.com/users/satwikkansal/repos","events_url":"https://api.github.com/users/satwikkansal/events{/privacy}","received_events_url":"https://api.github.com/users/satwikkansal/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-07-13T15:33:12Z","updated_at":"2017-07-23T13:39:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d30491900d9e84929ec022dae1e2c06526fc2b7","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/coala/coala-quickstart/pulls/133/commits","review_comments_url":"https://api.github.com/repos/coala/coala-quickstart/pulls/133/comments","review_comment_url":"https://api.github.com/repos/coala/coala-quickstart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coala/coala-quickstart/issues/133/comments","statuses_url":"https://api.github.com/repos/coala/coala-quickstart/statuses/19a8a9dc84499eae9db93d3cc52e5ce18a610bbd","head":{"label":"satwikkansal:information_utilization","ref":"information_utilization","sha":"19a8a9dc84499eae9db93d3cc52e5ce18a610bbd","user":{"login":"satwikkansal","id":10217535,"avatar_url":"https://avatars1.githubusercontent.com/u/10217535?v=4","gravatar_id":"","url":"https://api.github.com/users/satwikkansal","html_url":"https://github.com/satwikkansal","followers_url":"https://api.github.com/users/satwikkansal/followers","following_url":"https://api.github.com/users/satwikkansal/following{/other_user}","gists_url":"https://api.github.com/users/satwikkansal/gists{/gist_id}","starred_url":"https://api.github.com/users/satwikkansal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satwikkansal/subscriptions","organizations_url":"https://api.github.com/users/satwikkansal/orgs","repos_url":"https://api.github.com/users/satwikkansal/repos","events_url":"https://api.github.com/users/satwikkansal/events{/privacy}","received_events_url":"https://api.github.com/users/satwikkansal/received_events","type":"User","site_admin":false},"repo":{"id":78829581,"name":"coala-quickstart","full_name":"satwikkansal/coala-quickstart","owner":{"login":"satwikkansal","id":10217535,"avatar_url":"https://avatars1.githubusercontent.com/u/10217535?v=4","gravatar_id":"","url":"https://api.github.com/users/satwikkansal","html_url":"https://github.com/satwikkansal","followers_url":"https://api.github.com/users/satwikkansal/followers","following_url":"https://api.github.com/users/satwikkansal/following{/other_user}","gists_url":"https://api.github.com/users/satwikkansal/gists{/gist_id}","starred_url":"https://api.github.com/users/satwikkansal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satwikkansal/subscriptions","organizations_url":"https://api.github.com/users/satwikkansal/orgs","repos_url":"https://api.github.com/users/satwikkansal/repos","events_url":"https://api.github.com/users/satwikkansal/events{/privacy}","received_events_url":"https://api.github.com/users/satwikkansal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/satwikkansal/coala-quickstart","description":"A binary that generates an initial coala config lightning fast for you!","fork":true,"url":"https://api.github.com/repos/satwikkansal/coala-quickstart","forks_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/forks","keys_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/teams","hooks_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/hooks","issue_events_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/issues/events{/number}","events_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/events","assignees_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/assignees{/user}","branches_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/branches{/branch}","tags_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/tags","blobs_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/git/refs{/sha}","trees_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/statuses/{sha}","languages_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/languages","stargazers_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/stargazers","contributors_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/contributors","subscribers_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/subscribers","subscription_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/subscription","commits_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/commits{/sha}","git_commits_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/git/commits{/sha}","comments_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/comments{/number}","issue_comment_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/issues/comments{/number}","contents_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/contents/{+path}","compare_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/merges","archive_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/downloads","issues_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/issues{/number}","pulls_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/pulls{/number}","milestones_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/milestones{/number}","notifications_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/labels{/name}","releases_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/releases{/id}","deployments_url":"https://api.github.com/repos/satwikkansal/coala-quickstart/deployments","created_at":"2017-01-13T08:18:29Z","updated_at":"2017-01-13T08:18:31Z","pushed_at":"2017-07-23T09:48:25Z","git_url":"git://github.com/satwikkansal/coala-quickstart.git","ssh_url":"git@github.com:satwikkansal/coala-quickstart.git","clone_url":"https://github.com/satwikkansal/coala-quickstart.git","svn_url":"https://github.com/satwikkansal/coala-quickstart","homepage":"","size":177,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"coala:master","ref":"master","sha":"b40f50c1aef2a5a4027e35da1b970870570ae7e0","user":{"login":"coala","id":10620750,"avatar_url":"https://avatars3.githubusercontent.com/u/10620750?v=4","gravatar_id":"","url":"https://api.github.com/users/coala","html_url":"https://github.com/coala","followers_url":"https://api.github.com/users/coala/followers","following_url":"https://api.github.com/users/coala/following{/other_user}","gists_url":"https://api.github.com/users/coala/gists{/gist_id}","starred_url":"https://api.github.com/users/coala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coala/subscriptions","organizations_url":"https://api.github.com/users/coala/orgs","repos_url":"https://api.github.com/users/coala/repos","events_url":"https://api.github.com/users/coala/events{/privacy}","received_events_url":"https://api.github.com/users/coala/received_events","type":"Organization","site_admin":false},"repo":{"id":52889504,"name":"coala-quickstart","full_name":"coala/coala-quickstart","owner":{"login":"coala","id":10620750,"avatar_url":"https://avatars3.githubusercontent.com/u/10620750?v=4","gravatar_id":"","url":"https://api.github.com/users/coala","html_url":"https://github.com/coala","followers_url":"https://api.github.com/users/coala/followers","following_url":"https://api.github.com/users/coala/following{/other_user}","gists_url":"https://api.github.com/users/coala/gists{/gist_id}","starred_url":"https://api.github.com/users/coala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coala/subscriptions","organizations_url":"https://api.github.com/users/coala/orgs","repos_url":"https://api.github.com/users/coala/repos","events_url":"https://api.github.com/users/coala/events{/privacy}","received_events_url":"https://api.github.com/users/coala/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coala/coala-quickstart","description":"A tool that generates an initial coala config lightning fast for you!","fork":false,"url":"https://api.github.com/repos/coala/coala-quickstart","forks_url":"https://api.github.com/repos/coala/coala-quickstart/forks","keys_url":"https://api.github.com/repos/coala/coala-quickstart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coala/coala-quickstart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coala/coala-quickstart/teams","hooks_url":"https://api.github.com/repos/coala/coala-quickstart/hooks","issue_events_url":"https://api.github.com/repos/coala/coala-quickstart/issues/events{/number}","events_url":"https://api.github.com/repos/coala/coala-quickstart/events","assignees_url":"https://api.github.com/repos/coala/coala-quickstart/assignees{/user}","branches_url":"https://api.github.com/repos/coala/coala-quickstart/branches{/branch}","tags_url":"https://api.github.com/repos/coala/coala-quickstart/tags","blobs_url":"https://api.github.com/repos/coala/coala-quickstart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coala/coala-quickstart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coala/coala-quickstart/git/refs{/sha}","trees_url":"https://api.github.com/repos/coala/coala-quickstart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coala/coala-quickstart/statuses/{sha}","languages_url":"https://api.github.com/repos/coala/coala-quickstart/languages","stargazers_url":"https://api.github.com/repos/coala/coala-quickstart/stargazers","contributors_url":"https://api.github.com/repos/coala/coala-quickstart/contributors","subscribers_url":"https://api.github.com/repos/coala/coala-quickstart/subscribers","subscription_url":"https://api.github.com/repos/coala/coala-quickstart/subscription","commits_url":"https://api.github.com/repos/coala/coala-quickstart/commits{/sha}","git_commits_url":"https://api.github.com/repos/coala/coala-quickstart/git/commits{/sha}","comments_url":"https://api.github.com/repos/coala/coala-quickstart/comments{/number}","issue_comment_url":"https://api.github.com/repos/coala/coala-quickstart/issues/comments{/number}","contents_url":"https://api.github.com/repos/coala/coala-quickstart/contents/{+path}","compare_url":"https://api.github.com/repos/coala/coala-quickstart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coala/coala-quickstart/merges","archive_url":"https://api.github.com/repos/coala/coala-quickstart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coala/coala-quickstart/downloads","issues_url":"https://api.github.com/repos/coala/coala-quickstart/issues{/number}","pulls_url":"https://api.github.com/repos/coala/coala-quickstart/pulls{/number}","milestones_url":"https://api.github.com/repos/coala/coala-quickstart/milestones{/number}","notifications_url":"https://api.github.com/repos/coala/coala-quickstart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coala/coala-quickstart/labels{/name}","releases_url":"https://api.github.com/repos/coala/coala-quickstart/releases{/id}","deployments_url":"https://api.github.com/repos/coala/coala-quickstart/deployments","created_at":"2016-03-01T15:55:10Z","updated_at":"2017-07-04T12:54:37Z","pushed_at":"2017-07-23T09:48:26Z","git_url":"git://github.com/coala/coala-quickstart.git","ssh_url":"git@github.com:coala/coala-quickstart.git","clone_url":"https://github.com/coala/coala-quickstart.git","svn_url":"https://github.com/coala/coala-quickstart","homepage":"","size":101,"stargazers_count":20,"watchers_count":20,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":46,"forks":24,"open_issues":46,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/133"},"html":{"href":"https://github.com/coala/coala-quickstart/pull/133"},"issue":{"href":"https://api.github.com/repos/coala/coala-quickstart/issues/133"},"comments":{"href":"https://api.github.com/repos/coala/coala-quickstart/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coala/coala-quickstart/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/coala/coala-quickstart/statuses/19a8a9dc84499eae9db93d3cc52e5ce18a610bbd"}}}}
{"actor":{"display_login":"adtac"}}