{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/14567","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/14567/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/14567/comments","events_url":"https://api.github.com/repos/apache/spark/issues/14567/events","html_url":"https://github.com/apache/spark/pull/14567","id":170214993,"number":14567,"title":"[SPARK-16992][PYSPARK] Python Pep8 formatting and import reorganisation","user":{"login":"Stibbons","id":133498,"avatar_url":"https://avatars.githubusercontent.com/u/133498?v=3","gravatar_id":"","url":"https://api.github.com/users/Stibbons","html_url":"https://github.com/Stibbons","followers_url":"https://api.github.com/users/Stibbons/followers","following_url":"https://api.github.com/users/Stibbons/following{/other_user}","gists_url":"https://api.github.com/users/Stibbons/gists{/gist_id}","starred_url":"https://api.github.com/users/Stibbons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stibbons/subscriptions","organizations_url":"https://api.github.com/users/Stibbons/orgs","repos_url":"https://api.github.com/users/Stibbons/repos","events_url":"https://api.github.com/users/Stibbons/events{/privacy}","received_events_url":"https://api.github.com/users/Stibbons/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-08-09T16:44:27Z","updated_at":"2016-08-12T15:12:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14567","html_url":"https://github.com/apache/spark/pull/14567","diff_url":"https://github.com/apache/spark/pull/14567.diff","patch_url":"https://github.com/apache/spark/pull/14567.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis patch adds a code style validation script following pep8 recommendations.\r\n\r\nFeatures:\r\n- add a .editconfig file (Scala files use 2 space indentation, while Python uses 4) for compatible editors (almost every editors has a plugin to support .editconfig file)\r\n- use autopep8 to fix basic pep8 mistakes\r\n- use isort to automatically split \"import\" statement and organise them into logically linked order (see doc [here](https://pypi.python.org/pypi/isort#multi-line-output-modes). The most important thing is that it split import statements that imports more than one object into several lines. This will increase the number of line of the file, but this facilitates a lot file maintainance and file merges if needed.\r\n- add a 'validate.sh' script in order to automatise the correction (need isort and autopep8 installed)\r\n\r\nYou can see similar script in prod in the [Buildbot](https://github.com/buildbot/buildbot/blob/master/common/validate.sh) project\r\n\r\n\r\n## How was this patch tested?\r\n\r\nSimple tests on my machines has been done (local mode only). There should not have any regression or feature change at all with this pull request.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/239473405","html_url":"https://github.com/apache/spark/pull/14567#issuecomment-239473405","issue_url":"https://api.github.com/repos/apache/spark/issues/14567","id":239473405,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T15:12:40Z","updated_at":"2016-08-12T15:12:40Z","body":"**[Test build #63691 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63691/consoleFull)** for PR 14567 at commit [`46e83f2`](https://github.com/apache/spark/commit/46e83f241f9a73e3bc42fa72eb458ee98de9ebed)."}}
{"actor":{"display_login":"SparkQA"}}