Closed mjskay closed 5 years ago
I've set this up and it seems to be working. Although build 3 is crashing because I am getting some warnings which are being treated as errors. I am not quite sure how to fix those?
Yeah, the easiest thing to do is to test it locally using devtools::check()
or devtools::check(remote = TRUE)
and fix all those errors before trying to fix the errors on travis (hopefully all those errors are the same, in which case you don't have to go through a loop of pushing to github and waiting on travis).
If you look on travis under the "checking package" section and scan for things that say NOTE, WARNING, or ERROR you should be able to find the problems:
Then it's a matter of looking at the Writing R extensions documentation, Hadley Wickham's R package book, or google and trying to fix stuff.
You've got a couple of NOTEs there about nonstandard files, which should either be added to .Rbuildignore or moved elsewhere (for the .pdf and Rmd files I would say to move them elsewhere --- they really shouldn't be in the root folder)
For packages used but not declared, that means you need to add some @imports or @importFrom tags
For errors about things that are called but not defined, the package check tries to find situations where you are using names or functions that it can't find. Often this is because of the use of non-standard evaluation, where the names being specified don't exist in the package environment. This is the case for the error about "." not being defined, for example, because I assume you are using it in a pipe call. For that you need to include a call to globalVariables
listing the names of the relevant variables; this will exclude those names from the check.
The error about undocumented code objects should be self explanatory (add some documentation to those functions).
The error about files in the vignettes dir is possibly a couple of things. One, you probably need this in the DESCRIPTION file:
VignetteBuilder: knitr
You also probably shouldn't have the built versions of the vignettes in that folder (the .html files). I'm not sure where the .png file should go (you might want to google where to put images for inclusion in vignettes, there's probably a specific place for them).
I thought the notes were giving errors as well, but turns out they are not. I am still getting a couple notes, and I'll fix them. But I'll close this issue once we merge this dev branch to the master branch for now
Yeah that's sensible, it's fine to wait on fixing NOTEs until it's time to submit to CRAN.
See here:
https://docs.travis-ci.com/user/languages/r/
This will help with package errors. My typical workflow is that I do dev on the
dev
branch and only merge intomaster
whendev
passes on travis (this prevents me from accidentally putting code onmaster
that breaks on other people's machines)