ThinkR-open / checkhelper

A package to help deal with devtools::check outputs
https://thinkr-open.github.io/checkhelper/
Other
34 stars 4 forks source link

chore: Check package locally 1/2 #31

Closed ArthurData closed 1 year ago

ArthurData commented 1 year ago

Critères de validation

ETQ client je peux voir que ...

Screenshot 2023-01-18 at 11 16 49 Screenshot 2023-01-18 at 11 29 54

Comment technique ?

_Check in interactive test-inflate for templates and Addins

pkgload::load_all() devtools::test() testthat::test_dir("tests/testthat/")

Test no output generated in the user files

Run examples in interactive mode too

devtools::run_examples()

PR in progress on the content of these lines

local <- utils::fileSnapshot (".", timestamp = tempfile("timestamp"), md5sum = TRUE) home <- utils::fileSnapshot ("~", timestamp = tempfile("timestamp"), md5sum = TRUE)

run tests or whatever, then ...

devtools::test() devtools::run_examples()

vignettes

dircheck <- tempfile("check") dir.create(dircheck) rcmdcheck::rcmdcheck(check_dir = dircheck)

browseURL(dircheck)

the_dir <- list.files(file.path(dircheck), pattern = ".Rcheck", full.names = TRUE)

Same tests, no new files

all(list.files(file.path(the_dir, "tests", "testthat")) %in% list.files(file.path(".", "tests", "testthat")))

devtools::build_vignettes() devtools::clean_vignettes()

utils::changedFiles(local, md5sum = TRUE) utils::changedFiles(home, md5sum = TRUE)

Check package as CRAN

rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"))

devtools::check(args = c("--no-manual", "--as-cran"))

Check content

remotes::install_github("ThinkR-open/checkhelper")

checkhelper::find_missing_tags() # Toutes les fonctions doivent avoir soit @noRd soit un @export checkhelper::check_clean_userspace(pkg = ".") checkhelper::check_as_cran()

Check spelling

usethis::use_spell_check()

spelling::spell_check_package()

Check URL are correct

remotes::install_github("r-lib/urlchecker")

urlchecker::url_check() urlchecker::url_update()

Upgrade version number

usethis::use_version(which = c("patch", "minor", "major", "dev")[2])

ArthurData commented 1 year ago

@VincentGuyader peux-tu valider ce ticket stp ?

ArthurData commented 1 year ago

Validé pendant la réunion du 18/01/2023