{"action":"created","comment":{"url":"https://api.github.com/repos/ray-project/ray/pulls/comments/191663168","pull_request_review_id":124274515,"id":191663168,"diff_hunk":"@@ -54,7 +54,15 @@ helpful.\n    something like ``flake8 ray/python/ray/worker.py``. You may need to first run\n    ``pip install flake8``.\n \n-5. **Inspecting Redis shards by hand:** To inspect the primary Redis shard by\n+5. **Autoformatting code**. We use ``yapf``\n+   https://github.com/google/yapf for linting, and the config file is\n+   located at ``.style.yapf``. We recommend adding ``.travis/yapf.sh``\n+   to git's ``pre-push`` hook, so that you never have to worry about\n+   your code formatting ever again. Note that RLlib is not currently\n+   autoformatted, though running ``yapf`` over the individual files you\n+   edit with ``yapf -i -p -r <file1> <file2> <...>`` is a good idea.","path":"doc/source/development.rst","position":11,"original_position":11,"commit_id":"0d740fae79c1f6783dacc6a19c97de0a6fbf8326","original_commit_id":"0d740fae79c1f6783dacc6a19c97de0a6fbf8326","user":{"login":"ericl","id":14922,"avatar_url":"https://avatars3.githubusercontent.com/u/14922?v=4","gravatar_id":"","url":"https://api.github.com/users/ericl","html_url":"https://github.com/ericl","followers_url":"https://api.github.com/users/ericl/followers","following_url":"https://api.github.com/users/ericl/following{/other_user}","gists_url":"https://api.github.com/users/ericl/gists{/gist_id}","starred_url":"https://api.github.com/users/ericl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericl/subscriptions","organizations_url":"https://api.github.com/users/ericl/orgs","repos_url":"https://api.github.com/users/ericl/repos","events_url":"https://api.github.com/users/ericl/events{/privacy}","received_events_url":"https://api.github.com/users/ericl/received_events","type":"User","site_admin":false},"body":"Hm I see, perhaps the --exclude flags would work here? Though then the cmd line becomes a bit long so you probably want to check in the script.\r\n\r\nIt would be great to have a ./yapf script that formats all relevant files and also is fast enough to run all the time.","created_at":"2018-05-30T07:16:51Z","updated_at":"2018-05-30T07:16:51Z","html_url":"https://github.com/ray-project/ray/pull/2160#discussion_r191663168","pull_request_url":"https://api.github.com/repos/ray-project/ray/pulls/2160","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ray-project/ray/pulls/comments/191663168"},"html":{"href":"https://github.com/ray-project/ray/pull/2160#discussion_r191663168"},"pull_request":{"href":"https://api.github.com/repos/ray-project/ray/pulls/2160"}},"in_reply_to_id":191640679},"pull_request":{"url":"https://api.github.com/repos/ray-project/ray/pulls/2160","id":191316357,"html_url":"https://github.com/ray-project/ray/pull/2160","diff_url":"https://github.com/ray-project/ray/pull/2160.diff","patch_url":"https://github.com/ray-project/ray/pull/2160.patch","issue_url":"https://api.github.com/repos/ray-project/ray/issues/2160","number":2160,"state":"open","locked":false,"title":"Document how to use yapf","user":{"login":"alok","id":8325708,"avatar_url":"https://avatars0.githubusercontent.com/u/8325708?v=4","gravatar_id":"","url":"https://api.github.com/users/alok","html_url":"https://github.com/alok","followers_url":"https://api.github.com/users/alok/followers","following_url":"https://api.github.com/users/alok/following{/other_user}","gists_url":"https://api.github.com/users/alok/gists{/gist_id}","starred_url":"https://api.github.com/users/alok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alok/subscriptions","organizations_url":"https://api.github.com/users/alok/orgs","repos_url":"https://api.github.com/users/alok/repos","events_url":"https://api.github.com/users/alok/events{/privacy}","received_events_url":"https://api.github.com/users/alok/received_events","type":"User","site_admin":false},"body":"This is a cleaner version of #2158. @ericl Please take a look at this.","created_at":"2018-05-30T02:21:18Z","updated_at":"2018-05-30T07:16:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"977dd04255442adff9e415072317dba27243802a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ray-project/ray/pulls/2160/commits","review_comments_url":"https://api.github.com/repos/ray-project/ray/pulls/2160/comments","review_comment_url":"https://api.github.com/repos/ray-project/ray/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ray-project/ray/issues/2160/comments","statuses_url":"https://api.github.com/repos/ray-project/ray/statuses/0d740fae79c1f6783dacc6a19c97de0a6fbf8326","head":{"label":"alok:doc-yapf","ref":"doc-yapf","sha":"0d740fae79c1f6783dacc6a19c97de0a6fbf8326","user":{"login":"alok","id":8325708,"avatar_url":"https://avatars0.githubusercontent.com/u/8325708?v=4","gravatar_id":"","url":"https://api.github.com/users/alok","html_url":"https://github.com/alok","followers_url":"https://api.github.com/users/alok/followers","following_url":"https://api.github.com/users/alok/following{/other_user}","gists_url":"https://api.github.com/users/alok/gists{/gist_id}","starred_url":"https://api.github.com/users/alok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alok/subscriptions","organizations_url":"https://api.github.com/users/alok/orgs","repos_url":"https://api.github.com/users/alok/repos","events_url":"https://api.github.com/users/alok/events{/privacy}","received_events_url":"https://api.github.com/users/alok/received_events","type":"User","site_admin":false},"repo":{"id":127390855,"name":"ray","full_name":"alok/ray","owner":{"login":"alok","id":8325708,"avatar_url":"https://avatars0.githubusercontent.com/u/8325708?v=4","gravatar_id":"","url":"https://api.github.com/users/alok","html_url":"https://github.com/alok","followers_url":"https://api.github.com/users/alok/followers","following_url":"https://api.github.com/users/alok/following{/other_user}","gists_url":"https://api.github.com/users/alok/gists{/gist_id}","starred_url":"https://api.github.com/users/alok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alok/subscriptions","organizations_url":"https://api.github.com/users/alok/orgs","repos_url":"https://api.github.com/users/alok/repos","events_url":"https://api.github.com/users/alok/events{/privacy}","received_events_url":"https://api.github.com/users/alok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alok/ray","description":"A high-performance distributed execution engine","fork":true,"url":"https://api.github.com/repos/alok/ray","forks_url":"https://api.github.com/repos/alok/ray/forks","keys_url":"https://api.github.com/repos/alok/ray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alok/ray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alok/ray/teams","hooks_url":"https://api.github.com/repos/alok/ray/hooks","issue_events_url":"https://api.github.com/repos/alok/ray/issues/events{/number}","events_url":"https://api.github.com/repos/alok/ray/events","assignees_url":"https://api.github.com/repos/alok/ray/assignees{/user}","branches_url":"https://api.github.com/repos/alok/ray/branches{/branch}","tags_url":"https://api.github.com/repos/alok/ray/tags","blobs_url":"https://api.github.com/repos/alok/ray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alok/ray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alok/ray/git/refs{/sha}","trees_url":"https://api.github.com/repos/alok/ray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alok/ray/statuses/{sha}","languages_url":"https://api.github.com/repos/alok/ray/languages","stargazers_url":"https://api.github.com/repos/alok/ray/stargazers","contributors_url":"https://api.github.com/repos/alok/ray/contributors","subscribers_url":"https://api.github.com/repos/alok/ray/subscribers","subscription_url":"https://api.github.com/repos/alok/ray/subscription","commits_url":"https://api.github.com/repos/alok/ray/commits{/sha}","git_commits_url":"https://api.github.com/repos/alok/ray/git/commits{/sha}","comments_url":"https://api.github.com/repos/alok/ray/comments{/number}","issue_comment_url":"https://api.github.com/repos/alok/ray/issues/comments{/number}","contents_url":"https://api.github.com/repos/alok/ray/contents/{+path}","compare_url":"https://api.github.com/repos/alok/ray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alok/ray/merges","archive_url":"https://api.github.com/repos/alok/ray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alok/ray/downloads","issues_url":"https://api.github.com/repos/alok/ray/issues{/number}","pulls_url":"https://api.github.com/repos/alok/ray/pulls{/number}","milestones_url":"https://api.github.com/repos/alok/ray/milestones{/number}","notifications_url":"https://api.github.com/repos/alok/ray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alok/ray/labels{/name}","releases_url":"https://api.github.com/repos/alok/ray/releases{/id}","deployments_url":"https://api.github.com/repos/alok/ray/deployments","created_at":"2018-03-30T06:31:51Z","updated_at":"2018-05-30T00:45:14Z","pushed_at":"2018-05-30T04:49:35Z","git_url":"git://github.com/alok/ray.git","ssh_url":"git@github.com:alok/ray.git","clone_url":"https://github.com/alok/ray.git","svn_url":"https://github.com/alok/ray","homepage":"","size":12438,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ray-project:master","ref":"master","sha":"aa34509bc746886d9898592f982e7e7a1ace01c8","user":{"login":"ray-project","id":22125274,"avatar_url":"https://avatars3.githubusercontent.com/u/22125274?v=4","gravatar_id":"","url":"https://api.github.com/users/ray-project","html_url":"https://github.com/ray-project","followers_url":"https://api.github.com/users/ray-project/followers","following_url":"https://api.github.com/users/ray-project/following{/other_user}","gists_url":"https://api.github.com/users/ray-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ray-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray-project/subscriptions","organizations_url":"https://api.github.com/users/ray-project/orgs","repos_url":"https://api.github.com/users/ray-project/repos","events_url":"https://api.github.com/users/ray-project/events{/privacy}","received_events_url":"https://api.github.com/users/ray-project/received_events","type":"Organization","site_admin":false},"repo":{"id":71932349,"name":"ray","full_name":"ray-project/ray","owner":{"login":"ray-project","id":22125274,"avatar_url":"https://avatars3.githubusercontent.com/u/22125274?v=4","gravatar_id":"","url":"https://api.github.com/users/ray-project","html_url":"https://github.com/ray-project","followers_url":"https://api.github.com/users/ray-project/followers","following_url":"https://api.github.com/users/ray-project/following{/other_user}","gists_url":"https://api.github.com/users/ray-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ray-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray-project/subscriptions","organizations_url":"https://api.github.com/users/ray-project/orgs","repos_url":"https://api.github.com/users/ray-project/repos","events_url":"https://api.github.com/users/ray-project/events{/privacy}","received_events_url":"https://api.github.com/users/ray-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ray-project/ray","description":"A high-performance distributed execution engine","fork":false,"url":"https://api.github.com/repos/ray-project/ray","forks_url":"https://api.github.com/repos/ray-project/ray/forks","keys_url":"https://api.github.com/repos/ray-project/ray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ray-project/ray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ray-project/ray/teams","hooks_url":"https://api.github.com/repos/ray-project/ray/hooks","issue_events_url":"https://api.github.com/repos/ray-project/ray/issues/events{/number}","events_url":"https://api.github.com/repos/ray-project/ray/events","assignees_url":"https://api.github.com/repos/ray-project/ray/assignees{/user}","branches_url":"https://api.github.com/repos/ray-project/ray/branches{/branch}","tags_url":"https://api.github.com/repos/ray-project/ray/tags","blobs_url":"https://api.github.com/repos/ray-project/ray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ray-project/ray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ray-project/ray/git/refs{/sha}","trees_url":"https://api.github.com/repos/ray-project/ray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ray-project/ray/statuses/{sha}","languages_url":"https://api.github.com/repos/ray-project/ray/languages","stargazers_url":"https://api.github.com/repos/ray-project/ray/stargazers","contributors_url":"https://api.github.com/repos/ray-project/ray/contributors","subscribers_url":"https://api.github.com/repos/ray-project/ray/subscribers","subscription_url":"https://api.github.com/repos/ray-project/ray/subscription","commits_url":"https://api.github.com/repos/ray-project/ray/commits{/sha}","git_commits_url":"https://api.github.com/repos/ray-project/ray/git/commits{/sha}","comments_url":"https://api.github.com/repos/ray-project/ray/comments{/number}","issue_comment_url":"https://api.github.com/repos/ray-project/ray/issues/comments{/number}","contents_url":"https://api.github.com/repos/ray-project/ray/contents/{+path}","compare_url":"https://api.github.com/repos/ray-project/ray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ray-project/ray/merges","archive_url":"https://api.github.com/repos/ray-project/ray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ray-project/ray/downloads","issues_url":"https://api.github.com/repos/ray-project/ray/issues{/number}","pulls_url":"https://api.github.com/repos/ray-project/ray/pulls{/number}","milestones_url":"https://api.github.com/repos/ray-project/ray/milestones{/number}","notifications_url":"https://api.github.com/repos/ray-project/ray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ray-project/ray/labels{/name}","releases_url":"https://api.github.com/repos/ray-project/ray/releases{/id}","deployments_url":"https://api.github.com/repos/ray-project/ray/deployments","created_at":"2016-10-25T19:38:30Z","updated_at":"2018-05-30T06:26:51Z","pushed_at":"2018-05-30T05:12:46Z","git_url":"git://github.com/ray-project/ray.git","ssh_url":"git@github.com:ray-project/ray.git","clone_url":"https://github.com/ray-project/ray.git","svn_url":"https://github.com/ray-project/ray","homepage":"","size":11632,"stargazers_count":3349,"watchers_count":3349,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":444,"mirror_url":null,"archived":false,"open_issues_count":312,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":444,"open_issues":312,"watchers":3349,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ray-project/ray/pulls/2160"},"html":{"href":"https://github.com/ray-project/ray/pull/2160"},"issue":{"href":"https://api.github.com/repos/ray-project/ray/issues/2160"},"comments":{"href":"https://api.github.com/repos/ray-project/ray/issues/2160/comments"},"review_comments":{"href":"https://api.github.com/repos/ray-project/ray/pulls/2160/comments"},"review_comment":{"href":"https://api.github.com/repos/ray-project/ray/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ray-project/ray/pulls/2160/commits"},"statuses":{"href":"https://api.github.com/repos/ray-project/ray/statuses/0d740fae79c1f6783dacc6a19c97de0a6fbf8326"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ericl"}}