{"action":"created","comment":{"url":"https://api.github.com/repos/spotify/luigi/pulls/comments/70263071","id":70263071,"diff_hunk":"@@ -449,13 +458,14 @@ def move(self, source_path, destination_path, **kwargs):\n         self.copy(source_path, destination_path, **kwargs)\n         self.remove(source_path)\n \n-    def listdir(self, path, start_time=None, end_time=None):\n+    def listdir(self, path, start_time=None, end_time=None, with_key=False):\n         \"\"\"\n         Get an iterable with S3 folder contents.\n         Iterable contains paths relative to queried path.\n \n         :param start_time: Optional argument to copy files with modified dates after start_time\n         :param end_time: Optional argument to copy files with modified dates before end_time\n+        :param with_key: Optional argument, when set to True will return a tuple (filename, boto_key_object)","path":"luigi/s3.py","position":47,"original_position":47,"commit_id":"7c7fe8f9e8962f7d1d463e1f1ff702edf84db70b","original_commit_id":"7c7fe8f9e8962f7d1d463e1f1ff702edf84db70b","user":{"login":"dlstadther","id":7432199,"avatar_url":"https://avatars.githubusercontent.com/u/7432199?v=3","gravatar_id":"","url":"https://api.github.com/users/dlstadther","html_url":"https://github.com/dlstadther","followers_url":"https://api.github.com/users/dlstadther/followers","following_url":"https://api.github.com/users/dlstadther/following{/other_user}","gists_url":"https://api.github.com/users/dlstadther/gists{/gist_id}","starred_url":"https://api.github.com/users/dlstadther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlstadther/subscriptions","organizations_url":"https://api.github.com/users/dlstadther/orgs","repos_url":"https://api.github.com/users/dlstadther/repos","events_url":"https://api.github.com/users/dlstadther/events{/privacy}","received_events_url":"https://api.github.com/users/dlstadther/received_events","type":"User","site_admin":false},"body":"You're right. I'll update this docstring","created_at":"2016-07-11T14:04:02Z","updated_at":"2016-07-11T14:04:02Z","html_url":"https://github.com/spotify/luigi/pull/1745#discussion_r70263071","pull_request_url":"https://api.github.com/repos/spotify/luigi/pulls/1745","_links":{"self":{"href":"https://api.github.com/repos/spotify/luigi/pulls/comments/70263071"},"html":{"href":"https://github.com/spotify/luigi/pull/1745#discussion_r70263071"},"pull_request":{"href":"https://api.github.com/repos/spotify/luigi/pulls/1745"}}},"pull_request":{"url":"https://api.github.com/repos/spotify/luigi/pulls/1745","id":75974236,"html_url":"https://github.com/spotify/luigi/pull/1745","diff_url":"https://github.com/spotify/luigi/pull/1745.diff","patch_url":"https://github.com/spotify/luigi/pull/1745.patch","issue_url":"https://api.github.com/repos/spotify/luigi/issues/1745","number":1745,"state":"open","locked":false,"title":"S3 list with key object","user":{"login":"dlstadther","id":7432199,"avatar_url":"https://avatars.githubusercontent.com/u/7432199?v=3","gravatar_id":"","url":"https://api.github.com/users/dlstadther","html_url":"https://github.com/dlstadther","followers_url":"https://api.github.com/users/dlstadther/followers","following_url":"https://api.github.com/users/dlstadther/following{/other_user}","gists_url":"https://api.github.com/users/dlstadther/gists{/gist_id}","starred_url":"https://api.github.com/users/dlstadther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlstadther/subscriptions","organizations_url":"https://api.github.com/users/dlstadther/orgs","repos_url":"https://api.github.com/users/dlstadther/repos","events_url":"https://api.github.com/users/dlstadther/events{/privacy}","received_events_url":"https://api.github.com/users/dlstadther/received_events","type":"User","site_admin":false},"body":"## Description\r\nUpdated `S3Client.copy()` such that when copying a directory of files, the number and total size of files will be returned. To accomplish this, the `list_with_key()` method was added to return not only the s3 key path, but also the key item. `list_with_key()` calls `listdir()` (just like `list()`) but with an optional parameter `with_key` set to `True`.\r\n\r\nModule should remain backwards compatible. `list()` functions as normal, as does `listdir()` if the `with_key` parameter remains `False`.\r\n\r\n## Motivation and Context\r\nI need to perform a few dynamic calculations based on the number and size of copied files. To accomplish this, `S3Client.copy()` needs to return the number and size of files copied.\r\n\r\n## Have you tested this? If so, how?\r\nTests are included.\r\n","created_at":"2016-07-01T12:43:06Z","updated_at":"2016-07-11T14:04:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6dfe98882088b931da40604ca387da13158d5fca","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/spotify/luigi/pulls/1745/commits","review_comments_url":"https://api.github.com/repos/spotify/luigi/pulls/1745/comments","review_comment_url":"https://api.github.com/repos/spotify/luigi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spotify/luigi/issues/1745/comments","statuses_url":"https://api.github.com/repos/spotify/luigi/statuses/7c7fe8f9e8962f7d1d463e1f1ff702edf84db70b","head":{"label":"dlstadther:s3_list_update","ref":"s3_list_update","sha":"7c7fe8f9e8962f7d1d463e1f1ff702edf84db70b","user":{"login":"dlstadther","id":7432199,"avatar_url":"https://avatars.githubusercontent.com/u/7432199?v=3","gravatar_id":"","url":"https://api.github.com/users/dlstadther","html_url":"https://github.com/dlstadther","followers_url":"https://api.github.com/users/dlstadther/followers","following_url":"https://api.github.com/users/dlstadther/following{/other_user}","gists_url":"https://api.github.com/users/dlstadther/gists{/gist_id}","starred_url":"https://api.github.com/users/dlstadther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlstadther/subscriptions","organizations_url":"https://api.github.com/users/dlstadther/orgs","repos_url":"https://api.github.com/users/dlstadther/repos","events_url":"https://api.github.com/users/dlstadther/events{/privacy}","received_events_url":"https://api.github.com/users/dlstadther/received_events","type":"User","site_admin":false},"repo":{"id":44337387,"name":"luigi","full_name":"dlstadther/luigi","owner":{"login":"dlstadther","id":7432199,"avatar_url":"https://avatars.githubusercontent.com/u/7432199?v=3","gravatar_id":"","url":"https://api.github.com/users/dlstadther","html_url":"https://github.com/dlstadther","followers_url":"https://api.github.com/users/dlstadther/followers","following_url":"https://api.github.com/users/dlstadther/following{/other_user}","gists_url":"https://api.github.com/users/dlstadther/gists{/gist_id}","starred_url":"https://api.github.com/users/dlstadther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlstadther/subscriptions","organizations_url":"https://api.github.com/users/dlstadther/orgs","repos_url":"https://api.github.com/users/dlstadther/repos","events_url":"https://api.github.com/users/dlstadther/events{/privacy}","received_events_url":"https://api.github.com/users/dlstadther/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dlstadther/luigi","description":"Luigi is a Python module that helps you build complex pipelines of batch jobs. It handles dependency resolution, workflow management, visualization etc. It also comes with Hadoop support built in. ","fork":true,"url":"https://api.github.com/repos/dlstadther/luigi","forks_url":"https://api.github.com/repos/dlstadther/luigi/forks","keys_url":"https://api.github.com/repos/dlstadther/luigi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dlstadther/luigi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dlstadther/luigi/teams","hooks_url":"https://api.github.com/repos/dlstadther/luigi/hooks","issue_events_url":"https://api.github.com/repos/dlstadther/luigi/issues/events{/number}","events_url":"https://api.github.com/repos/dlstadther/luigi/events","assignees_url":"https://api.github.com/repos/dlstadther/luigi/assignees{/user}","branches_url":"https://api.github.com/repos/dlstadther/luigi/branches{/branch}","tags_url":"https://api.github.com/repos/dlstadther/luigi/tags","blobs_url":"https://api.github.com/repos/dlstadther/luigi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dlstadther/luigi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dlstadther/luigi/git/refs{/sha}","trees_url":"https://api.github.com/repos/dlstadther/luigi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dlstadther/luigi/statuses/{sha}","languages_url":"https://api.github.com/repos/dlstadther/luigi/languages","stargazers_url":"https://api.github.com/repos/dlstadther/luigi/stargazers","contributors_url":"https://api.github.com/repos/dlstadther/luigi/contributors","subscribers_url":"https://api.github.com/repos/dlstadther/luigi/subscribers","subscription_url":"https://api.github.com/repos/dlstadther/luigi/subscription","commits_url":"https://api.github.com/repos/dlstadther/luigi/commits{/sha}","git_commits_url":"https://api.github.com/repos/dlstadther/luigi/git/commits{/sha}","comments_url":"https://api.github.com/repos/dlstadther/luigi/comments{/number}","issue_comment_url":"https://api.github.com/repos/dlstadther/luigi/issues/comments{/number}","contents_url":"https://api.github.com/repos/dlstadther/luigi/contents/{+path}","compare_url":"https://api.github.com/repos/dlstadther/luigi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dlstadther/luigi/merges","archive_url":"https://api.github.com/repos/dlstadther/luigi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dlstadther/luigi/downloads","issues_url":"https://api.github.com/repos/dlstadther/luigi/issues{/number}","pulls_url":"https://api.github.com/repos/dlstadther/luigi/pulls{/number}","milestones_url":"https://api.github.com/repos/dlstadther/luigi/milestones{/number}","notifications_url":"https://api.github.com/repos/dlstadther/luigi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dlstadther/luigi/labels{/name}","releases_url":"https://api.github.com/repos/dlstadther/luigi/releases{/id}","deployments_url":"https://api.github.com/repos/dlstadther/luigi/deployments","created_at":"2015-10-15T18:32:05Z","updated_at":"2016-02-29T14:50:47Z","pushed_at":"2016-07-11T13:09:41Z","git_url":"git://github.com/dlstadther/luigi.git","ssh_url":"git@github.com:dlstadther/luigi.git","clone_url":"https://github.com/dlstadther/luigi.git","svn_url":"https://github.com/dlstadther/luigi","homepage":null,"size":7919,"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":"develop"}},"base":{"label":"spotify:master","ref":"master","sha":"c3119757c9ad4141fb446554109fa09cbd31173c","user":{"login":"spotify","id":251374,"avatar_url":"https://avatars.githubusercontent.com/u/251374?v=3","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"repo":{"id":5888353,"name":"luigi","full_name":"spotify/luigi","owner":{"login":"spotify","id":251374,"avatar_url":"https://avatars.githubusercontent.com/u/251374?v=3","gravatar_id":"","url":"https://api.github.com/users/spotify","html_url":"https://github.com/spotify","followers_url":"https://api.github.com/users/spotify/followers","following_url":"https://api.github.com/users/spotify/following{/other_user}","gists_url":"https://api.github.com/users/spotify/gists{/gist_id}","starred_url":"https://api.github.com/users/spotify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spotify/subscriptions","organizations_url":"https://api.github.com/users/spotify/orgs","repos_url":"https://api.github.com/users/spotify/repos","events_url":"https://api.github.com/users/spotify/events{/privacy}","received_events_url":"https://api.github.com/users/spotify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spotify/luigi","description":"Luigi is a Python module that helps you build complex pipelines of batch jobs. It handles dependency resolution, workflow management, visualization etc. It also comes with Hadoop support built in. ","fork":false,"url":"https://api.github.com/repos/spotify/luigi","forks_url":"https://api.github.com/repos/spotify/luigi/forks","keys_url":"https://api.github.com/repos/spotify/luigi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spotify/luigi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spotify/luigi/teams","hooks_url":"https://api.github.com/repos/spotify/luigi/hooks","issue_events_url":"https://api.github.com/repos/spotify/luigi/issues/events{/number}","events_url":"https://api.github.com/repos/spotify/luigi/events","assignees_url":"https://api.github.com/repos/spotify/luigi/assignees{/user}","branches_url":"https://api.github.com/repos/spotify/luigi/branches{/branch}","tags_url":"https://api.github.com/repos/spotify/luigi/tags","blobs_url":"https://api.github.com/repos/spotify/luigi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spotify/luigi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spotify/luigi/git/refs{/sha}","trees_url":"https://api.github.com/repos/spotify/luigi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spotify/luigi/statuses/{sha}","languages_url":"https://api.github.com/repos/spotify/luigi/languages","stargazers_url":"https://api.github.com/repos/spotify/luigi/stargazers","contributors_url":"https://api.github.com/repos/spotify/luigi/contributors","subscribers_url":"https://api.github.com/repos/spotify/luigi/subscribers","subscription_url":"https://api.github.com/repos/spotify/luigi/subscription","commits_url":"https://api.github.com/repos/spotify/luigi/commits{/sha}","git_commits_url":"https://api.github.com/repos/spotify/luigi/git/commits{/sha}","comments_url":"https://api.github.com/repos/spotify/luigi/comments{/number}","issue_comment_url":"https://api.github.com/repos/spotify/luigi/issues/comments{/number}","contents_url":"https://api.github.com/repos/spotify/luigi/contents/{+path}","compare_url":"https://api.github.com/repos/spotify/luigi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spotify/luigi/merges","archive_url":"https://api.github.com/repos/spotify/luigi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spotify/luigi/downloads","issues_url":"https://api.github.com/repos/spotify/luigi/issues{/number}","pulls_url":"https://api.github.com/repos/spotify/luigi/pulls{/number}","milestones_url":"https://api.github.com/repos/spotify/luigi/milestones{/number}","notifications_url":"https://api.github.com/repos/spotify/luigi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spotify/luigi/labels{/name}","releases_url":"https://api.github.com/repos/spotify/luigi/releases{/id}","deployments_url":"https://api.github.com/repos/spotify/luigi/deployments","created_at":"2012-09-20T15:06:38Z","updated_at":"2016-07-11T11:34:34Z","pushed_at":"2016-07-11T13:09:43Z","git_url":"git://github.com/spotify/luigi.git","ssh_url":"git@github.com:spotify/luigi.git","clone_url":"https://github.com/spotify/luigi.git","svn_url":"https://github.com/spotify/luigi","homepage":null,"size":10499,"stargazers_count":4894,"watchers_count":4894,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":948,"mirror_url":null,"open_issues_count":182,"forks":948,"open_issues":182,"watchers":4894,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spotify/luigi/pulls/1745"},"html":{"href":"https://github.com/spotify/luigi/pull/1745"},"issue":{"href":"https://api.github.com/repos/spotify/luigi/issues/1745"},"comments":{"href":"https://api.github.com/repos/spotify/luigi/issues/1745/comments"},"review_comments":{"href":"https://api.github.com/repos/spotify/luigi/pulls/1745/comments"},"review_comment":{"href":"https://api.github.com/repos/spotify/luigi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spotify/luigi/pulls/1745/commits"},"statuses":{"href":"https://api.github.com/repos/spotify/luigi/statuses/7c7fe8f9e8962f7d1d463e1f1ff702edf84db70b"}}}}
{"actor":{"display_login":"dlstadther"}}