-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-28752][BUILD][DOCS] Documentation build to support Python 3 #26521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I'm going to closely double check tomorrow again. I just roughly checked. |
|
|
||
| ARG BASE_PIP_PKGS="setuptools wheel virtualenv" | ||
| ARG PIP_PKGS="pyopenssl pypandoc numpy pygments sphinx" | ||
| ARG PIP_PKGS="pyopenssl pypandoc numpy sphinx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sphinx still needs pygments but it's in sphinx's dependency. I don't think we should explicitly list since Spark doesn't directly use it (but sphinx uses it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @vanzin too
srowen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the doc build works, seems fine to me.
|
|
||
| You need to have [Ruby](https://www.ruby-lang.org/en/documentation/installation/) and | ||
| [Python](https://docs.python.org/2/using/unix.html#getting-and-installing-the-latest-version-of-python) | ||
| installed. Also install the following libraries: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to mention Python 3 is required here? or does it still work with Python 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it still works with Python 2 because it seems not using Python at all. But I guess we should better stick to Python 3 ..
|
Test build #113785 has finished for PR 26521 at commit
|
|
Right, I double checked and seems fine. should be good to go. I am merging this. |
|
Merged to master. |
|
Sorry for being late. Thank you for finishing this~ |
|
Hi, @HyukjinKwon . This seems to break our release script because |
|
cc @gatorsmile and @jiangxb1987 |
|
Oh, I think that's a typo. It's |
|
oops |
|
Oh... It's weird. Although this PR and https://github.com/apache/spark-website/pull/233/files#diff-04c6e90faac2675aa89e2176d2eec7d8R9 uses |
|
If you haven't already opened a PR, I'll fix that. |
### What changes were proposed in this pull request? This PR aims to fix a type; `rogue` -> `rouge` . This is a follow-up of #26521. ### Why are the changes needed? To support `Python 3`, we upgraded from `pygments` to `rouge`. ### Does this PR introduce any user-facing change? No. (This is for only document generation.) ### How was this patch tested? Manually. ``` $ docker build -t test dev/create-release/spark-rm/ ... 1 gem installed Successfully installed rouge-3.13.0 Parsing documentation for rouge-3.13.0 Installing ri documentation for rouge-3.13.0 Done installing documentation for rouge after 4 seconds 1 gem installed Removing intermediate container 9bd8707d9e84 ---> a18b2f6b0bb9 ... ``` Closes #26686 from dongjoon-hyun/SPARK-28752. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
|
Oops .. |
### What changes were proposed in this pull request? This PR aims to fix a type; `rogue` -> `rouge` . This is a follow-up of apache#26521. ### Why are the changes needed? To support `Python 3`, we upgraded from `pygments` to `rouge`. ### Does this PR introduce any user-facing change? No. (This is for only document generation.) ### How was this patch tested? Manually. ``` $ docker build -t test dev/create-release/spark-rm/ ... 1 gem installed Successfully installed rouge-3.13.0 Parsing documentation for rouge-3.13.0 Installing ri documentation for rouge-3.13.0 Done installing documentation for rouge after 4 seconds 1 gem installed Removing intermediate container 9bd8707d9e84 ---> a18b2f6b0bb9 ... ``` Closes apache#26686 from dongjoon-hyun/SPARK-28752. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
…ekyll properly via Rouge ### What changes were proposed in this pull request? This PR proposes to use Pygment compatible format by Rouge. As of #26521, we use Rouge instead of Pygment wrapper in Ruby. Rouge claims Pygment compatibility; and we should output as Pygment does. ```ruby Rouge::Formatters::HTMLPygments.new(formatter) ``` wraps codes with `<div class="highlight"><pre>...` properly. ### Why are the changes needed? To keep the documentation pretty and not broken. ### Does this PR introduce any user-facing change? Theoretically, no. This is rather a regression fix in documentation (that happens only by #26521 in master). See the malformed doc in preview - https://spark.apache.org/docs/3.0.0-preview2/sql-pyspark-pandas-with-arrow.html ### How was this patch tested? Manually built the doc. **Before:**  **After:**  Closes #27182 from HyukjinKwon/SPARK-28752-followup. Authored-by: HyukjinKwon <[email protected]> Signed-off-by: HyukjinKwon <[email protected]>
What changes were proposed in this pull request?
This PR proposes to switch
pygments.rb, which only support Python 2 and seems inactive for the last few years (https://github.com/tmm1/pygments.rb), to Rouge which is pure Ruby code highlighter that is compatible with Pygments.I thought it would be pretty difficult to change but thankfully Rouge does a great job as the alternative.
Why are the changes needed?
We're moving to Python 3 and drop Python 2 completely.
Does this PR introduce any user-facing change?
Maybe a little bit of different syntax style but should not have a notable change.
How was this patch tested?
Manually tested the build and checked the documentation.