Repository navigation
[R-package] [ci] switch vignettes from 'rmarkdown' to 'markdown' - #6258
Conversation
| - r-data.table=1.14.2 | ||
| - r-jsonlite=1.7.2 | ||
| - r-knitr=1.37 | ||
| - r-markdown |
There was a problem hiding this comment.
I'm planning a follow-up PR updating the version constraints on all the conda packages we pull in in this project's CI. I'll put an constraint on r-markdown then.
For now, I think it's fine to let this float and have the conda solver figure out an appropriate version.
|
Such change also removes the need for OS dep pandoc (180mb) because markdown package does not use pandoc. |
|
Thanks! Just pushed f3ac92a removing |
|
Seems that |
|
Yes, it is a build environment that doesn't need pandoc anymore, test environment will still need it for the reason you wrote. |
This reverts commit f3ac92a.
|
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Related to #1944.
Proposes switching from
{rmarkdown}to{markdown}for the R package's vignettes.Benefits of this Change
Reduces the set of dependencies that have to build successfully to run
R CMD check --as-cranagainst{lightgbm}, leading to:{rmarkdown}this change results in 14 fewer packages needing to be installed in CI
R code I used (with R 4.2.3) to calculate that:
But what are we giving up?
My understanding is the main benefits of
{rmarkdown}over{markdown}are things that are not relevant to the simple documentation{lightgbm}produces. Things like:{markdown}, as stated in its README (https://github.com/rstudio/markdown), aims to be simpler and lighter-weight:How I tested this
Enabled this branch on readthedocs and built the docs there.
The build took 807 seconds (build link), roughly the same as other builds took over the last 7 days (build history).
Confirmed that the rendered vignette looks correct at the documentation site: https://lightgbm.readthedocs.io/en/docs-lighter-weight-vignettes/R/articles/basic_walkthrough.html.
Many of this project's R CI jobs build the vignettes and test them with
R CMD check --as-cran, so I'm confident this change wouldn't cause issues for CRAN.Confirmed all references to
{rmarkdown}have been replaced by{markdown}:Notes for Reviewers
This PR inspired by @jangorecki's post on the
r-pkg-develmailing list: https://stat.ethz.ch/pipermail/r-package-devel/2024q1/010280.html.{data.table}recently made a similar change in pursuit of reducing the weight of their dependencies.Related: