{"action":"created","comment":{"url":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/comments/49046228","id":49046228,"diff_hunk":"@@ -340,11 +341,57 @@ def load_module(module_abs_name, main_category):\n     if current_category not in BaseCategory.categories.values():\n         return\n     for framework_name, FrameworkClass in inspect.getmembers(module, _is_frameworkclass):\n-        if FrameworkClass(current_category) is not None:\n+        if FrameworkClass(category=current_category, force_loading=force_loading) is not None:\n             logger.debug(\"Attach framework {} to {}\".format(framework_name, current_category.name))\n \n \n-def load_frameworks():\n+def list_frameworks():\n+    \"\"\"List all frameworks.\n+\n+        Return a json dictionnary. Format of the json string is:\n+        { 'category_name':\n+          [\n+            { 'framework_name':\n+                {\n+                   'detail': detail_name (always filled, then, the output will filter it if detail isn't chosen)\n+                   'install_path': None or path string\n+                   'installable': True or False\n+                   'only_for_removal': True or False\n+                }\n+            },\n+          ]\n+        }\"\"\"\n+    cat_dict = list()\n+    for category in BaseCategory.categories.values():\n+        new_cat = dict()\n+\n+        new_cat[\"name\"] = category.prog_name\n+        new_cat[\"description\"] = category.description\n+\n+        framework_dict = list()\n+        for framework in category.frameworks.values():\n+            new_fram = dict()\n+\n+            new_fram[\"name\"] = framework.prog_name","path":"umake/frameworks/__init__.py","position":76,"original_position":76,"commit_id":"4da68c329c6c957012d0c26eaeb842d744a6f7a3","original_commit_id":"4da68c329c6c957012d0c26eaeb842d744a6f7a3","user":{"login":"didrocks","id":1823296,"avatar_url":"https://avatars.githubusercontent.com/u/1823296?v=3","gravatar_id":"","url":"https://api.github.com/users/didrocks","html_url":"https://github.com/didrocks","followers_url":"https://api.github.com/users/didrocks/followers","following_url":"https://api.github.com/users/didrocks/following{/other_user}","gists_url":"https://api.github.com/users/didrocks/gists{/gist_id}","starred_url":"https://api.github.com/users/didrocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/didrocks/subscriptions","organizations_url":"https://api.github.com/users/didrocks/orgs","repos_url":"https://api.github.com/users/didrocks/repos","events_url":"https://api.github.com/users/didrocks/events{/privacy}","received_events_url":"https://api.github.com/users/didrocks/received_events","type":"User","site_admin":false},"body":"Another (less repetitive form) would be:\r\n```\r\nnew_fram = {\r\n  \"name\": framework.prog_name,\r\n  \"only_for_removal\": framework.only_for_removal,\r\n  …\r\n}\r\n```\r\nsame for category creation above (and that way, you even don't need `= dict()` ;)","created_at":"2016-01-07T06:54:55Z","updated_at":"2016-01-07T06:54:55Z","html_url":"https://github.com/ubuntu/ubuntu-make/pull/224#discussion_r49046228","pull_request_url":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/224","_links":{"self":{"href":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/comments/49046228"},"html":{"href":"https://github.com/ubuntu/ubuntu-make/pull/224#discussion_r49046228"},"pull_request":{"href":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/224"}}},"pull_request":{"url":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/224","id":55017895,"html_url":"https://github.com/ubuntu/ubuntu-make/pull/224","diff_url":"https://github.com/ubuntu/ubuntu-make/pull/224.diff","patch_url":"https://github.com/ubuntu/ubuntu-make/pull/224.patch","issue_url":"https://api.github.com/repos/ubuntu/ubuntu-make/issues/224","number":224,"state":"open","locked":false,"title":"Listing argument","user":{"login":"Tankypon","id":8155675,"avatar_url":"https://avatars.githubusercontent.com/u/8155675?v=3","gravatar_id":"","url":"https://api.github.com/users/Tankypon","html_url":"https://github.com/Tankypon","followers_url":"https://api.github.com/users/Tankypon/followers","following_url":"https://api.github.com/users/Tankypon/following{/other_user}","gists_url":"https://api.github.com/users/Tankypon/gists{/gist_id}","starred_url":"https://api.github.com/users/Tankypon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tankypon/subscriptions","organizations_url":"https://api.github.com/users/Tankypon/orgs","repos_url":"https://api.github.com/users/Tankypon/repos","events_url":"https://api.github.com/users/Tankypon/events{/privacy}","received_events_url":"https://api.github.com/users/Tankypon/received_events","type":"User","site_admin":false},"body":"This PR is here to implement features specified in #191 and #207 issues. At the moment, the argument 'list' is not implemented. By the way, this PR introduces a new function to do the job.","created_at":"2016-01-04T20:25:27Z","updated_at":"2016-01-07T06:54:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5954cd09a15029cee21034fca920288cc4561ae4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/224/commits","review_comments_url":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/224/comments","review_comment_url":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ubuntu/ubuntu-make/issues/224/comments","statuses_url":"https://api.github.com/repos/ubuntu/ubuntu-make/statuses/4da68c329c6c957012d0c26eaeb842d744a6f7a3","head":{"label":"Tankypon:listing","ref":"listing","sha":"4da68c329c6c957012d0c26eaeb842d744a6f7a3","user":{"login":"Tankypon","id":8155675,"avatar_url":"https://avatars.githubusercontent.com/u/8155675?v=3","gravatar_id":"","url":"https://api.github.com/users/Tankypon","html_url":"https://github.com/Tankypon","followers_url":"https://api.github.com/users/Tankypon/followers","following_url":"https://api.github.com/users/Tankypon/following{/other_user}","gists_url":"https://api.github.com/users/Tankypon/gists{/gist_id}","starred_url":"https://api.github.com/users/Tankypon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tankypon/subscriptions","organizations_url":"https://api.github.com/users/Tankypon/orgs","repos_url":"https://api.github.com/users/Tankypon/repos","events_url":"https://api.github.com/users/Tankypon/events{/privacy}","received_events_url":"https://api.github.com/users/Tankypon/received_events","type":"User","site_admin":false},"repo":{"id":40005537,"name":"ubuntu-make","full_name":"Tankypon/ubuntu-make","owner":{"login":"Tankypon","id":8155675,"avatar_url":"https://avatars.githubusercontent.com/u/8155675?v=3","gravatar_id":"","url":"https://api.github.com/users/Tankypon","html_url":"https://github.com/Tankypon","followers_url":"https://api.github.com/users/Tankypon/followers","following_url":"https://api.github.com/users/Tankypon/following{/other_user}","gists_url":"https://api.github.com/users/Tankypon/gists{/gist_id}","starred_url":"https://api.github.com/users/Tankypon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tankypon/subscriptions","organizations_url":"https://api.github.com/users/Tankypon/orgs","repos_url":"https://api.github.com/users/Tankypon/repos","events_url":"https://api.github.com/users/Tankypon/events{/privacy}","received_events_url":"https://api.github.com/users/Tankypon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Tankypon/ubuntu-make","description":"Ubuntu Developer Tools Center","fork":true,"url":"https://api.github.com/repos/Tankypon/ubuntu-make","forks_url":"https://api.github.com/repos/Tankypon/ubuntu-make/forks","keys_url":"https://api.github.com/repos/Tankypon/ubuntu-make/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tankypon/ubuntu-make/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tankypon/ubuntu-make/teams","hooks_url":"https://api.github.com/repos/Tankypon/ubuntu-make/hooks","issue_events_url":"https://api.github.com/repos/Tankypon/ubuntu-make/issues/events{/number}","events_url":"https://api.github.com/repos/Tankypon/ubuntu-make/events","assignees_url":"https://api.github.com/repos/Tankypon/ubuntu-make/assignees{/user}","branches_url":"https://api.github.com/repos/Tankypon/ubuntu-make/branches{/branch}","tags_url":"https://api.github.com/repos/Tankypon/ubuntu-make/tags","blobs_url":"https://api.github.com/repos/Tankypon/ubuntu-make/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tankypon/ubuntu-make/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tankypon/ubuntu-make/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tankypon/ubuntu-make/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tankypon/ubuntu-make/statuses/{sha}","languages_url":"https://api.github.com/repos/Tankypon/ubuntu-make/languages","stargazers_url":"https://api.github.com/repos/Tankypon/ubuntu-make/stargazers","contributors_url":"https://api.github.com/repos/Tankypon/ubuntu-make/contributors","subscribers_url":"https://api.github.com/repos/Tankypon/ubuntu-make/subscribers","subscription_url":"https://api.github.com/repos/Tankypon/ubuntu-make/subscription","commits_url":"https://api.github.com/repos/Tankypon/ubuntu-make/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tankypon/ubuntu-make/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tankypon/ubuntu-make/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tankypon/ubuntu-make/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tankypon/ubuntu-make/contents/{+path}","compare_url":"https://api.github.com/repos/Tankypon/ubuntu-make/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tankypon/ubuntu-make/merges","archive_url":"https://api.github.com/repos/Tankypon/ubuntu-make/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tankypon/ubuntu-make/downloads","issues_url":"https://api.github.com/repos/Tankypon/ubuntu-make/issues{/number}","pulls_url":"https://api.github.com/repos/Tankypon/ubuntu-make/pulls{/number}","milestones_url":"https://api.github.com/repos/Tankypon/ubuntu-make/milestones{/number}","notifications_url":"https://api.github.com/repos/Tankypon/ubuntu-make/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tankypon/ubuntu-make/labels{/name}","releases_url":"https://api.github.com/repos/Tankypon/ubuntu-make/releases{/id}","created_at":"2015-07-31T13:01:03Z","updated_at":"2015-07-31T13:01:03Z","pushed_at":"2016-01-06T20:19:54Z","git_url":"git://github.com/Tankypon/ubuntu-make.git","ssh_url":"git@github.com:Tankypon/ubuntu-make.git","clone_url":"https://github.com/Tankypon/ubuntu-make.git","svn_url":"https://github.com/Tankypon/ubuntu-make","homepage":null,"size":2586,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"ubuntu:master","ref":"master","sha":"3fa76fa1f9247e9058d3dff40be5040c6e9db16d","user":{"login":"ubuntu","id":4604537,"avatar_url":"https://avatars.githubusercontent.com/u/4604537?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu","html_url":"https://github.com/ubuntu","followers_url":"https://api.github.com/users/ubuntu/followers","following_url":"https://api.github.com/users/ubuntu/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu/subscriptions","organizations_url":"https://api.github.com/users/ubuntu/orgs","repos_url":"https://api.github.com/users/ubuntu/repos","events_url":"https://api.github.com/users/ubuntu/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu/received_events","type":"Organization","site_admin":false},"repo":{"id":20486912,"name":"ubuntu-make","full_name":"ubuntu/ubuntu-make","owner":{"login":"ubuntu","id":4604537,"avatar_url":"https://avatars.githubusercontent.com/u/4604537?v=3","gravatar_id":"","url":"https://api.github.com/users/ubuntu","html_url":"https://github.com/ubuntu","followers_url":"https://api.github.com/users/ubuntu/followers","following_url":"https://api.github.com/users/ubuntu/following{/other_user}","gists_url":"https://api.github.com/users/ubuntu/gists{/gist_id}","starred_url":"https://api.github.com/users/ubuntu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubuntu/subscriptions","organizations_url":"https://api.github.com/users/ubuntu/orgs","repos_url":"https://api.github.com/users/ubuntu/repos","events_url":"https://api.github.com/users/ubuntu/events{/privacy}","received_events_url":"https://api.github.com/users/ubuntu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ubuntu/ubuntu-make","description":"Ubuntu Make","fork":false,"url":"https://api.github.com/repos/ubuntu/ubuntu-make","forks_url":"https://api.github.com/repos/ubuntu/ubuntu-make/forks","keys_url":"https://api.github.com/repos/ubuntu/ubuntu-make/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ubuntu/ubuntu-make/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ubuntu/ubuntu-make/teams","hooks_url":"https://api.github.com/repos/ubuntu/ubuntu-make/hooks","issue_events_url":"https://api.github.com/repos/ubuntu/ubuntu-make/issues/events{/number}","events_url":"https://api.github.com/repos/ubuntu/ubuntu-make/events","assignees_url":"https://api.github.com/repos/ubuntu/ubuntu-make/assignees{/user}","branches_url":"https://api.github.com/repos/ubuntu/ubuntu-make/branches{/branch}","tags_url":"https://api.github.com/repos/ubuntu/ubuntu-make/tags","blobs_url":"https://api.github.com/repos/ubuntu/ubuntu-make/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ubuntu/ubuntu-make/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ubuntu/ubuntu-make/git/refs{/sha}","trees_url":"https://api.github.com/repos/ubuntu/ubuntu-make/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ubuntu/ubuntu-make/statuses/{sha}","languages_url":"https://api.github.com/repos/ubuntu/ubuntu-make/languages","stargazers_url":"https://api.github.com/repos/ubuntu/ubuntu-make/stargazers","contributors_url":"https://api.github.com/repos/ubuntu/ubuntu-make/contributors","subscribers_url":"https://api.github.com/repos/ubuntu/ubuntu-make/subscribers","subscription_url":"https://api.github.com/repos/ubuntu/ubuntu-make/subscription","commits_url":"https://api.github.com/repos/ubuntu/ubuntu-make/commits{/sha}","git_commits_url":"https://api.github.com/repos/ubuntu/ubuntu-make/git/commits{/sha}","comments_url":"https://api.github.com/repos/ubuntu/ubuntu-make/comments{/number}","issue_comment_url":"https://api.github.com/repos/ubuntu/ubuntu-make/issues/comments{/number}","contents_url":"https://api.github.com/repos/ubuntu/ubuntu-make/contents/{+path}","compare_url":"https://api.github.com/repos/ubuntu/ubuntu-make/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ubuntu/ubuntu-make/merges","archive_url":"https://api.github.com/repos/ubuntu/ubuntu-make/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ubuntu/ubuntu-make/downloads","issues_url":"https://api.github.com/repos/ubuntu/ubuntu-make/issues{/number}","pulls_url":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls{/number}","milestones_url":"https://api.github.com/repos/ubuntu/ubuntu-make/milestones{/number}","notifications_url":"https://api.github.com/repos/ubuntu/ubuntu-make/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ubuntu/ubuntu-make/labels{/name}","releases_url":"https://api.github.com/repos/ubuntu/ubuntu-make/releases{/id}","created_at":"2014-06-04T14:29:09Z","updated_at":"2016-01-04T02:08:12Z","pushed_at":"2016-01-06T20:32:41Z","git_url":"git://github.com/ubuntu/ubuntu-make.git","ssh_url":"git@github.com:ubuntu/ubuntu-make.git","clone_url":"https://github.com/ubuntu/ubuntu-make.git","svn_url":"https://github.com/ubuntu/ubuntu-make","homepage":"","size":2734,"stargazers_count":352,"watchers_count":352,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":49,"forks":52,"open_issues":49,"watchers":352,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/224"},"html":{"href":"https://github.com/ubuntu/ubuntu-make/pull/224"},"issue":{"href":"https://api.github.com/repos/ubuntu/ubuntu-make/issues/224"},"comments":{"href":"https://api.github.com/repos/ubuntu/ubuntu-make/issues/224/comments"},"review_comments":{"href":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/224/comments"},"review_comment":{"href":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ubuntu/ubuntu-make/pulls/224/commits"},"statuses":{"href":"https://api.github.com/repos/ubuntu/ubuntu-make/statuses/4da68c329c6c957012d0c26eaeb842d744a6f7a3"}}}}