You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/07/04 00:20:46 UTC

[GitHub] [spark] Transurgeon opened a new pull request, #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Transurgeon opened a new pull request, #37066:
URL: https://github.com/apache/spark/pull/37066

   Adding python packages to README and requirements.txt to fix issues with building python documentation
   
   There are currently two ways to install python packages for building python documentation:
   1. running sudo pip install from the README.md
   ```sh
   $ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive 'jinja2<3.0.0'
   ```
   2. running the requirements.txt file, from $SPARK_HOME
   ```sh
   pip install -r dev/requirements.txt
   ```
   ### What changes were proposed in this pull request?
   1. Adding 'markupsafe==2.0.1' to both /docs/README.md and /dev/requirements.txt
   2. Syncing both files to contain the same packages 
   3. Adding pyarrow to /docs/README.md 
   
   
   ### Why are the changes needed?
   1. markupsafe==2.1.1 would run into errors when building python documentation (using 'make html')
   ![image](https://user-images.githubusercontent.com/89562186/177061721-4caca44e-1b39-4458-906e-9669c426fc68.png)
   [Similar stack overflow issue](https://stackoverflow.com/questions/72191560/importerror-cannot-import-name-soft-unicode-from-markupsafe)
   Downgrading to markupsafe==2.0.1 fixes missing 'soft_unicode' module issues
   2. Adding missing packages from requirements.txt (Under Documentation-Python) to README.md, this fixes some additional bugs when trying to build docs from the README command.
   3. Finally, running the README command runs into one last error:
   ![image](https://user-images.githubusercontent.com/89562186/177062155-0e6432c1-16be-4edd-8430-737376828a6a.png)
   This is because 'pyarrow' module has been added to requirements.txt (Under PySpark Optional Dependencies) but is still missing from the README command
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   
   ### How was this patch tested?
   Documentation changes only.
   


-- 
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


[GitHub] [spark] HyukjinKwon commented on a diff in pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on code in PR #37066:
URL: https://github.com/apache/spark/pull/37066#discussion_r912567948


##########
dev/requirements.txt:
##########
@@ -36,6 +36,7 @@ jinja2<3.0.0
 sphinx<3.1.0
 sphinx-plotly-directive
 docutils<0.18.0
+markupsafe==2.0.1

Review Comment:
   I would add an inlined comment here with linking a JIRA like SPARK-38279



-- 
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


[GitHub] [spark] HyukjinKwon closed pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs
URL: https://github.com/apache/spark/pull/37066


-- 
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


[GitHub] [spark] AmplabJenkins commented on pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on PR #37066:
URL: https://github.com/apache/spark/pull/37066#issuecomment-1173664113

   Can one of the admins verify this patch?


-- 
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


[GitHub] [spark] HyukjinKwon commented on a diff in pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on code in PR #37066:
URL: https://github.com/apache/spark/pull/37066#discussion_r912686025


##########
docs/README.md:
##########
@@ -59,9 +59,14 @@ See also https://github.com/sphinx-doc/sphinx/issues/7551.
 TODO(SPARK-35375): Jinja2 3.0.0+ causes error when building with Sphinx.
 See also https://issues.apache.org/jira/browse/SPARK-35375.
 -->
+Run the following command from $SPARK_HOME
+```sh
+$ sudo pip install -r dev/requirements.txt
+```
 
+Alternatively, for packages strictly related to documentation:
 ```sh
-$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive 'jinja2<3.0.0'
+$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive pyarrow 'jinja2<3.0.0' 'markupsafe==2.0.1' 'docutils<0.18.0'

Review Comment:
   Let's just remove this. I think it's fine. We also have some comments in dev/requirements.txt file too.



-- 
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


[GitHub] [spark] Transurgeon commented on pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
Transurgeon commented on PR #37066:
URL: https://github.com/apache/spark/pull/37066#issuecomment-1173294716

   Thanks for looking into my pull request @HyukjinKwon,
   
   Initially I wanted to work on [SPARK-33247](https://issues.apache.org/jira/browse/SPARK-33247), I was wondering if this is still required. If so, do you have any templates I can base out of for the structure of the examples/scenarios?
   


-- 
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


[GitHub] [spark] HyukjinKwon commented on a diff in pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on code in PR #37066:
URL: https://github.com/apache/spark/pull/37066#discussion_r912685317


##########
docs/README.md:
##########
@@ -61,7 +61,7 @@ See also https://issues.apache.org/jira/browse/SPARK-35375.
 -->
 
 ```sh
-$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive 'jinja2<3.0.0'
+$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive pyarrow 'jinja2<3.0.0' 'markupsafe==2.0.1' 'docutils<0.18.0'

Review Comment:
   That's fine. You can just mention like "`dev/requirements.txt` includes all packages for developement so this is the easiest way to install them". (feel free to rephrase it)



##########
docs/README.md:
##########
@@ -61,7 +61,7 @@ See also https://issues.apache.org/jira/browse/SPARK-35375.
 -->
 
 ```sh
-$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive 'jinja2<3.0.0'
+$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive pyarrow 'jinja2<3.0.0' 'markupsafe==2.0.1' 'docutils<0.18.0'

Review Comment:
   That's fine. You can just mention like "`dev/requirements.txt` includes all packages for development so this is the easiest way to install them". (feel free to rephrase it)



-- 
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


[GitHub] [spark] HyukjinKwon commented on pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on PR #37066:
URL: https://github.com/apache/spark/pull/37066#issuecomment-1173234143

   Thanks for taking a look for this @Transurgeon 


-- 
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


[GitHub] [spark] HyukjinKwon commented on a diff in pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on code in PR #37066:
URL: https://github.com/apache/spark/pull/37066#discussion_r912567666


##########
docs/README.md:
##########
@@ -61,7 +61,7 @@ See also https://issues.apache.org/jira/browse/SPARK-35375.
 -->
 
 ```sh
-$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive 'jinja2<3.0.0'
+$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive pyarrow 'jinja2<3.0.0' 'markupsafe==2.0.1' 'docutils<0.18.0'

Review Comment:
   Maybe let's just fix this to `sudo pip install dev/requirements.txt`



-- 
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


[GitHub] [spark] Transurgeon commented on a diff in pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
Transurgeon commented on code in PR #37066:
URL: https://github.com/apache/spark/pull/37066#discussion_r913112293


##########
docs/README.md:
##########
@@ -59,9 +59,14 @@ See also https://github.com/sphinx-doc/sphinx/issues/7551.
 TODO(SPARK-35375): Jinja2 3.0.0+ causes error when building with Sphinx.
 See also https://issues.apache.org/jira/browse/SPARK-35375.
 -->
+Run the following command from $SPARK_HOME
+```sh
+$ sudo pip install -r dev/requirements.txt
+```
 
+Alternatively, for packages strictly related to documentation:
 ```sh
-$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive 'jinja2<3.0.0'
+$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive pyarrow 'jinja2<3.0.0' 'markupsafe==2.0.1' 'docutils<0.18.0'

Review Comment:
   Done.
   
   Thanks for the feedback, I will start working on improving the python docs 



-- 
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


[GitHub] [spark] HyukjinKwon commented on pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on PR #37066:
URL: https://github.com/apache/spark/pull/37066#issuecomment-1173426655

   That's awesome. We don't have any templates for now. Basic idea is to have Parameters and Examples that are self-contained (just like `pyspark.pandas` packages). feel free to create a subtask and start working on them


-- 
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


[GitHub] [spark] Transurgeon commented on a diff in pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
Transurgeon commented on code in PR #37066:
URL: https://github.com/apache/spark/pull/37066#discussion_r912588008


##########
docs/README.md:
##########
@@ -61,7 +61,7 @@ See also https://issues.apache.org/jira/browse/SPARK-35375.
 -->
 
 ```sh
-$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive 'jinja2<3.0.0'
+$ sudo pip install 'sphinx<3.1.0' mkdocs numpy pydata_sphinx_theme ipython nbsphinx numpydoc sphinx-plotly-directive pyarrow 'jinja2<3.0.0' 'markupsafe==2.0.1' 'docutils<0.18.0'

Review Comment:
   I was thinking about that..
   
   But the requirements.txt makes you download many more packages which aren't specific to the documentation. I feel like it is good as is, we could consider adding a section/pointing to the requirements.txt for an alternative



-- 
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


[GitHub] [spark] HyukjinKwon commented on pull request #37066: [MINOR][PYTHON][DOC] Fixed instructions for building python docs

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on PR #37066:
URL: https://github.com/apache/spark/pull/37066#issuecomment-1174462561

   Merged to master.


-- 
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