RConsortium / r-repositories-wg

RC Working Group on Repositories
37 stars 8 forks source link

Make manual CRAN checks available to R users #29

Open JosiahParry opened 1 year ago

JosiahParry commented 1 year ago

One of the things that I find personally quite frustrating when submiting a packge to CRAN is failing to meet the requirements of some manual checks while passing R CMD check on 5+ OS using CI. Many of these things are documented in https://github.com/DavisVaughan/extrachecks. Many of them are classics and some feel newer. Some things can be caught using automation but others can be incorporated into a release process like devtools::release().

For example:

llrs commented 1 year ago

The thing with the manual checks it that they are done at the discretion of the CRAN maintainer. Each one maintains a different machine so all manuals checks are not done in all platforms or done equally per all the CRAN team.

About your points, as you said some could be detected by tools like devtools::release, I would raise an issue there if you want it to be addressed:

I hope this helps.

JosiahParry commented 1 year ago

@llrs Thanks! To be clear, though, I was not asking for guidance but rather indicating that there are many manual checks that CRAN does that can be made available to R users which would make the process of publishing packages far easier.

Requiring each R package developer to figure out how to build infrastructure to test these things is quite a lot and it can lead to using the CRAN submission like an alternate version of CI which is undesirable for both the R developer and the CRAN team.

llrs commented 1 year ago

Are you aware of the check system that CRAN provides for windows and MacOS? But point taken, I'll see if I can propose those to be added in R CMD check

JosiahParry commented 1 year ago

If it is outside of R CMD check and standard CI, then no. From my perspective, R CMD check should provide all of the the requisite checks needed to publish a package.

statnmap commented 1 year ago

I agree. In the meantime, complementary to {extrachecks}, we have a list of CRAN checks listed in this repository: https://github.com/ThinkR-open/prepare-for-cran
Also, I try to automate some of these checks in {checkhelper}, which I recently sent to CRAN: https://thinkr-open.github.io/checkhelper/

CGMossa commented 1 year ago

While many of you might not have noticed this, latex and pdflatex is a requirement to simply run R CMD check. There is no way to opt out of it. Iterating over package development and the status of certain checks, depends on one of the most bloated and heavy pieces of binary(trash) known to man.

I'd like some attention to be paid to the wasteful nature of these checks, when we are not able to surgically run them, and fix them.

llrs commented 1 year ago

When I check the dependencies of R I don't see pdflatex and I can run R CMD check @CGMossa. If you don't like pdflatex I think you can use other LaTeX distribtutions and perhaps use more tiny distributions like tinytex :

bash-completion
bison
debhelper-compat (= 11)
default-jdk
g++ (>= 4:4.9.2-2)
gcc (>= 4:4.9.2-2)
gfortran (>= 4:4.9.2-2)
groff-base
libblas-dev
libbz2-dev
libcairo2-dev
libcurl4-dev
libcurl4-openssl-dev
libjpeg-dev
liblapack-dev
liblzma-dev
libncurses5-dev
libpango1.0-dev
libpcre2-dev
libpcre3-dev
libpng-dev
libreadline-dev
libtiff5-dev
libx11-dev
libxt-dev
mpack
tcl8.6-dev
texinfo (>= 4.1-2)
texlive-base
texlive-extra-utils
texlive-fonts-extra
texlive-fonts-recommended
texlive-latex-base
texlive-latex-extra
texlive-latex-recommended
texlive-plain-generic
tk8.6-dev
x11proto-core-dev
xauth
xdg-utils
xfonts-base
xvfb
zlib1g-dev

If your comment is more about the need to check the pdfs of the packages, I think you can disable the dependency to LaTeX via --no-manual if the help pages are only rendered as html and the vignettes too. I haven't checked it, and I'm not sure if it is possible.
There are several ways to iterate the package development and maintenance process, but perhaps more flexibility could also be encouraged in base R...