{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/comments/232401456","pull_request_review_id":173600875,"id":232401456,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjQwMTQ1Ng==","diff_hunk":"@@ -232,3 +238,95 @@ def validate_cromwell_label(label_object):\n \n     if err_msg != '':\n         raise ValueError(err_msg)\n+\n+\n+def prepare_workflow_manifest(wdl_file, inputs_files=None, options_file=None, dependencies=None, label_file=None,\n+                              collection_name=None, on_hold=False):\n+    \"\"\"Prepare the submission manifest for a workflow submission.\n+\n+    Args:\n+        wdl_file (Union[str, io.BytesIO]): The workflow source file to submit for execution. Could be either the path\n+            to the file (str) or the file content in io.BytesIO.\n+        inputs_files (Optional[Union[List[Union[str, io.BytesIO]], str, io.BytesIO]]): The input data in JSON\n+            format. Could be either the path to the file (str) or the file content in io.BytesIO. This could also\n+            be a list of unlimited input file paths/contents, each of them should have a type of\n+            Union[str, io.BytesIO]. (default None)\n+        options_file (Optional[Union[str, io.BytesIO]]): The Cromwell options file for workflows. Could be either\n+        the path to the file (str) or the file content in io.BytesIO. (default None)\n+        dependencies (Optional[Union[str, List[str], io.BytesIO]]): Workflow dependency files. Could be the path to\n+            the zipped file (str) containing dependencies, a list of paths(List[str]) to all dependency files to be\n+            zipped or a zipped file in io.BytesIO. (default None)\n+        label_file(Optional[Union[str, _io.BytesIO]]): JSON file containing a collection of key/value pairs for workflow","path":"cromwell_tools/utilities.py","position":120,"original_position":120,"commit_id":"860b7c87eaac1e796456b2249b04d7b72ae598c8","original_commit_id":"860b7c87eaac1e796456b2249b04d7b72ae598c8","user":{"login":"rexwangcc","id":14366016,"node_id":"MDQ6VXNlcjE0MzY2MDE2","avatar_url":"https://avatars2.githubusercontent.com/u/14366016?v=4","gravatar_id":"","url":"https://api.github.com/users/rexwangcc","html_url":"https://github.com/rexwangcc","followers_url":"https://api.github.com/users/rexwangcc/followers","following_url":"https://api.github.com/users/rexwangcc/following{/other_user}","gists_url":"https://api.github.com/users/rexwangcc/gists{/gist_id}","starred_url":"https://api.github.com/users/rexwangcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rexwangcc/subscriptions","organizations_url":"https://api.github.com/users/rexwangcc/orgs","repos_url":"https://api.github.com/users/rexwangcc/repos","events_url":"https://api.github.com/users/rexwangcc/events{/privacy}","received_events_url":"https://api.github.com/users/rexwangcc/received_events","type":"User","site_admin":false},"body":" No except that I somehow wanted to keep the signature closer to the Cromwell endpoint... I think what we can do is let the user pass them in directly but do some magic conversion with the CLI (e.g. `io.BytesIO(json.dumps(kwargs))`), that way we don't make this method too complicated, what do you think?","created_at":"2018-11-09T21:38:10Z","updated_at":"2018-11-09T21:38:10Z","html_url":"https://github.com/broadinstitute/cromwell-tools/pull/49#discussion_r232401456","pull_request_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/49","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/comments/232401456"},"html":{"href":"https://github.com/broadinstitute/cromwell-tools/pull/49#discussion_r232401456"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/49"}},"in_reply_to_id":232019497},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/49","id":228386122,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4Mzg2MTIy","html_url":"https://github.com/broadinstitute/cromwell-tools/pull/49","diff_url":"https://github.com/broadinstitute/cromwell-tools/pull/49.diff","patch_url":"https://github.com/broadinstitute/cromwell-tools/pull/49.patch","issue_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/issues/49","number":49,"state":"open","locked":false,"title":"Improve code structure","user":{"login":"rexwangcc","id":14366016,"node_id":"MDQ6VXNlcjE0MzY2MDE2","avatar_url":"https://avatars2.githubusercontent.com/u/14366016?v=4","gravatar_id":"","url":"https://api.github.com/users/rexwangcc","html_url":"https://github.com/rexwangcc","followers_url":"https://api.github.com/users/rexwangcc/followers","following_url":"https://api.github.com/users/rexwangcc/following{/other_user}","gists_url":"https://api.github.com/users/rexwangcc/gists{/gist_id}","starred_url":"https://api.github.com/users/rexwangcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rexwangcc/subscriptions","organizations_url":"https://api.github.com/users/rexwangcc/orgs","repos_url":"https://api.github.com/users/rexwangcc/repos","events_url":"https://api.github.com/users/rexwangcc/events{/privacy}","received_events_url":"https://api.github.com/users/rexwangcc/received_events","type":"User","site_admin":false},"body":"This PR focused on improving the `/submit` API and it's corresponding utility methods. It mainly did:\r\n- Make `/submit` support file path in `str`, in addition, to file contents in `io.BytesIO`.\r\n- Make `/submit` support up to X input files instead of just 2 of them.\r\n- Decouple the manifest preparation from the `/submit` API and add sufficient test cases to it.\r\n- Add user-friendly warnings to `/submit` and `/query`.\r\n\r\nPlease ensure the following when opening a PR:\r\n- [x] Added or updated tests\r\n- [ ] Updated documentation\r\n- [ ] Applied style guidelines\r\n- [ ] Considered generalizability beyond our own use case\r\n","created_at":"2018-11-05T15:15:25Z","updated_at":"2018-11-09T21:38:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"54cfb3c18f47752e822f6215c2a3242f28dbf2c7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"chrisfarnham","id":680287,"node_id":"MDQ6VXNlcjY4MDI4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/680287?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisfarnham","html_url":"https://github.com/chrisfarnham","followers_url":"https://api.github.com/users/chrisfarnham/followers","following_url":"https://api.github.com/users/chrisfarnham/following{/other_user}","gists_url":"https://api.github.com/users/chrisfarnham/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisfarnham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisfarnham/subscriptions","organizations_url":"https://api.github.com/users/chrisfarnham/orgs","repos_url":"https://api.github.com/users/chrisfarnham/repos","events_url":"https://api.github.com/users/chrisfarnham/events{/privacy}","received_events_url":"https://api.github.com/users/chrisfarnham/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/49/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/49/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/issues/49/comments","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/statuses/860b7c87eaac1e796456b2249b04d7b72ae598c8","head":{"label":"broadinstitute:cw-improve-code-structure","ref":"cw-improve-code-structure","sha":"860b7c87eaac1e796456b2249b04d7b72ae598c8","user":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":106469492,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY0Njk0OTI=","name":"cromwell-tools","full_name":"broadinstitute/cromwell-tools","private":false,"owner":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/broadinstitute/cromwell-tools","description":"A collection of Python APIs and accessory scripts for interacting with the Cromwell","fork":false,"url":"https://api.github.com/repos/broadinstitute/cromwell-tools","forks_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/forks","keys_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/teams","hooks_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/events","assignees_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/tags","blobs_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/subscription","commits_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/merges","archive_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/downloads","issues_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/deployments","created_at":"2017-10-10T20:46:24Z","updated_at":"2018-11-07T01:02:40Z","pushed_at":"2018-11-09T19:35:56Z","git_url":"git://github.com/broadinstitute/cromwell-tools.git","ssh_url":"git@github.com:broadinstitute/cromwell-tools.git","clone_url":"https://github.com/broadinstitute/cromwell-tools.git","svn_url":"https://github.com/broadinstitute/cromwell-tools","homepage":"https://cromwell-tools.readthedocs.io","size":358,"stargazers_count":8,"watchers_count":8,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":3,"open_issues":13,"watchers":8,"default_branch":"master"}},"base":{"label":"broadinstitute:master","ref":"master","sha":"9d8dcb55b83d8c75e55c3116b53a73ca14cdb734","user":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":106469492,"node_id":"MDEwOlJlcG9zaXRvcnkxMDY0Njk0OTI=","name":"cromwell-tools","full_name":"broadinstitute/cromwell-tools","private":false,"owner":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/broadinstitute/cromwell-tools","description":"A collection of Python APIs and accessory scripts for interacting with the Cromwell","fork":false,"url":"https://api.github.com/repos/broadinstitute/cromwell-tools","forks_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/forks","keys_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/teams","hooks_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/events","assignees_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/tags","blobs_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/subscription","commits_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/merges","archive_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/downloads","issues_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/cromwell-tools/deployments","created_at":"2017-10-10T20:46:24Z","updated_at":"2018-11-07T01:02:40Z","pushed_at":"2018-11-09T19:35:56Z","git_url":"git://github.com/broadinstitute/cromwell-tools.git","ssh_url":"git@github.com:broadinstitute/cromwell-tools.git","clone_url":"https://github.com/broadinstitute/cromwell-tools.git","svn_url":"https://github.com/broadinstitute/cromwell-tools","homepage":"https://cromwell-tools.readthedocs.io","size":358,"stargazers_count":8,"watchers_count":8,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":3,"open_issues":13,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/49"},"html":{"href":"https://github.com/broadinstitute/cromwell-tools/pull/49"},"issue":{"href":"https://api.github.com/repos/broadinstitute/cromwell-tools/issues/49"},"comments":{"href":"https://api.github.com/repos/broadinstitute/cromwell-tools/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/cromwell-tools/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/cromwell-tools/statuses/860b7c87eaac1e796456b2249b04d7b72ae598c8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rexwangcc"}}