{"action":"created","comment":{"url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/comments/69178299","id":69178299,"diff_hunk":"@@ -149,22 +151,44 @@ class AWSJobStore(AbstractJobStore):\n     partitioned into chunks of 1024 bytes and each chunk is stored as a an attribute of the SDB\n     item representing the job. UUIDs are used to identify jobs and files.\n     \"\"\"\n+    class Locator(namedtuple('Locator', ('region', 'namePrefix')), AbstractJobStore.Locator):\n+        \"\"\"\n+        Parses a job store locator string into an AWS locator object with the following attributes:\n+            * region: The AWS region of the job store as a string.\n+            * namePrefix: The name prefix of the job store as a string.\n \n-    @classmethod\n-    def loadOrCreateJobStore(cls, locator, config=None, **kwargs):\n-        region, namePrefix = locator.split(':')\n-        if not cls.bucketNameRe.match(namePrefix):\n-            raise ValueError(\"Invalid name prefix '%s'. Name prefixes must contain only digits, \"\n-                             \"hyphens or lower-case letters and must not start or end in a \"\n-                             \"hyphen.\" % namePrefix)\n-        # Reserve 13 for separator and suffix\n-        if len(namePrefix) > cls.maxBucketNameLen - cls.maxNameLen - len(cls.nameSeparator):\n-            raise ValueError(\"Invalid name prefix '%s'. Name prefixes may not be longer than 50 \"\n-                             \"characters.\" % namePrefix)\n-        if '--' in namePrefix:\n-            raise ValueError(\"Invalid name prefix '%s'. Name prefixes may not contain \"\n-                             \"%s.\" % (namePrefix, cls.nameSeparator))\n-        return cls(region, namePrefix, config=config, **kwargs)\n+        The syntax for an AWS job store locator string is as follows:\n+            aws:<AWS region>:<name prefix>\n+\n+        For name prefix syntax see exception messages in parse method below.\n+        \"\"\"\n+        @property\n+        def jobStore(self):\n+            return AWSJobStore\n+\n+        @classmethod\n+        def parse(cls, l):\n+            assert not isinstance(l, str)\n+            if len(l) != 2:\n+                raise ValueError(\"The job store locator '%s' is invalid.\" % ':'.join(l))\n+            elif not AWSJobStore.bucketNameRe.match(l[1]):\n+                raise ValueError(\"Invalid prefix '%s'. Name prefixes must contain only digits, \"\n+                                 \"hyphens or lower-case letters and must not start or end in a \"\n+                                 \"hyphen.\" % l[1])\n+            elif (len(l[1]) >\n+                  AWSJobStore.maxBucketNameLen -","path":"src/toil/jobStores/aws/jobStore.py","position":64,"original_position":64,"commit_id":"19665236d022291a98d4c9270c8a515a91272322","original_commit_id":"19665236d022291a98d4c9270c8a515a91272322","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":"The constants unfortunately are used atleast once outside of the locator class, we would shorten it here but extend it somewhere else (mostly in ```_getOrCreateBucket``` and ```_qualify```). Do you have a preference?","created_at":"2016-06-30T17:48:52Z","updated_at":"2016-06-30T17:48:52Z","html_url":"https://github.com/BD2KGenomics/toil/pull/916#discussion_r69178299","pull_request_url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/916","_links":{"self":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/comments/69178299"},"html":{"href":"https://github.com/BD2KGenomics/toil/pull/916#discussion_r69178299"},"pull_request":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/916"}}},"pull_request":{"url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/916","id":72102637,"html_url":"https://github.com/BD2KGenomics/toil/pull/916","diff_url":"https://github.com/BD2KGenomics/toil/pull/916.diff","patch_url":"https://github.com/BD2KGenomics/toil/pull/916.patch","issue_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/916","number":916,"state":"open","locked":false,"title":"Added robust job store cleaning (resolves #785, resolves #789, resolves #834, resolves #869, resolves #904, resolves #1011)","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":"Continued from #835 and #900 \r\n\r\n\r\n\r\n","created_at":"2016-05-31T23:37:46Z","updated_at":"2016-06-30T17:48:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fba40342b307cd16253170e05afc198de7667e1b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/916/commits","review_comments_url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/916/comments","review_comment_url":"https://api.github.com/repos/BD2KGenomics/toil/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BD2KGenomics/toil/issues/916/comments","statuses_url":"https://api.github.com/repos/BD2KGenomics/toil/statuses/19665236d022291a98d4c9270c8a515a91272322","head":{"label":"BD2KGenomics:issues/785-789-834-864-869-904-robust-clean","ref":"issues/785-789-834-864-869-904-robust-clean","sha":"19665236d022291a98d4c9270c8a515a91272322","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":"A scalable, efficient, cross-platform and easy-to-use workflow engine in pure Python","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-06-29T18:47:41Z","pushed_at":"2016-06-30T17:46:36Z","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":6759,"stargazers_count":191,"watchers_count":191,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":146,"forks":34,"open_issues":146,"watchers":191,"default_branch":"master"}},"base":{"label":"BD2KGenomics:master","ref":"master","sha":"e4289dd3dc1033d1e923947dfce45836d6fcdb4d","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":"A scalable, efficient, cross-platform and easy-to-use workflow engine in pure Python","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-06-29T18:47:41Z","pushed_at":"2016-06-30T17:46:36Z","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":6759,"stargazers_count":191,"watchers_count":191,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":146,"forks":34,"open_issues":146,"watchers":191,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/916"},"html":{"href":"https://github.com/BD2KGenomics/toil/pull/916"},"issue":{"href":"https://api.github.com/repos/BD2KGenomics/toil/issues/916"},"comments":{"href":"https://api.github.com/repos/BD2KGenomics/toil/issues/916/comments"},"review_comments":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/916/comments"},"review_comment":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BD2KGenomics/toil/pulls/916/commits"},"statuses":{"href":"https://api.github.com/repos/BD2KGenomics/toil/statuses/19665236d022291a98d4c9270c8a515a91272322"}}}}
{"actor":{"display_login":"JakeNarkizian"}}