Skip to content
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

[R-package] [docs] remove devtools dependency for docs builds (fixes #3036) #3072

Merged
merged 20 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions R-package/pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ site:
root: ''
title: LightGBM, Light Gradient Boosting Machine

repo:
url:
home: https://github.com/microsoft/LightGBM/
source: https://github.com/microsoft/LightGBM/tree/master/R-package/
issue: https://github.com/microsoft/LightGBM/issues/
user: https://github.com/

development:
mode: unreleased

Expand Down
6 changes: 0 additions & 6 deletions R-package/pkgdown/extra.js

This file was deleted.

13 changes: 7 additions & 6 deletions build_r_site.R
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
library(pkgdown)
library(roxygen2)

setwd("lightgbm_r")
if (!dir.exists("docs")) {
dir.create("docs")
}

devtools::document()
clean_site()
init_site()
build_home(preview = FALSE, quiet = FALSE)
build_reference(
roxygen2::roxygenize(load = "installed")
pkgdown::clean_site()
pkgdown::init_site()
pkgdown::build_home(preview = FALSE, quiet = FALSE)
pkgdown::build_reference(
lazy = FALSE
, document = FALSE
, devel = FALSE
, examples = TRUE
, run_dont_run = FALSE
, seed = 42L
Expand Down
10 changes: 4 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,20 +227,18 @@ def generate_r_docs(app):
echo 'options(repos = "https://cran.rstudio.com")' > $HOME/.Rprofile
/home/docs/.conda/bin/conda create -q -y -n r_env \
r-base=3.5.1=h1e0a451_2 \
r-devtools=1.13.6=r351h6115d3f_0 \
r-jsonlite=1.5=r351h96ca727_0 \
r-matrix=1.2_14=r351h96ca727_0 \
r-testthat=2.0.0=r351h29659fb_0 \
cmake=3.14.0=h52cb24c_0 \
ca-certificates=2019.11.27=0
cmake=3.14.0=h52cb24c_0
/home/docs/.conda/bin/conda install -q -y -n r_env -c conda-forge \
r-data.table=1.12.8=r35hcdcec82_0 \
r-pkgdown=1.3.0=r35h6115d3f_1001 \
r-roxygen2=6.1.1=r35h0357c0b_1001
r-pkgdown=1.5.1=r35h6115d3f_0 \
r-roxygen2=7.1.0=r35h0357c0b_0
source /home/docs/.conda/bin/activate r_env
export TAR=/bin/tar
cd {0}
sed -i'.bak' '/# Build the package (do not touch this line!)/q' build_r.R
StrikerRUS marked this conversation as resolved.
Show resolved Hide resolved
export R_LIBS="/home/docs/.conda/envs/r_env/lib/R/library"
StrikerRUS marked this conversation as resolved.
Show resolved Hide resolved
Rscript build_r.R
Rscript build_r_site.R
""".format(os.path.join(CURR_PATH, os.path.pardir))
Expand Down