{"action":"created","comment":{"url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/comments/70261022","id":70261022,"diff_hunk":"@@ -0,0 +1,146 @@\n+import os\n+import pickle\n+\n+import requests\n+from os.path import join, getsize\n+import lxml.html\n+\n+from node import node\n+\n+\n+class ReadFiles:\n+    path=\"\"\n+\n+    def __init__(self, path):\n+        self.path = path\n+\n+    def getAllFiles(self):\n+        list = []\n+        for root, dirs, files in os.walk(self.path):\n+            for name in files:\n+                if name.endswith(\".spec\"):\n+                    list.append(name)\n+        return list\n+\n+    def readReqFromFile(self, name):\n+        req=[]\n+        file = open(self.path+name)\n+        for line in file:\n+            li = line.lstrip()\n+            if li.startswith(\"Requires:\") or li.startswith(\"BuildRequires:\"):\n+                splited=line.split()\n+                del splited[:1]\n+                req+=splited\n+        file.close()\n+        return req\n+\n+\n+\n+    def addChildren(self, _node, dependencies, libs):\n+        values={}\n+        for _value in dependencies:\n+            value=_value\n+            if (value.startswith('py2')):\n+                value = value[4:]\n+            if value.lower() in map(str.lower, libs):\n+                values[_value] = \"ok\"\n+            else:\n+                values[_value] = \"nope\"\n+\n+        _node.children = [node(dep+\"- \"+values[dep]) for dep in dependencies]\n+        i=0;\n+        for dep in dependencies:\n+            if dep+\".spec\" in reqMap.keys():\n+                self.addChildren(_node.children[i], reqMap[dep + \".spec\"], libs)\n+            i+=1\n+\n+\n+\n+    def retrieveLibs(self):\n+        libs=[]\n+        response = requests.get('https://pypi.python.org/pypi?:action=browse&c=533&show=all')","path":"dependencies/test.py","position":61,"original_position":61,"commit_id":"c5be3b3b17232d0e0843ee3a1418f659a1f45be6","original_commit_id":"c5be3b3b17232d0e0843ee3a1418f659a1f45be6","user":{"login":"vkuznet","id":125138,"avatar_url":"https://avatars.githubusercontent.com/u/125138?v=3","gravatar_id":"","url":"https://api.github.com/users/vkuznet","html_url":"https://github.com/vkuznet","followers_url":"https://api.github.com/users/vkuznet/followers","following_url":"https://api.github.com/users/vkuznet/following{/other_user}","gists_url":"https://api.github.com/users/vkuznet/gists{/gist_id}","starred_url":"https://api.github.com/users/vkuznet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkuznet/subscriptions","organizations_url":"https://api.github.com/users/vkuznet/orgs","repos_url":"https://api.github.com/users/vkuznet/repos","events_url":"https://api.github.com/users/vkuznet/events{/privacy}","received_events_url":"https://api.github.com/users/vkuznet/received_events","type":"User","site_admin":false},"body":"what if request will fail? what are the meaning of parameters you sent?","created_at":"2016-07-11T13:53:13Z","updated_at":"2016-07-11T13:53:13Z","html_url":"https://github.com/vkuznet/DMWMPythonMigration/pull/1#discussion_r70261022","pull_request_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/comments/70261022"},"html":{"href":"https://github.com/vkuznet/DMWMPythonMigration/pull/1#discussion_r70261022"},"pull_request":{"href":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/1","id":76954149,"html_url":"https://github.com/vkuznet/DMWMPythonMigration/pull/1","diff_url":"https://github.com/vkuznet/DMWMPythonMigration/pull/1.diff","patch_url":"https://github.com/vkuznet/DMWMPythonMigration/pull/1.patch","issue_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/issues/1","number":1,"state":"open","locked":false,"title":"1st Week","user":{"login":"SaltumDis","id":13053469,"avatar_url":"https://avatars.githubusercontent.com/u/13053469?v=3","gravatar_id":"","url":"https://api.github.com/users/SaltumDis","html_url":"https://github.com/SaltumDis","followers_url":"https://api.github.com/users/SaltumDis/followers","following_url":"https://api.github.com/users/SaltumDis/following{/other_user}","gists_url":"https://api.github.com/users/SaltumDis/gists{/gist_id}","starred_url":"https://api.github.com/users/SaltumDis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaltumDis/subscriptions","organizations_url":"https://api.github.com/users/SaltumDis/orgs","repos_url":"https://api.github.com/users/SaltumDis/repos","events_url":"https://api.github.com/users/SaltumDis/events{/privacy}","received_events_url":"https://api.github.com/users/SaltumDis/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-11T13:33:13Z","updated_at":"2016-07-11T13:53:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"514bcd6510659ca745e704a87f97c8d823dcffd6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/1/commits","review_comments_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/1/comments","review_comment_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/issues/1/comments","statuses_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/statuses/c5be3b3b17232d0e0843ee3a1418f659a1f45be6","head":{"label":"SaltumDis:master","ref":"master","sha":"c5be3b3b17232d0e0843ee3a1418f659a1f45be6","user":{"login":"SaltumDis","id":13053469,"avatar_url":"https://avatars.githubusercontent.com/u/13053469?v=3","gravatar_id":"","url":"https://api.github.com/users/SaltumDis","html_url":"https://github.com/SaltumDis","followers_url":"https://api.github.com/users/SaltumDis/followers","following_url":"https://api.github.com/users/SaltumDis/following{/other_user}","gists_url":"https://api.github.com/users/SaltumDis/gists{/gist_id}","starred_url":"https://api.github.com/users/SaltumDis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaltumDis/subscriptions","organizations_url":"https://api.github.com/users/SaltumDis/orgs","repos_url":"https://api.github.com/users/SaltumDis/repos","events_url":"https://api.github.com/users/SaltumDis/events{/privacy}","received_events_url":"https://api.github.com/users/SaltumDis/received_events","type":"User","site_admin":false},"repo":{"id":63070379,"name":"DMWMPythonMigration","full_name":"SaltumDis/DMWMPythonMigration","owner":{"login":"SaltumDis","id":13053469,"avatar_url":"https://avatars.githubusercontent.com/u/13053469?v=3","gravatar_id":"","url":"https://api.github.com/users/SaltumDis","html_url":"https://github.com/SaltumDis","followers_url":"https://api.github.com/users/SaltumDis/followers","following_url":"https://api.github.com/users/SaltumDis/following{/other_user}","gists_url":"https://api.github.com/users/SaltumDis/gists{/gist_id}","starred_url":"https://api.github.com/users/SaltumDis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaltumDis/subscriptions","organizations_url":"https://api.github.com/users/SaltumDis/orgs","repos_url":"https://api.github.com/users/SaltumDis/repos","events_url":"https://api.github.com/users/SaltumDis/events{/privacy}","received_events_url":"https://api.github.com/users/SaltumDis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SaltumDis/DMWMPythonMigration","description":null,"fork":true,"url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration","forks_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/forks","keys_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/teams","hooks_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/hooks","issue_events_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/issues/events{/number}","events_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/events","assignees_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/assignees{/user}","branches_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/branches{/branch}","tags_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/tags","blobs_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/git/refs{/sha}","trees_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/statuses/{sha}","languages_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/languages","stargazers_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/stargazers","contributors_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/contributors","subscribers_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/subscribers","subscription_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/subscription","commits_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/commits{/sha}","git_commits_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/git/commits{/sha}","comments_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/comments{/number}","issue_comment_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/issues/comments{/number}","contents_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/contents/{+path}","compare_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/merges","archive_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/downloads","issues_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/issues{/number}","pulls_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/pulls{/number}","milestones_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/milestones{/number}","notifications_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/labels{/name}","releases_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/releases{/id}","deployments_url":"https://api.github.com/repos/SaltumDis/DMWMPythonMigration/deployments","created_at":"2016-07-11T13:30:02Z","updated_at":"2016-07-11T13:32:23Z","pushed_at":"2016-07-11T13:37:19Z","git_url":"git://github.com/SaltumDis/DMWMPythonMigration.git","ssh_url":"git@github.com:SaltumDis/DMWMPythonMigration.git","clone_url":"https://github.com/SaltumDis/DMWMPythonMigration.git","svn_url":"https://github.com/SaltumDis/DMWMPythonMigration","homepage":null,"size":0,"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":"vkuznet:master","ref":"master","sha":"6b13a2177e8a94253c217bd705549ae8c420c450","user":{"login":"vkuznet","id":125138,"avatar_url":"https://avatars.githubusercontent.com/u/125138?v=3","gravatar_id":"","url":"https://api.github.com/users/vkuznet","html_url":"https://github.com/vkuznet","followers_url":"https://api.github.com/users/vkuznet/followers","following_url":"https://api.github.com/users/vkuznet/following{/other_user}","gists_url":"https://api.github.com/users/vkuznet/gists{/gist_id}","starred_url":"https://api.github.com/users/vkuznet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkuznet/subscriptions","organizations_url":"https://api.github.com/users/vkuznet/orgs","repos_url":"https://api.github.com/users/vkuznet/repos","events_url":"https://api.github.com/users/vkuznet/events{/privacy}","received_events_url":"https://api.github.com/users/vkuznet/received_events","type":"User","site_admin":false},"repo":{"id":62295231,"name":"DMWMPythonMigration","full_name":"vkuznet/DMWMPythonMigration","owner":{"login":"vkuznet","id":125138,"avatar_url":"https://avatars.githubusercontent.com/u/125138?v=3","gravatar_id":"","url":"https://api.github.com/users/vkuznet","html_url":"https://github.com/vkuznet","followers_url":"https://api.github.com/users/vkuznet/followers","following_url":"https://api.github.com/users/vkuznet/following{/other_user}","gists_url":"https://api.github.com/users/vkuznet/gists{/gist_id}","starred_url":"https://api.github.com/users/vkuznet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkuznet/subscriptions","organizations_url":"https://api.github.com/users/vkuznet/orgs","repos_url":"https://api.github.com/users/vkuznet/repos","events_url":"https://api.github.com/users/vkuznet/events{/privacy}","received_events_url":"https://api.github.com/users/vkuznet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vkuznet/DMWMPythonMigration","description":null,"fork":false,"url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration","forks_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/forks","keys_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/teams","hooks_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/hooks","issue_events_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/issues/events{/number}","events_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/events","assignees_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/assignees{/user}","branches_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/branches{/branch}","tags_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/tags","blobs_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/git/refs{/sha}","trees_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/statuses/{sha}","languages_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/languages","stargazers_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/stargazers","contributors_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/contributors","subscribers_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/subscribers","subscription_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/subscription","commits_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/commits{/sha}","git_commits_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/git/commits{/sha}","comments_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/comments{/number}","issue_comment_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/issues/comments{/number}","contents_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/contents/{+path}","compare_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/merges","archive_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/downloads","issues_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/issues{/number}","pulls_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls{/number}","milestones_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/milestones{/number}","notifications_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/labels{/name}","releases_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/releases{/id}","deployments_url":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/deployments","created_at":"2016-06-30T08:48:39Z","updated_at":"2016-06-30T08:48:39Z","pushed_at":"2016-07-11T13:37:19Z","git_url":"git://github.com/vkuznet/DMWMPythonMigration.git","ssh_url":"git@github.com:vkuznet/DMWMPythonMigration.git","clone_url":"https://github.com/vkuznet/DMWMPythonMigration.git","svn_url":"https://github.com/vkuznet/DMWMPythonMigration","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/1"},"html":{"href":"https://github.com/vkuznet/DMWMPythonMigration/pull/1"},"issue":{"href":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/issues/1"},"comments":{"href":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/vkuznet/DMWMPythonMigration/statuses/c5be3b3b17232d0e0843ee3a1418f659a1f45be6"}}}}
{"actor":{"display_login":"vkuznet"}}