You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-30879][DOCS] Refine workflow for building docs
### What changes were proposed in this pull request?
This PR makes the following refinements to the workflow for building docs:
* Install Python and Ruby consistently using pyenv and rbenv across both the docs README and the release Dockerfile.
* Pin the Python and Ruby versions we use.
* Pin all direct Python and Ruby dependency versions.
* Eliminate any use of `sudo pip`, which the Python community discourages, or `sudo gem`.
### Why are the changes needed?
This PR should increase the consistency and reproducibility of the doc-building process by managing Python and Ruby in a more consistent way, and by eliminating unused or outdated code.
Here's a possible example of an issue building the docs that would be addressed by the changes in this PR: #27459 (comment)
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
Manual tests:
* I was able to build the Docker image successfully, minus the final part about `RUN useradd`.
* I am unable to run `do-release-docker.sh` because I am not a committer and don't have the required GPG key.
* I built the docs locally and viewed them in the browser.
I think I need a committer to more fully test out these changes.
Closes#27534 from nchammas/SPARK-30731-building-docs.
Authored-by: Nicholas Chammas <[email protected]>
Signed-off-by: Sean Owen <[email protected]>
Note: If you are on a system with both Ruby 1.9 and Ruby 2.0 you may need to replace gem with gem2.0.
55
+
To activate them, you'll need to run these commands or add them to the end of your `.bash_profile`:
56
+
57
+
```sh
58
+
eval"$(rbenv init -)"
59
+
eval"$(pyenv init -)"
60
+
```
61
+
62
+
You can now use them to install specific versions of Ruby and Python and associate them with
63
+
the Spark home directory. Whenever you navigate to this directory or any of its subdirectories, these versions of Ruby and Python will be automatically activated.
64
+
65
+
```sh
66
+
rbenv install 2.7.0
67
+
pyenv install 3.7.6
68
+
69
+
cd /path/to/spark/root
70
+
rbenv local 2.7.0
71
+
pyenv local 3.7.6
72
+
```
43
73
44
74
### R Documentation
45
75
46
-
If you'd like to generate R documentation, you'll need to [install Pandoc](https://pandoc.org/installing.html)
76
+
If you'd like to generate R documentation, you'll need to install R, [install Pandoc](https://pandoc.org/installing.html),
47
77
and install these libraries:
48
78
49
79
```sh
@@ -58,7 +88,7 @@ Note: Other versions of roxygen2 might work in SparkR documentation generation b
58
88
To generate API docs for any language, you'll need to install these libraries:
0 commit comments