You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by ashashwat <gi...@git.apache.org> on 2018/02/03 10:47:07 UTC
[GitHub] spark pull request #20497: [MINOR][DOC] Use raw triple double quotes around ...
GitHub user ashashwat opened a pull request:
https://github.com/apache/spark/pull/20497
[MINOR][DOC] Use raw triple double quotes around docstrings where there are occurrences of backslashes.
From [PEP 257](https://www.python.org/dev/peps/pep-0257/):
> For consistency, always use """triple double quotes""" around docstrings. Use r"""raw triple double quotes""" if you use any backslashes in your docstrings. For Unicode docstrings, use u"""Unicode triple-quoted strings""".
For example, this is what help (kafka_wordcount) shows:
```
DESCRIPTION
Counts words in UTF8 encoded, '
' delimited text received from the network every second.
Usage: kafka_wordcount.py <zk> <topic>
To run this on your local machine, you need to setup Kafka and create a producer first, see
http://kafka.apache.org/documentation.html#quickstart
and then run the example
`$ bin/spark-submit --jars external/kafka-assembly/target/scala-*/spark-streaming-kafka-assembly-*.jar examples/src/main/python/streaming/kafka_wordcount.py localhost:2181 test`
```
This is what it shows, after the fix:
```
DESCRIPTION
Counts words in UTF8 encoded, '\n' delimited text received from the network every second.
Usage: kafka_wordcount.py <zk> <topic>
To run this on your local machine, you need to setup Kafka and create a producer first, see
http://kafka.apache.org/documentation.html#quickstart
and then run the example
`$ bin/spark-submit --jars \
external/kafka-assembly/target/scala-*/spark-streaming-kafka-assembly-*.jar \
examples/src/main/python/streaming/kafka_wordcount.py \
localhost:2181 test`
```
The thing worth noticing is no linebreak here in the help.
## What changes were proposed in this pull request?
Change triple double quotes to raw triple double quotes when there are occurrences of backslashes in docstrings.
## How was this patch tested?
Manually as this is a doc fix.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ashashwat/spark docstring-fixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/20497.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #20497
----
commit 78b1de3fab8d2bd8256fbbde7b45c230432946a8
Author: Shashwat Anand <me...@...>
Date: 2018-02-03T10:27:25Z
Use raw triple double quotes around doctrings to escape backslashes.
From PEP 257:
For consistency, always use """triple double quotes""" around docstrings. Use r"""raw triple double quotes""" if you use any backslashes in your docstrings. For Unicode docstrings, use u"""Unicode triple-quoted strings""".
For example this is what help (kafka_wordcount) shows:
NAME
kafka_wordcount
FILE
/Users/shashwatanand/Repositories/spark/examples/src/main/python/streaming/kafka_wordcount.py
DESCRIPTION
Counts words in UTF8 encoded, '
' delimited text received from the network every second.
Usage: kafka_wordcount.py <zk> <topic>
To run this on your local machine, you need to setup Kafka and create a producer first, see
http://kafka.apache.org/documentation.html#quickstart
and then run the example
`$ bin/spark-submit --jars external/kafka-assembly/target/scala-*/spark-streaming-kafka-assembly-*.jar examples/src/main/python/streaming/kafka_wordcount.py localhost:2181 test`
This is what it shows, after the fix:
NAME
kafka_wordcount
FILE
/Users/shashwatanand/Repositories/Codes/spark/examples/src/main/python/streaming/kafka_wordcount.py
DESCRIPTION
Counts words in UTF8 encoded, '\n' delimited text received from the network every second.
Usage: kafka_wordcount.py <zk> <topic>
To run this on your local machine, you need to setup Kafka and create a producer first, see
http://kafka.apache.org/documentation.html#quickstart
and then run the example
`$ bin/spark-submit --jars \
external/kafka-assembly/target/scala-*/spark-streaming-kafka-assembly-*.jar \
examples/src/main/python/streaming/kafka_wordcount.py \
localhost:2181 test`
Notice no linebreak here in the help.
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20497
**[Test build #87032 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/87032/testReport)** for PR 20497 at commit [`bdf5559`](https://github.com/apache/spark/commit/bdf5559305b09adeeb2b08844f0a1ed57ea77f9b).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20497
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/87031/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #20497: [MINOR][DOC] Use raw triple double quotes around ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/spark/pull/20497
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20497
**[Test build #87031 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/87031/testReport)** for PR 20497 at commit [`aa76dd5`](https://github.com/apache/spark/commit/aa76dd59b684900537c360a31a412d350c4cb84a).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20497
**[Test build #87033 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/87033/testReport)** for PR 20497 at commit [`dc7a789`](https://github.com/apache/spark/commit/dc7a789bad2250ac1e347be107ea976c6d2ebe02).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20497
Can one of the admins verify this patch?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #20497: [MINOR][DOC] Use raw triple double quotes around ...
Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/20497#discussion_r165812921
--- Diff: examples/src/main/python/streaming/hdfs_wordcount.py ---
@@ -15,7 +15,7 @@
# limitations under the License.
#
-"""
+r"""
--- End diff --
Seems this one doesn't have a balckslash
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20497
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/87032/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20497
**[Test build #87033 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/87033/testReport)** for PR 20497 at commit [`dc7a789`](https://github.com/apache/spark/commit/dc7a789bad2250ac1e347be107ea976c6d2ebe02).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20497
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20497
**[Test build #87031 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/87031/testReport)** for PR 20497 at commit [`aa76dd5`](https://github.com/apache/spark/commit/aa76dd59b684900537c360a31a412d350c4cb84a).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:
https://github.com/apache/spark/pull/20497
ok to test
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20497
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20497
**[Test build #87030 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/87030/testReport)** for PR 20497 at commit [`78b1de3`](https://github.com/apache/spark/commit/78b1de3fab8d2bd8256fbbde7b45c230432946a8).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20497
Can one of the admins verify this patch?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20497
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/87030/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20497
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/87033/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20497
**[Test build #87030 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/87030/testReport)** for PR 20497 at commit [`78b1de3`](https://github.com/apache/spark/commit/78b1de3fab8d2bd8256fbbde7b45c230432946a8).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20497
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark pull request #20497: [MINOR][DOC] Use raw triple double quotes around ...
Posted by ashashwat <gi...@git.apache.org>.
Github user ashashwat commented on a diff in the pull request:
https://github.com/apache/spark/pull/20497#discussion_r165813235
--- Diff: examples/src/main/python/streaming/hdfs_wordcount.py ---
@@ -15,7 +15,7 @@
# limitations under the License.
#
-"""
+r"""
--- End diff --
Yes. Thanks for pointing it out. Fixed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/20497
**[Test build #87032 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/87032/testReport)** for PR 20497 at commit [`bdf5559`](https://github.com/apache/spark/commit/bdf5559305b09adeeb2b08844f0a1ed57ea77f9b).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/20497
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #20497: [MINOR][DOC] Use raw triple double quotes around docstri...
Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:
https://github.com/apache/spark/pull/20497
Thanks! Merged to master/2.3
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org