You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "nija-at (via GitHub)" <gi...@apache.org> on 2023/05/02 14:51:03 UTC

[GitHub] [spark] nija-at commented on a diff in pull request #41015: [CONNECT][DOC] Add information on how to regenerate proto for python client

nija-at commented on code in PR #41015:
URL: https://github.com/apache/spark/pull/41015#discussion_r1182659878


##########
connector/connect/README.md:
##########
@@ -21,6 +21,17 @@ user experience across all languages. Please follow the below guidelines:
 
 Python-specific development guidelines are located in [python/docs/source/development/testing.rst](https://github.com/apache/spark/blob/master/python/docs/source/development/testing.rst) that is published at [Development tab](https://spark.apache.org/docs/latest/api/python/development/index.html) in PySpark documentation.
 
+When adding new proto messages, the python proto code need to be regenerated. To do it, use `dev/connect-gen-protos.sh` script.
+It depends on
+```
+brew install bufbuild/buf/buf
+```
+and python dependencies from
+```
+pip install -r dev/requirements.txt
+```
+(specifically, install `black` and dependencies from "Spark Connect python proto generation plugin (optional)" section)
+

Review Comment:
   I would've written it differently.
   
   ````suggestion
   To generate the Python client code from the proto files,
   
   First, make sure to have a Python environment with the installed dependencies:
   
   ```
   pip install -r dev/requirements.txt
   ```
   
   Install [buf](https://github.com/bufbuild/buf)
   
   ```
   brew install bufbuild/buf/buf
   ```
   
   Generate the Python files by running:
   
   ```
   dev/connect-gen-protos.sh
   ```
   
   ````



##########
connector/connect/README.md:
##########
@@ -21,6 +21,17 @@ user experience across all languages. Please follow the below guidelines:
 
 Python-specific development guidelines are located in [python/docs/source/development/testing.rst](https://github.com/apache/spark/blob/master/python/docs/source/development/testing.rst) that is published at [Development tab](https://spark.apache.org/docs/latest/api/python/development/index.html) in PySpark documentation.
 

Review Comment:
   Would it be useful to add a README in this folder and link to this README?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org