{"action":"created","comment":{"url":"https://api.github.com/repos/waldo-seg/waldo/pulls/comments/188383654","pull_request_review_id":120351356,"id":188383654,"diff_hunk":"@@ -0,0 +1,48 @@\n+#!/usr/bin/env python3\n+\n+\"\"\" This module will be used to check whether the common requirements \n+    that we think the bulk of the example directories will need exist or not.\n+  It will check the requirements from requirements file \n+  (scripts/dependencies/requirements.txt). It will prints the required \n+  dependencies that are not present and will exist with status 1 if all dependencies\n+  are not present.\n+\"\"\"\n+\n+import pkg_resources\n+import argparse\n+import sys\n+import os\n+from pkg_resources import DistributionNotFound, VersionConflict\n+\n+parser = argparse.ArgumentParser(description=\"Checks if all required packages\"\n+                                \"are installed or not. Prints remaining required\" \n+                                \" dependencies and exists with status 1, if all \"\n+                                \"packages are not present.\",\n+                                 epilog=\"E.g.  \" + sys.argv[0],\n+                                 formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n+parser.add_argument('--requirements_path', type=str, \n+                    default=\"scripts/dependencies/requirements.txt\",\n+                    help='Path of the downloaded requirements file')\n+args = parser.parse_args()\n+\n+dependency_list = []\n+with open(args.requirements_path) as f:\n+    for line in f:\n+        line = line.strip()\n+        # check if required package is installed\n+        try:\n+            pkg_resources.require(line)\n+        except:\n+            dependency_list.append(line)\n+    if len(dependency_list) ==0:\n+        print(\"{0} all requirements are met\".format(sys.argv[0]))\n+        sys.exit()\n+    else:\n+        dependencies_str = \" \".join(dependency_list)\n+        print(\"{0} not all the required python packages are installed.\"\n+              \"Please do as follows (from your experiment directory, \"\n+              \"e.g. egs/dbs2018/v1): \".format(sys.argv[0]))\n+        print(\". ./cmd.sh \\n\"","path":"scripts/dependencies/check_packages.sh","position":45,"original_position":45,"commit_id":"1c734c62a87492a1f2a68202a6ce4a7c79d7ce65","original_commit_id":"1c734c62a87492a1f2a68202a6ce4a7c79d7ce65","user":{"login":"danpovey","id":3298747,"avatar_url":"https://avatars1.githubusercontent.com/u/3298747?v=4","gravatar_id":"","url":"https://api.github.com/users/danpovey","html_url":"https://github.com/danpovey","followers_url":"https://api.github.com/users/danpovey/followers","following_url":"https://api.github.com/users/danpovey/following{/other_user}","gists_url":"https://api.github.com/users/danpovey/gists{/gist_id}","starred_url":"https://api.github.com/users/danpovey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpovey/subscriptions","organizations_url":"https://api.github.com/users/danpovey/orgs","repos_url":"https://api.github.com/users/danpovey/repos","events_url":"https://api.github.com/users/danpovey/events{/privacy}","received_events_url":"https://api.github.com/users/danpovey/received_events","type":"User","site_admin":false},"body":"oh, (and my bad), I think this should probably be path.sh, not cmd.sh.","created_at":"2018-05-15T18:07:26Z","updated_at":"2018-05-15T18:07:27Z","html_url":"https://github.com/waldo-seg/waldo/pull/30#discussion_r188383654","pull_request_url":"https://api.github.com/repos/waldo-seg/waldo/pulls/30","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/waldo-seg/waldo/pulls/comments/188383654"},"html":{"href":"https://github.com/waldo-seg/waldo/pull/30#discussion_r188383654"},"pull_request":{"href":"https://api.github.com/repos/waldo-seg/waldo/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/waldo-seg/waldo/pulls/30","id":188116126,"html_url":"https://github.com/waldo-seg/waldo/pull/30","diff_url":"https://github.com/waldo-seg/waldo/pull/30.diff","patch_url":"https://github.com/waldo-seg/waldo/pull/30.patch","issue_url":"https://api.github.com/repos/waldo-seg/waldo/issues/30","number":30,"state":"open","locked":false,"title":"checking dependencies from a requirements file","user":{"login":"aarora8","id":29442373,"avatar_url":"https://avatars0.githubusercontent.com/u/29442373?v=4","gravatar_id":"","url":"https://api.github.com/users/aarora8","html_url":"https://github.com/aarora8","followers_url":"https://api.github.com/users/aarora8/followers","following_url":"https://api.github.com/users/aarora8/following{/other_user}","gists_url":"https://api.github.com/users/aarora8/gists{/gist_id}","starred_url":"https://api.github.com/users/aarora8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarora8/subscriptions","organizations_url":"https://api.github.com/users/aarora8/orgs","repos_url":"https://api.github.com/users/aarora8/repos","events_url":"https://api.github.com/users/aarora8/events{/privacy}","received_events_url":"https://api.github.com/users/aarora8/received_events","type":"User","site_admin":false},"body":"check whether dependencies exist from a requirements file (scripts/dependencies/requirements.txt). Prints remaining required dependencies and exist with status 1 if all packages are not present.","created_at":"2018-05-15T12:46:21Z","updated_at":"2018-05-15T18:07:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a56bdac4f486b46e7c1bb636abc232115a126284","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/waldo-seg/waldo/pulls/30/commits","review_comments_url":"https://api.github.com/repos/waldo-seg/waldo/pulls/30/comments","review_comment_url":"https://api.github.com/repos/waldo-seg/waldo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/waldo-seg/waldo/issues/30/comments","statuses_url":"https://api.github.com/repos/waldo-seg/waldo/statuses/1c734c62a87492a1f2a68202a6ce4a7c79d7ce65","head":{"label":"aarora8:check_dependency","ref":"check_dependency","sha":"1c734c62a87492a1f2a68202a6ce4a7c79d7ce65","user":{"login":"aarora8","id":29442373,"avatar_url":"https://avatars0.githubusercontent.com/u/29442373?v=4","gravatar_id":"","url":"https://api.github.com/users/aarora8","html_url":"https://github.com/aarora8","followers_url":"https://api.github.com/users/aarora8/followers","following_url":"https://api.github.com/users/aarora8/following{/other_user}","gists_url":"https://api.github.com/users/aarora8/gists{/gist_id}","starred_url":"https://api.github.com/users/aarora8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarora8/subscriptions","organizations_url":"https://api.github.com/users/aarora8/orgs","repos_url":"https://api.github.com/users/aarora8/repos","events_url":"https://api.github.com/users/aarora8/events{/privacy}","received_events_url":"https://api.github.com/users/aarora8/received_events","type":"User","site_admin":false},"repo":{"id":131447999,"name":"waldo","full_name":"aarora8/waldo","owner":{"login":"aarora8","id":29442373,"avatar_url":"https://avatars0.githubusercontent.com/u/29442373?v=4","gravatar_id":"","url":"https://api.github.com/users/aarora8","html_url":"https://github.com/aarora8","followers_url":"https://api.github.com/users/aarora8/followers","following_url":"https://api.github.com/users/aarora8/following{/other_user}","gists_url":"https://api.github.com/users/aarora8/gists{/gist_id}","starred_url":"https://api.github.com/users/aarora8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarora8/subscriptions","organizations_url":"https://api.github.com/users/aarora8/orgs","repos_url":"https://api.github.com/users/aarora8/repos","events_url":"https://api.github.com/users/aarora8/events{/privacy}","received_events_url":"https://api.github.com/users/aarora8/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aarora8/waldo","description":" image-segmentation and text-localization ","fork":true,"url":"https://api.github.com/repos/aarora8/waldo","forks_url":"https://api.github.com/repos/aarora8/waldo/forks","keys_url":"https://api.github.com/repos/aarora8/waldo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aarora8/waldo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aarora8/waldo/teams","hooks_url":"https://api.github.com/repos/aarora8/waldo/hooks","issue_events_url":"https://api.github.com/repos/aarora8/waldo/issues/events{/number}","events_url":"https://api.github.com/repos/aarora8/waldo/events","assignees_url":"https://api.github.com/repos/aarora8/waldo/assignees{/user}","branches_url":"https://api.github.com/repos/aarora8/waldo/branches{/branch}","tags_url":"https://api.github.com/repos/aarora8/waldo/tags","blobs_url":"https://api.github.com/repos/aarora8/waldo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aarora8/waldo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aarora8/waldo/git/refs{/sha}","trees_url":"https://api.github.com/repos/aarora8/waldo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aarora8/waldo/statuses/{sha}","languages_url":"https://api.github.com/repos/aarora8/waldo/languages","stargazers_url":"https://api.github.com/repos/aarora8/waldo/stargazers","contributors_url":"https://api.github.com/repos/aarora8/waldo/contributors","subscribers_url":"https://api.github.com/repos/aarora8/waldo/subscribers","subscription_url":"https://api.github.com/repos/aarora8/waldo/subscription","commits_url":"https://api.github.com/repos/aarora8/waldo/commits{/sha}","git_commits_url":"https://api.github.com/repos/aarora8/waldo/git/commits{/sha}","comments_url":"https://api.github.com/repos/aarora8/waldo/comments{/number}","issue_comment_url":"https://api.github.com/repos/aarora8/waldo/issues/comments{/number}","contents_url":"https://api.github.com/repos/aarora8/waldo/contents/{+path}","compare_url":"https://api.github.com/repos/aarora8/waldo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aarora8/waldo/merges","archive_url":"https://api.github.com/repos/aarora8/waldo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aarora8/waldo/downloads","issues_url":"https://api.github.com/repos/aarora8/waldo/issues{/number}","pulls_url":"https://api.github.com/repos/aarora8/waldo/pulls{/number}","milestones_url":"https://api.github.com/repos/aarora8/waldo/milestones{/number}","notifications_url":"https://api.github.com/repos/aarora8/waldo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aarora8/waldo/labels{/name}","releases_url":"https://api.github.com/repos/aarora8/waldo/releases{/id}","deployments_url":"https://api.github.com/repos/aarora8/waldo/deployments","created_at":"2018-04-28T22:18:04Z","updated_at":"2018-05-15T03:37:29Z","pushed_at":"2018-05-15T13:46:17Z","git_url":"git://github.com/aarora8/waldo.git","ssh_url":"git@github.com:aarora8/waldo.git","clone_url":"https://github.com/aarora8/waldo.git","svn_url":"https://github.com/aarora8/waldo","homepage":null,"size":235,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"waldo-seg:master","ref":"master","sha":"ccb836250d0b16b254466b0b63062257f602c8e5","user":{"login":"waldo-seg","id":38770818,"avatar_url":"https://avatars2.githubusercontent.com/u/38770818?v=4","gravatar_id":"","url":"https://api.github.com/users/waldo-seg","html_url":"https://github.com/waldo-seg","followers_url":"https://api.github.com/users/waldo-seg/followers","following_url":"https://api.github.com/users/waldo-seg/following{/other_user}","gists_url":"https://api.github.com/users/waldo-seg/gists{/gist_id}","starred_url":"https://api.github.com/users/waldo-seg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldo-seg/subscriptions","organizations_url":"https://api.github.com/users/waldo-seg/orgs","repos_url":"https://api.github.com/users/waldo-seg/repos","events_url":"https://api.github.com/users/waldo-seg/events{/privacy}","received_events_url":"https://api.github.com/users/waldo-seg/received_events","type":"Organization","site_admin":false},"repo":{"id":131220535,"name":"waldo","full_name":"waldo-seg/waldo","owner":{"login":"waldo-seg","id":38770818,"avatar_url":"https://avatars2.githubusercontent.com/u/38770818?v=4","gravatar_id":"","url":"https://api.github.com/users/waldo-seg","html_url":"https://github.com/waldo-seg","followers_url":"https://api.github.com/users/waldo-seg/followers","following_url":"https://api.github.com/users/waldo-seg/following{/other_user}","gists_url":"https://api.github.com/users/waldo-seg/gists{/gist_id}","starred_url":"https://api.github.com/users/waldo-seg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waldo-seg/subscriptions","organizations_url":"https://api.github.com/users/waldo-seg/orgs","repos_url":"https://api.github.com/users/waldo-seg/repos","events_url":"https://api.github.com/users/waldo-seg/events{/privacy}","received_events_url":"https://api.github.com/users/waldo-seg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/waldo-seg/waldo","description":" image-segmentation and text-localization ","fork":false,"url":"https://api.github.com/repos/waldo-seg/waldo","forks_url":"https://api.github.com/repos/waldo-seg/waldo/forks","keys_url":"https://api.github.com/repos/waldo-seg/waldo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/waldo-seg/waldo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/waldo-seg/waldo/teams","hooks_url":"https://api.github.com/repos/waldo-seg/waldo/hooks","issue_events_url":"https://api.github.com/repos/waldo-seg/waldo/issues/events{/number}","events_url":"https://api.github.com/repos/waldo-seg/waldo/events","assignees_url":"https://api.github.com/repos/waldo-seg/waldo/assignees{/user}","branches_url":"https://api.github.com/repos/waldo-seg/waldo/branches{/branch}","tags_url":"https://api.github.com/repos/waldo-seg/waldo/tags","blobs_url":"https://api.github.com/repos/waldo-seg/waldo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/waldo-seg/waldo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/waldo-seg/waldo/git/refs{/sha}","trees_url":"https://api.github.com/repos/waldo-seg/waldo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/waldo-seg/waldo/statuses/{sha}","languages_url":"https://api.github.com/repos/waldo-seg/waldo/languages","stargazers_url":"https://api.github.com/repos/waldo-seg/waldo/stargazers","contributors_url":"https://api.github.com/repos/waldo-seg/waldo/contributors","subscribers_url":"https://api.github.com/repos/waldo-seg/waldo/subscribers","subscription_url":"https://api.github.com/repos/waldo-seg/waldo/subscription","commits_url":"https://api.github.com/repos/waldo-seg/waldo/commits{/sha}","git_commits_url":"https://api.github.com/repos/waldo-seg/waldo/git/commits{/sha}","comments_url":"https://api.github.com/repos/waldo-seg/waldo/comments{/number}","issue_comment_url":"https://api.github.com/repos/waldo-seg/waldo/issues/comments{/number}","contents_url":"https://api.github.com/repos/waldo-seg/waldo/contents/{+path}","compare_url":"https://api.github.com/repos/waldo-seg/waldo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/waldo-seg/waldo/merges","archive_url":"https://api.github.com/repos/waldo-seg/waldo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/waldo-seg/waldo/downloads","issues_url":"https://api.github.com/repos/waldo-seg/waldo/issues{/number}","pulls_url":"https://api.github.com/repos/waldo-seg/waldo/pulls{/number}","milestones_url":"https://api.github.com/repos/waldo-seg/waldo/milestones{/number}","notifications_url":"https://api.github.com/repos/waldo-seg/waldo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/waldo-seg/waldo/labels{/name}","releases_url":"https://api.github.com/repos/waldo-seg/waldo/releases{/id}","deployments_url":"https://api.github.com/repos/waldo-seg/waldo/deployments","created_at":"2018-04-26T23:20:53Z","updated_at":"2018-05-15T18:05:43Z","pushed_at":"2018-05-15T18:05:42Z","git_url":"git://github.com/waldo-seg/waldo.git","ssh_url":"git@github.com:waldo-seg/waldo.git","clone_url":"https://github.com/waldo-seg/waldo.git","svn_url":"https://github.com/waldo-seg/waldo","homepage":null,"size":134,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":7,"open_issues":2,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/waldo-seg/waldo/pulls/30"},"html":{"href":"https://github.com/waldo-seg/waldo/pull/30"},"issue":{"href":"https://api.github.com/repos/waldo-seg/waldo/issues/30"},"comments":{"href":"https://api.github.com/repos/waldo-seg/waldo/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/waldo-seg/waldo/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/waldo-seg/waldo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/waldo-seg/waldo/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/waldo-seg/waldo/statuses/1c734c62a87492a1f2a68202a6ce4a7c79d7ce65"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"danpovey"}}