GitHub PullRequestReviewCommentEvent at 2014-06-14 04:23:15
Repository: qiita
Actor: josenavas
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/biocore/qiita/pulls/comments/13778906","id":13778906,"diff_hunk":"@@ -29,108 +37,286 @@ class Job(QiitaStatusObject):\n     Attributes\n     ----------\n     datatype\n-    function\n+    command\n     options\n     results\n     error_msg\n \n     Methods\n     -------\n-    add_results(results)\n-        Adds a list of results to the results\n-\n-    remove_results(results)\n-        Removes a list of results from the results\n+    set_error\n+    add_results\n     \"\"\"\n \n+    _table = \"job\"\n+\n     @staticmethod\n-    def create(datatype, function, analysis):\n-        \"\"\"Creates a new job on the database\n+    def _convert_to_id(value, table, conn_handler=None):\n+        \"\"\"Converts a string value to it's corresponding table identifier\n+\n+        Parameters\n+        ----------\n+        value : str\n+            The string value to convert\n+        table : str\n+            The table that has the conversion\n+        conn_handler : SQLConnectionHandler, optional\n+            The sql connection object\n+\n+        Returns\n+        -------\n+        int\n+            The id correspinding to the string\n+\n+        Raises\n+        ------\n+        IncompetentQiitaDeveloperError\n+            The passed string has no associated id\n+        \"\"\"\n+        conn_handler = conn_handler if conn_handler else SQLConnectionHandler()\n+        _id = conn_handler.execute_fetchone(\n+            \"SELECT {0}_id FROM qiita.{0} WHERE {0} = %s\".format(table),\n+            (value, ))\n+        if _id is None:\n+            raise IncompetentQiitaDeveloperError(\"%s not valid for table %s\"\n+                                                 % (value, table))\n+        return _id[0]\n+\n+    @classmethod\n+    def exists(cls, datatype, command, options):\n+        \"\"\"Checks if the given job already exists\n \n         Parameters\n         ----------\n         datatype : str\n-            The datatype in which this job applies\n-        function : str\n-            The identifier of the function executed in this job\n-        analysis : str\n-            The analysis which this job belongs to\n+            Datatype the job is operating on\n+        command : str\n+            The Qiime or other command run on the data","path":"qiita_db/job.py","position":100,"original_position":100,"commit_id":"8281d9d30b1b5678a88cf834ca3d5ff3c69d8608","original_commit_id":"8281d9d30b1b5678a88cf834ca3d5ff3c69d8608","user":{"login":"josenavas","id":2501478,"avatar_url":"https://avatars.githubusercontent.com/u/2501478?","gravatar_id":"a99e7718dc3c82563a0236d3adec1b36","url":"https://api.github.com/users/josenavas","html_url":"https://github.com/josenavas","followers_url":"https://api.github.com/users/josenavas/followers","following_url":"https://api.github.com/users/josenavas/following{/other_user}","gists_url":"https://api.github.com/users/josenavas/gists{/gist_id}","starred_url":"https://api.github.com/users/josenavas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josenavas/subscriptions","organizations_url":"https://api.github.com/users/josenavas/orgs","repos_url":"https://api.github.com/users/josenavas/repos","events_url":"https://api.github.com/users/josenavas/events{/privacy}","received_events_url":"https://api.github.com/users/josenavas/received_events","type":"User","site_admin":false},"body":"Remove `Qiime`:\r\n\r\n`The command to execute`","created_at":"2014-06-14T04:23:15Z","updated_at":"2014-06-14T04:23:15Z","html_url":"https://github.com/biocore/qiita/pull/81#discussion_r13778906","pull_request_url":"https://api.github.com/repos/biocore/qiita/pulls/81","_links":{"self":{"href":"https://api.github.com/repos/biocore/qiita/pulls/comments/13778906"},"html":{"href":"https://github.com/biocore/qiita/pull/81#discussion_r13778906"},"pull_request":{"href":"https://api.github.com/repos/biocore/qiita/pulls/81"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/qiita/pulls/81","id":17131959,"html_url":"https://github.com/biocore/qiita/pull/81","diff_url":"https://github.com/biocore/qiita/pull/81.diff","patch_url":"https://github.com/biocore/qiita/pull/81.patch","issue_url":"https://api.github.com/repos/biocore/qiita/issues/81","number":81,"state":"open","title":"Jobject addition","user":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?","gravatar_id":"362a74e36cdec089dbb6c8e2d1f6e014","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"body":"The job object with all tests. Test files were also added to test the tar capabilities and result addition capabilities.","created_at":"2014-06-13T21:07:07Z","updated_at":"2014-06-14T04:23:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eba44be19478ca2e9f6e3ae10c99ad0a523442a5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/qiita/pulls/81/commits","review_comments_url":"https://api.github.com/repos/biocore/qiita/pulls/81/comments","review_comment_url":"https://api.github.com/repos/biocore/qiita/pulls/comments/{number}","comments_url":"https://api.github.com/repos/biocore/qiita/issues/81/comments","statuses_url":"https://api.github.com/repos/biocore/qiita/statuses/8281d9d30b1b5678a88cf834ca3d5ff3c69d8608","head":{"label":"squirrelo:addjob","ref":"addjob","sha":"8281d9d30b1b5678a88cf834ca3d5ff3c69d8608","user":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?","gravatar_id":"362a74e36cdec089dbb6c8e2d1f6e014","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"repo":{"id":16964694,"name":"qiita","full_name":"squirrelo/qiita","owner":{"login":"squirrelo","id":3079066,"avatar_url":"https://avatars.githubusercontent.com/u/3079066?","gravatar_id":"362a74e36cdec089dbb6c8e2d1f6e014","url":"https://api.github.com/users/squirrelo","html_url":"https://github.com/squirrelo","followers_url":"https://api.github.com/users/squirrelo/followers","following_url":"https://api.github.com/users/squirrelo/following{/other_user}","gists_url":"https://api.github.com/users/squirrelo/gists{/gist_id}","starred_url":"https://api.github.com/users/squirrelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squirrelo/subscriptions","organizations_url":"https://api.github.com/users/squirrelo/orgs","repos_url":"https://api.github.com/users/squirrelo/repos","events_url":"https://api.github.com/users/squirrelo/events{/privacy}","received_events_url":"https://api.github.com/users/squirrelo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/squirrelo/qiita","description":"Qiita - A QIIME databasing effort","fork":true,"url":"https://api.github.com/repos/squirrelo/qiita","forks_url":"https://api.github.com/repos/squirrelo/qiita/forks","keys_url":"https://api.github.com/repos/squirrelo/qiita/keys{/key_id}","collaborators_url":"https://api.github.com/repos/squirrelo/qiita/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/squirrelo/qiita/teams","hooks_url":"https://api.github.com/repos/squirrelo/qiita/hooks","issue_events_url":"https://api.github.com/repos/squirrelo/qiita/issues/events{/number}","events_url":"https://api.github.com/repos/squirrelo/qiita/events","assignees_url":"https://api.github.com/repos/squirrelo/qiita/assignees{/user}","branches_url":"https://api.github.com/repos/squirrelo/qiita/branches{/branch}","tags_url":"https://api.github.com/repos/squirrelo/qiita/tags","blobs_url":"https://api.github.com/repos/squirrelo/qiita/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/squirrelo/qiita/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/squirrelo/qiita/git/refs{/sha}","trees_url":"https://api.github.com/repos/squirrelo/qiita/git/trees{/sha}","statuses_url":"https://api.github.com/repos/squirrelo/qiita/statuses/{sha}","languages_url":"https://api.github.com/repos/squirrelo/qiita/languages","stargazers_url":"https://api.github.com/repos/squirrelo/qiita/stargazers","contributors_url":"https://api.github.com/repos/squirrelo/qiita/contributors","subscribers_url":"https://api.github.com/repos/squirrelo/qiita/subscribers","subscription_url":"https://api.github.com/repos/squirrelo/qiita/subscription","commits_url":"https://api.github.com/repos/squirrelo/qiita/commits{/sha}","git_commits_url":"https://api.github.com/repos/squirrelo/qiita/git/commits{/sha}","comments_url":"https://api.github.com/repos/squirrelo/qiita/comments{/number}","issue_comment_url":"https://api.github.com/repos/squirrelo/qiita/issues/comments/{number}","contents_url":"https://api.github.com/repos/squirrelo/qiita/contents/{+path}","compare_url":"https://api.github.com/repos/squirrelo/qiita/compare/{base}...{head}","merges_url":"https://api.github.com/repos/squirrelo/qiita/merges","archive_url":"https://api.github.com/repos/squirrelo/qiita/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/squirrelo/qiita/downloads","issues_url":"https://api.github.com/repos/squirrelo/qiita/issues{/number}","pulls_url":"https://api.github.com/repos/squirrelo/qiita/pulls{/number}","milestones_url":"https://api.github.com/repos/squirrelo/qiita/milestones{/number}","notifications_url":"https://api.github.com/repos/squirrelo/qiita/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/squirrelo/qiita/labels{/name}","releases_url":"https://api.github.com/repos/squirrelo/qiita/releases{/id}","created_at":"2014-02-18T21:40:27Z","updated_at":"2014-06-13T22:42:12Z","pushed_at":"2014-06-13T22:42:13Z","git_url":"git://github.com/squirrelo/qiita.git","ssh_url":"git@github.com:squirrelo/qiita.git","clone_url":"https://github.com/squirrelo/qiita.git","svn_url":"https://github.com/squirrelo/qiita","homepage":"","size":107198,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"biocore:master","ref":"master","sha":"f80166b732e876e2ed56acf655e321f591c21368","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?","gravatar_id":null,"url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"repo":{"id":13131245,"name":"qiita","full_name":"biocore/qiita","owner":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?","gravatar_id":null,"url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biocore/qiita","description":"Qiita - A QIIME databasing effort","fork":false,"url":"https://api.github.com/repos/biocore/qiita","forks_url":"https://api.github.com/repos/biocore/qiita/forks","keys_url":"https://api.github.com/repos/biocore/qiita/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/qiita/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/qiita/teams","hooks_url":"https://api.github.com/repos/biocore/qiita/hooks","issue_events_url":"https://api.github.com/repos/biocore/qiita/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/qiita/events","assignees_url":"https://api.github.com/repos/biocore/qiita/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/qiita/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/qiita/tags","blobs_url":"https://api.github.com/repos/biocore/qiita/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/qiita/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/qiita/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/qiita/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/qiita/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/qiita/languages","stargazers_url":"https://api.github.com/repos/biocore/qiita/stargazers","contributors_url":"https://api.github.com/repos/biocore/qiita/contributors","subscribers_url":"https://api.github.com/repos/biocore/qiita/subscribers","subscription_url":"https://api.github.com/repos/biocore/qiita/subscription","commits_url":"https://api.github.com/repos/biocore/qiita/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/qiita/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/qiita/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/qiita/issues/comments/{number}","contents_url":"https://api.github.com/repos/biocore/qiita/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/qiita/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/qiita/merges","archive_url":"https://api.github.com/repos/biocore/qiita/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/qiita/downloads","issues_url":"https://api.github.com/repos/biocore/qiita/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/qiita/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/qiita/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/qiita/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/qiita/labels{/name}","releases_url":"https://api.github.com/repos/biocore/qiita/releases{/id}","created_at":"2013-09-26T18:50:43Z","updated_at":"2014-06-12T19:19:14Z","pushed_at":"2014-06-12T19:19:14Z","git_url":"git://github.com/biocore/qiita.git","ssh_url":"git@github.com:biocore/qiita.git","clone_url":"https://github.com/biocore/qiita.git","svn_url":"https://github.com/biocore/qiita","homepage":"","size":107339,"stargazers_count":4,"watchers_count":4,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":8,"mirror_url":null,"open_issues_count":26,"forks":8,"open_issues":26,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/qiita/pulls/81"},"html":{"href":"https://github.com/biocore/qiita/pull/81"},"issue":{"href":"https://api.github.com/repos/biocore/qiita/issues/81"},"comments":{"href":"https://api.github.com/repos/biocore/qiita/issues/81/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/qiita/pulls/81/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/qiita/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/biocore/qiita/pulls/81/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/qiita/statuses/8281d9d30b1b5678a88cf834ca3d5ff3c69d8608"}}}}