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

Make manual CRAN checks available to R users #29

Open
JosiahParry opened this issue Sep 2, 2023 · 7 comments
Open

Make manual CRAN checks available to R users #29

JosiahParry opened this issue Sep 2, 2023 · 7 comments

Comments

@JosiahParry
Copy link

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:

  • check for \Value tags for all .Rd files even if they are for internal documentation
  • check for examples in all .Rd files even if they are for internal documentation
  • in a release process such as devtools::release() as along the lines of Does your DESCRIPTION use single quotes for tthe name of software?
  • provide a CI for R CMD check hard to test when no suggested packages are available
  • check that no files are added or modified in the users home directory (can be part of CI or R CMD check)
@llrs
Copy link
Collaborator

llrs commented Sep 2, 2023

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:

  • It was raised in a recent meeting with Uwe Ligges as part of the R sprint. He will investigate the issue.
  • Sometimes checks are done because roxygen2 exports functions not exported. Are you sure it is not exported? This is linked to the previous point and might be reviewed.
  • This is matter of a package. I would suggest to raise an issue there. But it could be added to the automatic checks of R (and hence no longer manual).
  • It is possible to check as if suggested packages are not available by creating a new R session with only the library of the packages needed (I think there is also an environment variable to control that).
  • This is per security and usually quite easy to check: Compare files before and after building and checking the package. I am not sure if this could be tested in github actions. Probably yes as I think they just check in a system of a different user to see if there are new files.

I hope this helps.

@JosiahParry
Copy link
Author

@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
Copy link
Collaborator

llrs commented Sep 2, 2023

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
Copy link
Author

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
Copy link
Collaborator

statnmap commented Sep 4, 2023

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
Copy link

CGMossa commented Sep 4, 2023

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
Copy link
Collaborator

llrs commented Sep 5, 2023

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants