{"action":"created","comment":{"url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/comments/53222643","id":53222643,"diff_hunk":"@@ -187,6 +191,43 @@ def fileExists(self, jobStoreFileID):\n             raise NoSuchFileException(\"Path %s is not a file in the jobStore\" % jobStoreFileID)\n         return True\n \n+    def importFile(self, sourceUrl, jobStoreID=None):\n+        url = urlparse.urlparse(sourceUrl)\n+        if url.scheme.lower() == 'file':\n+            localFilePath = url.netloc + url.path\n+\n+            fd, absPath = self._getTempFile(jobStoreID)\n+            shutil.copyfile(localFilePath, absPath)\n+            os.close(fd)\n+\n+            JobStoreFileId = jobStoreID or self._getRelativePath(absPath)\n+            self._assertFileMatchesJobStoreFileID(JobStoreFileId, localFilePath)\n+            return JobStoreFileId","path":"src/toil/jobStores/fileJobStore.py","position":49,"original_position":49,"commit_id":"52c189a4d61abf977981c174b49dee4de236463d","original_commit_id":"52c189a4d61abf977981c174b49dee4de236463d","user":{"login":"cket","id":10136261,"avatar_url":"https://avatars.githubusercontent.com/u/10136261?v=3","gravatar_id":"","url":"https://api.github.com/users/cket","html_url":"https://github.com/cket","followers_url":"https://api.github.com/users/cket/followers","following_url":"https://api.github.com/users/cket/following{/other_user}","gists_url":"https://api.github.com/users/cket/gists{/gist_id}","starred_url":"https://api.github.com/users/cket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cket/subscriptions","organizations_url":"https://api.github.com/users/cket/orgs","repos_url":"https://api.github.com/users/cket/repos","events_url":"https://api.github.com/users/cket/events{/privacy}","received_events_url":"https://api.github.com/users/cket/received_events","type":"User","site_admin":false},"body":"Should be lower case 'j' and upper case 'D' (jobStoreFileID vs. JobStoreFileId)","created_at":"2016-02-17T20:03:02Z","updated_at":"2016-02-17T20:03:02Z","html_url":"https://github.com/BD2KGenomics/toil/pull/659#discussion_r53222643","pull_request_url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/659","_links":{"self":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/comments/53222643"},"html":{"href":"https://github.com/BD2KGenomics/toil/pull/659#discussion_r53222643"},"pull_request":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/659"}}},"pull_request":{"url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/659","id":57261756,"html_url":"https://github.com/BD2KGenomics/toil/pull/659","diff_url":"https://github.com/BD2KGenomics/toil/pull/659.diff","patch_url":"https://github.com/BD2KGenomics/toil/pull/659.patch","issue_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/659","number":659,"state":"open","locked":false,"title":"Import and Export functions added to AWS JobStore and FileJobStore (Resolves #618)","user":{"login":"JakeNarkizian","id":10471159,"avatar_url":"https://avatars.githubusercontent.com/u/10471159?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeNarkizian","html_url":"https://github.com/JakeNarkizian","followers_url":"https://api.github.com/users/JakeNarkizian/followers","following_url":"https://api.github.com/users/JakeNarkizian/following{/other_user}","gists_url":"https://api.github.com/users/JakeNarkizian/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeNarkizian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeNarkizian/subscriptions","organizations_url":"https://api.github.com/users/JakeNarkizian/orgs","repos_url":"https://api.github.com/users/JakeNarkizian/repos","events_url":"https://api.github.com/users/JakeNarkizian/events{/privacy}","received_events_url":"https://api.github.com/users/JakeNarkizian/received_events","type":"User","site_admin":false},"body":"These methods are exposed to the user in job.FileStore. The test will fail because the multipart copy function has not beed added.","created_at":"2016-01-26T19:48:41Z","updated_at":"2016-02-17T20:03:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1eb843bb26a088bb9a8fbba59f5b000ab4b8e38f","assignee":{"login":"cket","id":10136261,"avatar_url":"https://avatars.githubusercontent.com/u/10136261?v=3","gravatar_id":"","url":"https://api.github.com/users/cket","html_url":"https://github.com/cket","followers_url":"https://api.github.com/users/cket/followers","following_url":"https://api.github.com/users/cket/following{/other_user}","gists_url":"https://api.github.com/users/cket/gists{/gist_id}","starred_url":"https://api.github.com/users/cket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cket/subscriptions","organizations_url":"https://api.github.com/users/cket/orgs","repos_url":"https://api.github.com/users/cket/repos","events_url":"https://api.github.com/users/cket/events{/privacy}","received_events_url":"https://api.github.com/users/cket/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/659/commits","review_comments_url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/659/comments","review_comment_url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/659/comments","statuses_url":"https://api.github.com/repos/BD2KGenomics/toil/statuses/52c189a4d61abf977981c174b49dee4de236463d","head":{"label":"BD2KGenomics:issues/618-add-importFile-exportFile-to-jobStore","ref":"issues/618-add-importFile-exportFile-to-jobStore","sha":"52c189a4d61abf977981c174b49dee4de236463d","user":{"login":"BD2KGenomics","id":8701293,"avatar_url":"https://avatars.githubusercontent.com/u/8701293?v=3","gravatar_id":"","url":"https://api.github.com/users/BD2KGenomics","html_url":"https://github.com/BD2KGenomics","followers_url":"https://api.github.com/users/BD2KGenomics/followers","following_url":"https://api.github.com/users/BD2KGenomics/following{/other_user}","gists_url":"https://api.github.com/users/BD2KGenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/BD2KGenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BD2KGenomics/subscriptions","organizations_url":"https://api.github.com/users/BD2KGenomics/orgs","repos_url":"https://api.github.com/users/BD2KGenomics/repos","events_url":"https://api.github.com/users/BD2KGenomics/events{/privacy}","received_events_url":"https://api.github.com/users/BD2KGenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":33148320,"name":"toil","full_name":"BD2KGenomics/toil","owner":{"login":"BD2KGenomics","id":8701293,"avatar_url":"https://avatars.githubusercontent.com/u/8701293?v=3","gravatar_id":"","url":"https://api.github.com/users/BD2KGenomics","html_url":"https://github.com/BD2KGenomics","followers_url":"https://api.github.com/users/BD2KGenomics/followers","following_url":"https://api.github.com/users/BD2KGenomics/following{/other_user}","gists_url":"https://api.github.com/users/BD2KGenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/BD2KGenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BD2KGenomics/subscriptions","organizations_url":"https://api.github.com/users/BD2KGenomics/orgs","repos_url":"https://api.github.com/users/BD2KGenomics/repos","events_url":"https://api.github.com/users/BD2KGenomics/events{/privacy}","received_events_url":"https://api.github.com/users/BD2KGenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BD2KGenomics/toil","description":"Toil is a scalable, efficient, cross-platform pipeline management system, written entirely in Python, and designed around the principles of functional programming.","fork":false,"url":"https://api.github.com/repos/BD2KGenomics/toil","forks_url":"https://api.github.com/repos/BD2KGenomics/toil/forks","keys_url":"https://api.github.com/repos/BD2KGenomics/toil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BD2KGenomics/toil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BD2KGenomics/toil/teams","hooks_url":"https://api.github.com/repos/BD2KGenomics/toil/hooks","issue_events_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/events{/number}","events_url":"https://api.github.com/repos/BD2KGenomics/toil/events","assignees_url":"https://api.github.com/repos/BD2KGenomics/toil/assignees{/user}","branches_url":"https://api.github.com/repos/BD2KGenomics/toil/branches{/branch}","tags_url":"https://api.github.com/repos/BD2KGenomics/toil/tags","blobs_url":"https://api.github.com/repos/BD2KGenomics/toil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BD2KGenomics/toil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BD2KGenomics/toil/git/refs{/sha}","trees_url":"https://api.github.com/repos/BD2KGenomics/toil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BD2KGenomics/toil/statuses/{sha}","languages_url":"https://api.github.com/repos/BD2KGenomics/toil/languages","stargazers_url":"https://api.github.com/repos/BD2KGenomics/toil/stargazers","contributors_url":"https://api.github.com/repos/BD2KGenomics/toil/contributors","subscribers_url":"https://api.github.com/repos/BD2KGenomics/toil/subscribers","subscription_url":"https://api.github.com/repos/BD2KGenomics/toil/subscription","commits_url":"https://api.github.com/repos/BD2KGenomics/toil/commits{/sha}","git_commits_url":"https://api.github.com/repos/BD2KGenomics/toil/git/commits{/sha}","comments_url":"https://api.github.com/repos/BD2KGenomics/toil/comments{/number}","issue_comment_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/comments{/number}","contents_url":"https://api.github.com/repos/BD2KGenomics/toil/contents/{+path}","compare_url":"https://api.github.com/repos/BD2KGenomics/toil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BD2KGenomics/toil/merges","archive_url":"https://api.github.com/repos/BD2KGenomics/toil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BD2KGenomics/toil/downloads","issues_url":"https://api.github.com/repos/BD2KGenomics/toil/issues{/number}","pulls_url":"https://api.github.com/repos/BD2KGenomics/toil/pulls{/number}","milestones_url":"https://api.github.com/repos/BD2KGenomics/toil/milestones{/number}","notifications_url":"https://api.github.com/repos/BD2KGenomics/toil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BD2KGenomics/toil/labels{/name}","releases_url":"https://api.github.com/repos/BD2KGenomics/toil/releases{/id}","deployments_url":"https://api.github.com/repos/BD2KGenomics/toil/deployments","created_at":"2015-03-30T21:08:58Z","updated_at":"2016-02-10T15:12:34Z","pushed_at":"2016-02-17T08:43:13Z","git_url":"git://github.com/BD2KGenomics/toil.git","ssh_url":"git@github.com:BD2KGenomics/toil.git","clone_url":"https://github.com/BD2KGenomics/toil.git","svn_url":"https://github.com/BD2KGenomics/toil","homepage":"","size":5254,"stargazers_count":23,"watchers_count":23,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":125,"forks":15,"open_issues":125,"watchers":23,"default_branch":"master"}},"base":{"label":"BD2KGenomics:master","ref":"master","sha":"e2d2b04cf8d1cbf53a51e20db197e63048d726d7","user":{"login":"BD2KGenomics","id":8701293,"avatar_url":"https://avatars.githubusercontent.com/u/8701293?v=3","gravatar_id":"","url":"https://api.github.com/users/BD2KGenomics","html_url":"https://github.com/BD2KGenomics","followers_url":"https://api.github.com/users/BD2KGenomics/followers","following_url":"https://api.github.com/users/BD2KGenomics/following{/other_user}","gists_url":"https://api.github.com/users/BD2KGenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/BD2KGenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BD2KGenomics/subscriptions","organizations_url":"https://api.github.com/users/BD2KGenomics/orgs","repos_url":"https://api.github.com/users/BD2KGenomics/repos","events_url":"https://api.github.com/users/BD2KGenomics/events{/privacy}","received_events_url":"https://api.github.com/users/BD2KGenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":33148320,"name":"toil","full_name":"BD2KGenomics/toil","owner":{"login":"BD2KGenomics","id":8701293,"avatar_url":"https://avatars.githubusercontent.com/u/8701293?v=3","gravatar_id":"","url":"https://api.github.com/users/BD2KGenomics","html_url":"https://github.com/BD2KGenomics","followers_url":"https://api.github.com/users/BD2KGenomics/followers","following_url":"https://api.github.com/users/BD2KGenomics/following{/other_user}","gists_url":"https://api.github.com/users/BD2KGenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/BD2KGenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BD2KGenomics/subscriptions","organizations_url":"https://api.github.com/users/BD2KGenomics/orgs","repos_url":"https://api.github.com/users/BD2KGenomics/repos","events_url":"https://api.github.com/users/BD2KGenomics/events{/privacy}","received_events_url":"https://api.github.com/users/BD2KGenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BD2KGenomics/toil","description":"Toil is a scalable, efficient, cross-platform pipeline management system, written entirely in Python, and designed around the principles of functional programming.","fork":false,"url":"https://api.github.com/repos/BD2KGenomics/toil","forks_url":"https://api.github.com/repos/BD2KGenomics/toil/forks","keys_url":"https://api.github.com/repos/BD2KGenomics/toil/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BD2KGenomics/toil/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BD2KGenomics/toil/teams","hooks_url":"https://api.github.com/repos/BD2KGenomics/toil/hooks","issue_events_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/events{/number}","events_url":"https://api.github.com/repos/BD2KGenomics/toil/events","assignees_url":"https://api.github.com/repos/BD2KGenomics/toil/assignees{/user}","branches_url":"https://api.github.com/repos/BD2KGenomics/toil/branches{/branch}","tags_url":"https://api.github.com/repos/BD2KGenomics/toil/tags","blobs_url":"https://api.github.com/repos/BD2KGenomics/toil/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BD2KGenomics/toil/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BD2KGenomics/toil/git/refs{/sha}","trees_url":"https://api.github.com/repos/BD2KGenomics/toil/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BD2KGenomics/toil/statuses/{sha}","languages_url":"https://api.github.com/repos/BD2KGenomics/toil/languages","stargazers_url":"https://api.github.com/repos/BD2KGenomics/toil/stargazers","contributors_url":"https://api.github.com/repos/BD2KGenomics/toil/contributors","subscribers_url":"https://api.github.com/repos/BD2KGenomics/toil/subscribers","subscription_url":"https://api.github.com/repos/BD2KGenomics/toil/subscription","commits_url":"https://api.github.com/repos/BD2KGenomics/toil/commits{/sha}","git_commits_url":"https://api.github.com/repos/BD2KGenomics/toil/git/commits{/sha}","comments_url":"https://api.github.com/repos/BD2KGenomics/toil/comments{/number}","issue_comment_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/comments{/number}","contents_url":"https://api.github.com/repos/BD2KGenomics/toil/contents/{+path}","compare_url":"https://api.github.com/repos/BD2KGenomics/toil/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BD2KGenomics/toil/merges","archive_url":"https://api.github.com/repos/BD2KGenomics/toil/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BD2KGenomics/toil/downloads","issues_url":"https://api.github.com/repos/BD2KGenomics/toil/issues{/number}","pulls_url":"https://api.github.com/repos/BD2KGenomics/toil/pulls{/number}","milestones_url":"https://api.github.com/repos/BD2KGenomics/toil/milestones{/number}","notifications_url":"https://api.github.com/repos/BD2KGenomics/toil/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BD2KGenomics/toil/labels{/name}","releases_url":"https://api.github.com/repos/BD2KGenomics/toil/releases{/id}","deployments_url":"https://api.github.com/repos/BD2KGenomics/toil/deployments","created_at":"2015-03-30T21:08:58Z","updated_at":"2016-02-10T15:12:34Z","pushed_at":"2016-02-17T08:43:13Z","git_url":"git://github.com/BD2KGenomics/toil.git","ssh_url":"git@github.com:BD2KGenomics/toil.git","clone_url":"https://github.com/BD2KGenomics/toil.git","svn_url":"https://github.com/BD2KGenomics/toil","homepage":"","size":5254,"stargazers_count":23,"watchers_count":23,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":125,"forks":15,"open_issues":125,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/659"},"html":{"href":"https://github.com/BD2KGenomics/toil/pull/659"},"issue":{"href":"https://api.github.com/repos/BD2KGenomics/toil/issues/659"},"comments":{"href":"https://api.github.com/repos/BD2KGenomics/toil/issues/659/comments"},"review_comments":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/659/comments"},"review_comment":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/659/commits"},"statuses":{"href":"https://api.github.com/repos/BD2KGenomics/toil/statuses/52c189a4d61abf977981c174b49dee4de236463d"}}}}