Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
03ee9956
Unverified
Commit
03ee9956
authored
Jan 08, 2024
by
James Lamb
Committed by
GitHub
Jan 08, 2024
Browse files
[R-package] [ci] switch vignettes from 'rmarkdown' to 'markdown' (#6258)
parent
c5ad987e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
15 deletions
+19
-15
.ci/test_r_package.sh
.ci/test_r_package.sh
+3
-3
.ci/test_r_package_windows.ps1
.ci/test_r_package_windows.ps1
+1
-1
.github/workflows/r_package.yml
.github/workflows/r_package.yml
+2
-2
.github/workflows/static_analysis.yml
.github/workflows/static_analysis.yml
+1
-1
.vsts-ci.yml
.vsts-ci.yml
+1
-1
R-package/DESCRIPTION
R-package/DESCRIPTION
+1
-1
R-package/README.md
R-package/README.md
+2
-2
R-package/vignettes/basic_walkthrough.Rmd
R-package/vignettes/basic_walkthrough.Rmd
+7
-3
docs/env.yml
docs/env.yml
+1
-1
No files found.
.ci/test_r_package.sh
View file @
03ee9956
...
...
@@ -127,13 +127,13 @@ if [[ "${R_MAJOR_VERSION}" == "3" ]]; then
Rscript
--vanilla
-e
"install.packages('https://cran.r-project.org/src/contrib/Archive/lattice/lattice_0.20-41.tar.gz', repos = NULL, lib = '
${
R_LIB_PATH
}
')"
fi
# Manually install Depends and Imports libraries + 'knitr', '
RhpcBLASctl', 'rmarkdown
', 'testthat'
# Manually install Depends and Imports libraries + 'knitr', '
markdown', 'RhpcBLASctl
', 'testthat'
# to avoid a CI-time dependency on devtools (for devtools::install_deps())
# NOTE: testthat is not required when running rchk
if
[[
"
${
TASK
}
"
==
"r-rchk"
]]
;
then
packages
=
"c('data.table', 'jsonlite', 'knitr', 'Matrix', 'R6', 'RhpcBLASctl'
, 'rmarkdown'
)"
packages
=
"c('data.table', 'jsonlite', 'knitr',
'markdown',
'Matrix', 'R6', 'RhpcBLASctl')"
else
packages
=
"c('data.table', 'jsonlite', 'knitr', 'Matrix', 'R6', 'RhpcBLASctl',
'rmarkdown',
'testthat')"
packages
=
"c('data.table', 'jsonlite', 'knitr',
'markdown',
'Matrix', 'R6', 'RhpcBLASctl', 'testthat')"
fi
compile_from_source
=
"both"
if
[[
$OS_NAME
==
"macos"
]]
;
then
...
...
.ci/test_r_package_windows.ps1
View file @
03ee9956
...
...
@@ -124,7 +124,7 @@ Start-Process -FilePath Rtools.exe -NoNewWindow -Wait -ArgumentList "/VERYSILENT
Write-Output
"Done installing Rtools"
Write-Output
"Installing dependencies"
$packages
=
"c('data.table', 'jsonlite', 'knitr', 'Matrix', 'processx', 'R6', 'RhpcBLASctl',
'rmarkdown',
'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')"
$packages
=
"c('data.table', 'jsonlite', 'knitr',
'markdown',
'Matrix', 'processx', 'R6', 'RhpcBLASctl', 'testthat'), dependencies = c('Imports', 'Depends', 'LinkingTo')"
Run-R-Code-Redirect-Stderr
"options(install.packages.check.source = 'no'); install.packages(
$packages
, repos = '
$
env
:
CRAN_MIRROR
', type = 'binary', lib = '
$
env
:
R_LIB_PATH
', Ncpus = parallel::detectCores())"
;
Check-Output
$?
Write-Output
"Building R package"
...
...
.github/workflows/r_package.yml
View file @
03ee9956
...
...
@@ -246,7 +246,7 @@ jobs:
-
name
:
Install packages
shell
:
bash
run
:
|
RDscript${{ matrix.r_customization }} -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl',
'rmarkdown',
'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
RDscript${{ matrix.r_customization }} -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr',
'markdown',
'Matrix', 'RhpcBLASctl', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
sh build-cran-package.sh --r-executable=RD${{ matrix.r_customization }}
RD${{ matrix.r_customization }} CMD INSTALL lightgbm_*.tar.gz || exit -1
-
name
:
Run tests with sanitizers
...
...
@@ -320,7 +320,7 @@ jobs:
shell
:
bash
run
:
|
export PATH=/opt/R-devel/bin/:${PATH}
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl',
'rmarkdown',
'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr',
'markdown',
'Matrix', 'RhpcBLASctl', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
sh build-cran-package.sh
R CMD check --as-cran --run-donttest lightgbm_*.tar.gz || exit -1
if grep -q -E "NOTE|WARNING|ERROR" lightgbm.Rcheck/00check.log; then
...
...
.github/workflows/static_analysis.yml
View file @
03ee9956
...
...
@@ -66,7 +66,7 @@ jobs:
-
name
:
Install packages
shell
:
bash
run
:
|
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl',
'rmarkdown',
'roxygen2', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr',
'markdown',
'Matrix', 'RhpcBLASctl', 'roxygen2', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
sh build-cran-package.sh || exit -1
R CMD INSTALL --with-keep.source lightgbm_*.tar.gz || exit -1
-
name
:
Test documentation
...
...
.vsts-ci.yml
View file @
03ee9956
...
...
@@ -309,7 +309,7 @@ jobs:
R_LIB_PATH=~/Rlib
export R_LIBS=${R_LIB_PATH}
mkdir -p ${R_LIB_PATH}
RDscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl'
, 'rmarkdown'
), lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())" || exit -1
RDscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr',
'markdown',
'Matrix', 'RhpcBLASctl'), lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())" || exit -1
sh build-cran-package.sh --r-executable=RD || exit -1
mv lightgbm_${LGB_VER}.tar.gz $(Build.ArtifactStagingDirectory)/lightgbm-${LGB_VER}-r-cran.tar.gz
displayName
:
'
Build
CRAN
R-package'
...
...
R-package/DESCRIPTION
View file @
03ee9956
...
...
@@ -46,9 +46,9 @@ Biarch: true
VignetteBuilder: knitr
Suggests:
knitr,
markdown,
processx,
RhpcBLASctl,
rmarkdown,
testthat
Depends:
R (>= 3.5)
...
...
R-package/README.md
View file @
03ee9956
...
...
@@ -428,7 +428,7 @@ docker run \
# install dependencies
RDscript${R_CUSTOMIZATION}
\
-e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl',
'rmarkdown',
'testthat'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores())"
-e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr',
'markdown',
'Matrix', 'RhpcBLASctl', 'testthat'), repos = 'https://cran.r-project.org', Ncpus = parallel::detectCores())"
# install lightgbm
sh build-cran-package.sh --r-executable=RD${R_CUSTOMIZATION}
...
...
@@ -459,7 +459,7 @@ docker run \
-it
\
wch1/r-debug
RDscriptvalgrind -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'Matrix', 'RhpcBLASctl',
'rmarkdown',
'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
RDscriptvalgrind -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr',
'markdown',
'Matrix', 'RhpcBLASctl', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
sh build-cran-package.sh
\
--r-executable=RDvalgrind
...
...
R-package/vignettes/basic_walkthrough.Rmd
View file @
03ee9956
...
...
@@ -3,10 +3,14 @@ title:
"Basic Walkthrough"
description: >
This vignette describes how to train a LightGBM model for binary classification.
output: rmarkdown::html_vignette
output:
markdown::html_format:
options:
toc: true
number_sections: true
vignette: >
%\VignetteIndexEntry{Basic Walkthrough}
%\VignetteEngine{knitr::
rmarkdown
}
%\VignetteEngine{knitr::
knitr
}
%\VignetteEncoding{UTF-8}
---
...
...
@@ -23,7 +27,7 @@ knitr::opts_chunk$set(
Welcome to the world of [LightGBM](https://lightgbm.readthedocs.io/en/latest/), a highly efficient gradient boosting implementation (Ke et al. 2017).
```{r
setup
}
```{r}
library(lightgbm)
```
...
...
docs/env.yml
View file @
03ee9956
...
...
@@ -9,9 +9,9 @@ dependencies:
-
r-data.table=1.14.2
-
r-jsonlite=1.7.2
-
r-knitr=1.37
-
r-markdown
-
r-matrix=1.4_0
-
r-pkgdown=1.6.1
-
r-rmarkdown=2.11
-
r-roxygen2=7.2.1
-
scikit-learn
-
sphinx
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment