{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/qiita/pulls/comments/53811000","id":53811000,"diff_hunk":"@@ -7,10 +7,62 @@\n # -----------------------------------------------------------------------------\n \n from uuid import UUID\n-\n+from datetime import datetime\n+from subprocess import Popen, PIPE\n+from multiprocessing import Process\n+from os.path import join\n+from itertools import chain\n+from collections import defaultdict\n+from json import dumps\n+\n+from future.utils import viewitems, viewvalues\n+import networkx as nx\n+\n+from qiita_core.qiita_settings import qiita_config\n import qiita_db as qdb\n \n \n+def _system_call(cmd):\n+    \"\"\"Call cmd and return (stdout, stderr, return_value)","path":"qiita_db/processing_job.py","position":21,"original_position":21,"commit_id":"d78be983177cceaaac01990e6b229cccb3f51fcc","original_commit_id":"d78be983177cceaaac01990e6b229cccb3f51fcc","user":{"login":"josenavas","id":2501478,"avatar_url":"https://avatars.githubusercontent.com/u/2501478?v=3","gravatar_id":"","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":"Done","created_at":"2016-02-23T16:56:18Z","updated_at":"2016-02-23T16:56:18Z","html_url":"https://github.com/biocore/qiita/pull/1641#discussion_r53811000","pull_request_url":"https://api.github.com/repos/biocore/qiita/pulls/1641","_links":{"self":{"href":"https://api.github.com/repos/biocore/qiita/pulls/comments/53811000"},"html":{"href":"https://github.com/biocore/qiita/pull/1641#discussion_r53811000"},"pull_request":{"href":"https://api.github.com/repos/biocore/qiita/pulls/1641"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/qiita/pulls/1641","id":58999242,"html_url":"https://github.com/biocore/qiita/pull/1641","diff_url":"https://github.com/biocore/qiita/pull/1641.diff","patch_url":"https://github.com/biocore/qiita/pull/1641.patch","issue_url":"https://api.github.com/repos/biocore/qiita/issues/1641","number":1641,"state":"open","locked":false,"title":"Workflow object","user":{"login":"josenavas","id":2501478,"avatar_url":"https://avatars.githubusercontent.com/u/2501478?v=3","gravatar_id":"","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":"This PR adds the necessary DB structure to support default workflows from plugins and user-generated workflows.\r\n\r\nOverview of changes in this PR:\r\n- Structures added to the DB to support default workflows from plugins.\r\n- DefaultWorkflow object (and aux classes) added to access the default workflows.\r\n- Small table added to keep track of the user-generated workflow\r\n- _Currently not implemented (will be in tomorrow):_ ProcessingWorkflow object to access the user defined workflows.\r\n- In order to implement the above class, we need to keep track of which artifacts have been generated from which ProcessingJob. This adds another table to the database and adds some work on job completion. This triggered changes in the ProcessingJob object, so more work is kept internally to the object rather than outside of the object, forcing to make changes in the restAPI handlers, restAPI interface and plugins (to meet the new requirements of the restAPI).","created_at":"2016-02-11T07:40:38Z","updated_at":"2016-02-23T16:56:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ffc40b11beb961c562666b30af7fcc38148669bd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/qiita/pulls/1641/commits","review_comments_url":"https://api.github.com/repos/biocore/qiita/pulls/1641/comments","review_comment_url":"https://api.github.com/repos/biocore/qiita/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/qiita/issues/1641/comments","statuses_url":"https://api.github.com/repos/biocore/qiita/statuses/d78be983177cceaaac01990e6b229cccb3f51fcc","head":{"label":"josenavas:workflow-object","ref":"workflow-object","sha":"d78be983177cceaaac01990e6b229cccb3f51fcc","user":{"login":"josenavas","id":2501478,"avatar_url":"https://avatars.githubusercontent.com/u/2501478?v=3","gravatar_id":"","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},"repo":{"id":13527677,"name":"QiiTa","full_name":"josenavas/QiiTa","owner":{"login":"josenavas","id":2501478,"avatar_url":"https://avatars.githubusercontent.com/u/2501478?v=3","gravatar_id":"","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},"private":false,"html_url":"https://github.com/josenavas/QiiTa","description":"QiiTa databasing effort","fork":true,"url":"https://api.github.com/repos/josenavas/QiiTa","forks_url":"https://api.github.com/repos/josenavas/QiiTa/forks","keys_url":"https://api.github.com/repos/josenavas/QiiTa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/josenavas/QiiTa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/josenavas/QiiTa/teams","hooks_url":"https://api.github.com/repos/josenavas/QiiTa/hooks","issue_events_url":"https://api.github.com/repos/josenavas/QiiTa/issues/events{/number}","events_url":"https://api.github.com/repos/josenavas/QiiTa/events","assignees_url":"https://api.github.com/repos/josenavas/QiiTa/assignees{/user}","branches_url":"https://api.github.com/repos/josenavas/QiiTa/branches{/branch}","tags_url":"https://api.github.com/repos/josenavas/QiiTa/tags","blobs_url":"https://api.github.com/repos/josenavas/QiiTa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/josenavas/QiiTa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/josenavas/QiiTa/git/refs{/sha}","trees_url":"https://api.github.com/repos/josenavas/QiiTa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/josenavas/QiiTa/statuses/{sha}","languages_url":"https://api.github.com/repos/josenavas/QiiTa/languages","stargazers_url":"https://api.github.com/repos/josenavas/QiiTa/stargazers","contributors_url":"https://api.github.com/repos/josenavas/QiiTa/contributors","subscribers_url":"https://api.github.com/repos/josenavas/QiiTa/subscribers","subscription_url":"https://api.github.com/repos/josenavas/QiiTa/subscription","commits_url":"https://api.github.com/repos/josenavas/QiiTa/commits{/sha}","git_commits_url":"https://api.github.com/repos/josenavas/QiiTa/git/commits{/sha}","comments_url":"https://api.github.com/repos/josenavas/QiiTa/comments{/number}","issue_comment_url":"https://api.github.com/repos/josenavas/QiiTa/issues/comments{/number}","contents_url":"https://api.github.com/repos/josenavas/QiiTa/contents/{+path}","compare_url":"https://api.github.com/repos/josenavas/QiiTa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/josenavas/QiiTa/merges","archive_url":"https://api.github.com/repos/josenavas/QiiTa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/josenavas/QiiTa/downloads","issues_url":"https://api.github.com/repos/josenavas/QiiTa/issues{/number}","pulls_url":"https://api.github.com/repos/josenavas/QiiTa/pulls{/number}","milestones_url":"https://api.github.com/repos/josenavas/QiiTa/milestones{/number}","notifications_url":"https://api.github.com/repos/josenavas/QiiTa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/josenavas/QiiTa/labels{/name}","releases_url":"https://api.github.com/repos/josenavas/QiiTa/releases{/id}","deployments_url":"https://api.github.com/repos/josenavas/QiiTa/deployments","created_at":"2013-10-12T19:29:32Z","updated_at":"2015-05-05T22:50:05Z","pushed_at":"2016-02-23T16:49:43Z","git_url":"git://github.com/josenavas/QiiTa.git","ssh_url":"git@github.com:josenavas/QiiTa.git","clone_url":"https://github.com/josenavas/QiiTa.git","svn_url":"https://github.com/josenavas/QiiTa","homepage":null,"size":129158,"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":"biocore:artifact-study-pages","ref":"artifact-study-pages","sha":"a96603365f84d1f59935b2178150ec0037f1143c","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","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?v=3","gravatar_id":"","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}","deployments_url":"https://api.github.com/repos/biocore/qiita/deployments","created_at":"2013-09-26T18:50:43Z","updated_at":"2016-01-31T22:47:34Z","pushed_at":"2016-02-23T16:49:45Z","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":"http://qiita.microbio.me","size":129877,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"open_issues_count":323,"forks":27,"open_issues":323,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/qiita/pulls/1641"},"html":{"href":"https://github.com/biocore/qiita/pull/1641"},"issue":{"href":"https://api.github.com/repos/biocore/qiita/issues/1641"},"comments":{"href":"https://api.github.com/repos/biocore/qiita/issues/1641/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/qiita/pulls/1641/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/qiita/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/qiita/pulls/1641/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/qiita/statuses/d78be983177cceaaac01990e6b229cccb3f51fcc"}}}}