[R-pkg-devel] Using \donttest with R >= 4.0.0
Hello, I am a package maintainer for the package "fabisearch" which is now archived on CRAN. The package includes many examples which take a long time to run. In past versions of R, I used to simply wrap these in \donttest and the examples ran as expected. With R >= 4.0.0 however, examples wrapped in \donttest are run during R CMD check --as-cran. This causes issues with my package as it takes way too long to run the entire check for CRAN submission. I have looked across stackoverflow and other forums to see what are some possible solutions to implement. From the few that I was able to find, there were none that work. The most promising seemed to be to simply use \dontrun instead of \donttest, but this caused my package to be flagged during submission and failed the initial check. As such, I am looking for help with this matter. Now that the functionality of \donttest has changed, what is the appropriate/best way for me to keep my current examples while ensuring that during the R CMD check --as-cran process these examples are not run? Cheers, Martin [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Using \donttest with R >= 4.0.0
Hi Duncan, That's a fair point, and I think making the examples run quicker probably makes the most sense. I have bad experiences with using dontrun - my package always gets flagged. Although not ideal, it's probably better to include some very fast running examples rather than none at all. Appreciate your advice/help! Cheers, Martin On Tue, Nov 16, 2021 at 12:08 PM Duncan Murdoch wrote: > On 15/11/2021 2:30 p.m., Martin Ondrus wrote: > > Hello, > > > > I am a package maintainer for the package "fabisearch" which is now > > archived on CRAN. The package includes many examples which take a long > time > > to run. In past versions of R, I used to simply wrap these in \donttest > and > > the examples ran as expected. With R >= 4.0.0 however, examples wrapped > in > > \donttest are run during R CMD check --as-cran. This causes issues with > my > > package as it takes way too long to run the entire check for CRAN > > submission. > > > > I have looked across stackoverflow and other forums to see what are some > > possible solutions to implement. From the few that I was able to find, > > there were none that work. The most promising seemed to be to simply use > > \dontrun instead of \donttest, but this caused my package to be flagged > > during submission and failed the initial check. > > > > As such, I am looking for help with this matter. Now that the > functionality > > of \donttest has changed, what is the appropriate/best way for me to keep > > my current examples while ensuring that during the R CMD check --as-cran > > process these examples are not run? > > I'd say if you want to keep those examples, then wrap them in \dontrun, > and add other examples that execute quickly. > > Even better might be to include only the ones that execute quickly: > just like CRAN, users don't want to wait a long time for examples to > finish. > > Duncan Murdoch > [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Using \donttest with R >= 4.0.0
Hi Guido, Yes \dontrun works fine for me as well when I'm running the package check on my own, as well as the win-builder link you've sent. The problem I always run into is that when it first gets inspected by CRAN it is always flagged and I am asked to change \dontrun to \donttest, or remove \dontrun completely. I'm not sure if there is a way for me to avoid that. Best, Martin On Tue, Nov 16, 2021 at 12:56 PM Guido Schwarzer wrote: > Am 16.11.21 um 20:16 schrieb Martin Ondrus: > > > Hi Duncan, > > > > That's a fair point, and I think making the examples run quicker probably > > makes the most sense. I have bad experiences with using dontrun - my > > package always gets flagged. Although not ideal, it's probably better to > > include some very fast running examples rather than none at all. > Appreciate > > your advice/help! > > I have been using dontrun for a long time (and I am still using it) > without any real issues. Initially, I used it to get rid of runtime > notes impeding submission to CRAN. Now I am also using it for additional > features, e.g., to describe some additional analyses / figure layouts. > > I always check my packages under R-devel on > https://win-builder.r-project.org/ before submission to CRAN. If this > does not trigger any notes, the package is good to go. > > Best, Guido > > [[alternative HTML version deleted]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel