Skip to content
Kelli Johnson edited this page Jul 15, 2020 · 5 revisions

A checklist of important things to do before submitting to CRAN based on thoughts by Kamil Wais. For complete instructions see the recommendations from Hadley.

  • Update
    • Software
      • Update R
      • Update all associated packages
    • Files
      • .\R\ss3sim.R
      • .rbuildignore
      • .rinstignore
      • README.md
      • LICENSE
      • NEWS.md: categorize points into major changes, minor changes, bug fixes
      • DESCRIPTION: increment Version field (major.minor.patch.dev), add new contributors
      • cran-comments.md: explain ERRORs, WARNINGs, NOTEs; use tools::package_dependencies("ss3sim", reverse = TRUE) to find any downstream dependencies; update what builds were done prior to submitting; use_cran_comments(open = rlang::is_interactive()) to generate an initial file
  • Check code
    • Deprecate old functions and arguments with .Deprecated()
    • If devtools functions do not work use: tools::dependsOnPkgs()
    • Use utils::globalVariables() in the package R file
    • Import undefined globals
    • spelling::spell_check_package(".")
    • goodpractice::gp()
    • devtools::check()
  • Vignettes
    • devtools::build(vignettes = TRUE)
    • install.packages(“../packageName_....tar.gz”, repos = NULL, type = “source”)
    • browseVignettes(“packageName”)
  • Check
    • devtools::check(env_vars = c(NOT_CRAN = "false"))
    • if error regarding qpdf missing, then
      • View(Sys.getenv(“PATH”))
      • Sys.which(Sys.getenv(“R_QPDF”, “qpdf”))
    • devtools::check_win_release()
    • devtools::check_win_devel()
  • Build configuration for R devel and release versions
language: R
cache: packages
warnings_are_errors: true
sudo: required
r:
  - release
  - devel 
  • Use devtools::check(cleanup = FALSE, args = c('--as-cran')).
  • Github
    • Remove dependencies on github packages by using CRAN versions
    • ignore bin folder by adding ^inst/bin/.*$ to .Rbuildignore
    • Push all necessary commits to GitHub
    • Ensure master is the most up-to-date branch
  • Submit
    • Use devtools::release(check = TRUE)
    • Confirm submission via link in the email
  • Resubmission
    • Check results of submission in all CRAN checks (from http://cran.r-project.org/web/packages)
    • Check results in comments inside the e-mail from CRAN
    • Fix what needs to be fixed
    • Consider increasing version number
    • Check everything again.
    • Add Resubmission section at the top of cran-comments.md
    ## Resubmission
    This is a resubmission. In this version I have
    
    • Push changes to GitHub repo.
    • Resubmit to CRAN using devtools::submit_cran().
  • Success
    • Create a new release with tag version on GitHub repo
    • Copy and paste the contents of the relevant NEWS.md section into the release notes
    • Increment the version of the package in the DESCRIPTION file (to X.X.X.9000)
    • Change DESCRIPTION to depend on github packages and remove script in .Rbuildignore to ignore bin folder