-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-37474][R][DOCS] Migrate SparkR docs to pkgdown #34728
Conversation
Test build #145676 has finished for PR 34728 at commit
|
Kubernetes integration test starting |
Test build #145677 has finished for PR 34728 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #145678 has finished for PR 34728 at commit
|
Kubernetes integration test status failure |
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #145679 has finished for PR 34728 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
The demo looks good. cc @falaki @felixcheung @shivaram FYI |
Test build #145681 has finished for PR 34728 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
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.
Seems OK if it gives some benefits and does not entail much change to existing docs
Test build #145682 has finished for PR 34728 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
R/pkg/_pkgdown.yml
Outdated
reference: | ||
|
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.
Manual reference is not mandatory, but allows us to split index into logical sections, which are easier to digest.
Test build #145683 has finished for PR 34728 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #145684 has finished for PR 34728 at commit
|
Kubernetes integration test status failure |
Test build #145955 has finished for PR 34728 at commit
|
# Determine Spark(R) version | ||
SPARK_VERSION=$(grep -oP "(?<=Version:\ ).*" ../DESCRIPTION) | ||
|
||
# Update url | ||
sed "s/{SPARK_VERSION}/$SPARK_VERSION/" ../pkgdown/_pkgdown_template.yml > ../_pkgdown.yml | ||
|
||
"$R_SCRIPT_PATH/Rscript" -e 'libDir <- "../../lib"; library(SparkR, lib.loc=libDir); pkgdown::build_site("..")' | ||
|
||
# Clean temporary config | ||
rm ../_pkgdown.yml | ||
|
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 am not sure if that's the best way to handle different versions, so any suggestions are welcome.
Kubernetes integration test starting |
Kubernetes integration test status failure |
.github/workflows/build_and_test.yml
Outdated
@@ -489,6 +490,8 @@ jobs: | |||
apt-get update -y | |||
apt-get install -y ruby ruby-dev | |||
Rscript -e "install.packages(c('devtools', 'testthat', 'knitr', 'rmarkdown', 'roxygen2'), repos='https://cloud.r-project.org/')" | |||
Rscript -e "devtools::install_git('https://github.com/r-lib/pkgdown.git')" | |||
Rscript -e "devtools::install_git('https://github.com/amirmasoudabdol/preferably.git')" |
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.
quick question, do we need this for documentation build? we would have to also update https://github.com/apache/spark/blob/master/docs/README.md and https://github.com/apache/spark/blob/master/dev/create-release/spark-rm/Dockerfile#L83-L84 . Can be done separately though.
And can we pin the versions of both libraries instead of using the master branch?
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.
quick question, do we need this for documentation build?
Yes, documentation build invokes pkgdown.
And can we pin the versions of both libraries instead of using the master branch?
Of course. We should be even able to pin CRAN version of pkgdown
(seems like 2.0.x and compatible preferably)) are already published and visible).
Looks pretty good .. but the packaging stuff it would be great to have sign-offs from @felixcheung @shivaram @mengxr or @falaki. |
Test build #145990 has finished for PR 34728 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #145991 has finished for PR 34728 at commit
|
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.
LGTM
Merged to master |
### What changes were proposed in this pull request? This tries to fix `do-release-docker.sh` for branch-3.2. ### Why are the changes needed? Currently the following error will occur if running the script in `branch-3.2`: ``` #5 917.4 g++ -std=gnu++14 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o testthat.so init.o reassign.o test-catch.o test-example.o test-runner.o -L/usr/lib/R/lib -lR #5 917.5 installing to /usr/local/lib/R/site-library/00LOCK-testthat/00new/testthat/libs #5 917.5 ** R #5 917.5 ** inst #5 917.5 ** byte-compile and prepare package for lazy loading #5 924.4 ** help #5 924.6 *** installing help indices #5 924.7 *** copying figures #5 924.7 ** building package indices #5 924.9 ** installing vignettes #5 924.9 ** testing if installed package can be loaded from temporary location #5 925.1 ** checking absolute paths in shared objects and dynamic libraries #5 925.1 ** testing if installed package can be loaded from final location #5 925.5 ** testing if installed package keeps a record of temporary installation path #5 925.5 * DONE (testthat) #5 925.8 ERROR: dependency 'pkgdown' is not available for package 'devtools' #5 925.8 * removing '/usr/local/lib/R/site-library/devtools' #5 925.8 #5 925.8 The downloaded source packages are in #5 925.8 '/tmp/Rtmp3nJI60/downloaded_packages' #5 925.8 Warning messages: #5 925.8 1: In install.packages(c("curl", "xml2", "httr", "devtools", "testthat", : #5 925.8 installation of package 'textshaping' had non-zero exit status #5 925.8 2: In install.packages(c("curl", "xml2", "httr", "devtools", "testthat", : #5 925.8 installation of package 'ragg' had non-zero exit status #5 925.8 3: In install.packages(c("curl", "xml2", "httr", "devtools", "testthat", : #5 925.8 installation of package 'pkgdown' had non-zero exit status #5 925.8 4: In install.packages(c("curl", "xml2", "httr", "devtools", "testthat", : #5 925.8 installation of package 'devtools' had non-zero exit status #5 926.0 Error in loadNamespace(x) : there is no package called 'devtools' #5 926.0 Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart #5 926.0 Execution halted ``` The same error doesn't happen on master. I checked the diff between the two and it seems the following line: ``` $APT_INSTALL libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev && \ ``` introduced in #34728 made the difference. I verified that after adding the line, `do-release-docker.sh` (dry run mode) was able to finish successfully. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually Closes #38643 from sunchao/fix-docker-release. Authored-by: Chao Sun <sunchao@apple.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
### What changes were proposed in this pull request? This tries to fix `do-release-docker.sh` for branch-3.2. ### Why are the changes needed? Currently the following error will occur if running the script in `branch-3.2`: ``` apache#5 917.4 g++ -std=gnu++14 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o testthat.so init.o reassign.o test-catch.o test-example.o test-runner.o -L/usr/lib/R/lib -lR apache#5 917.5 installing to /usr/local/lib/R/site-library/00LOCK-testthat/00new/testthat/libs apache#5 917.5 ** R apache#5 917.5 ** inst apache#5 917.5 ** byte-compile and prepare package for lazy loading apache#5 924.4 ** help apache#5 924.6 *** installing help indices apache#5 924.7 *** copying figures apache#5 924.7 ** building package indices apache#5 924.9 ** installing vignettes apache#5 924.9 ** testing if installed package can be loaded from temporary location apache#5 925.1 ** checking absolute paths in shared objects and dynamic libraries apache#5 925.1 ** testing if installed package can be loaded from final location apache#5 925.5 ** testing if installed package keeps a record of temporary installation path apache#5 925.5 * DONE (testthat) apache#5 925.8 ERROR: dependency 'pkgdown' is not available for package 'devtools' apache#5 925.8 * removing '/usr/local/lib/R/site-library/devtools' apache#5 925.8 apache#5 925.8 The downloaded source packages are in apache#5 925.8 '/tmp/Rtmp3nJI60/downloaded_packages' apache#5 925.8 Warning messages: apache#5 925.8 1: In install.packages(c("curl", "xml2", "httr", "devtools", "testthat", : apache#5 925.8 installation of package 'textshaping' had non-zero exit status apache#5 925.8 2: In install.packages(c("curl", "xml2", "httr", "devtools", "testthat", : apache#5 925.8 installation of package 'ragg' had non-zero exit status apache#5 925.8 3: In install.packages(c("curl", "xml2", "httr", "devtools", "testthat", : apache#5 925.8 installation of package 'pkgdown' had non-zero exit status apache#5 925.8 4: In install.packages(c("curl", "xml2", "httr", "devtools", "testthat", : apache#5 925.8 installation of package 'devtools' had non-zero exit status apache#5 926.0 Error in loadNamespace(x) : there is no package called 'devtools' apache#5 926.0 Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart apache#5 926.0 Execution halted ``` The same error doesn't happen on master. I checked the diff between the two and it seems the following line: ``` $APT_INSTALL libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev && \ ``` introduced in apache#34728 made the difference. I verified that after adding the line, `do-release-docker.sh` (dry run mode) was able to finish successfully. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually Closes apache#38643 from sunchao/fix-docker-release. Authored-by: Chao Sun <sunchao@apple.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
What changes were proposed in this pull request?
This PR proposes migration of R API docs to pkgdown.
Result (not synced automatically) could look like this
https://zero323.gitlab.io/sparkr-docs-experiments/
Why are the changes needed?
To improve overall experience of interactions with SparkR docs:
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Inspection of the build page