ThinkR-open / attachment

Tools to deal with dependencies in scripts, Rmd and packages
https://thinkr-open.github.io/attachment/
Other
108 stars 13 forks source link

Submit to CRAN #99

Closed statnmap closed 1 year ago

statnmap commented 1 year ago

=> Soumis le 31 mai 2023. En attente des commentaires.

Tech

statnmap commented 1 year ago

Prepare for CRAN ----

Update dependencies in DESCRIPTION

Run tests and examples - Interactive

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

autotest::autotest_package(test = TRUE)

Interface RStudio - non interactive

Check package as CRAN

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

Check content

install.packages('checkhelper', repos = 'https://thinkr-open.r-universe.dev')

the_tags <- checkhelper::find_missing_tags() # noRd, export, NULL (pkg_doc) + alias (att_to_description ok) View(the_tags)

_Check that you let the house clean after the check, examples and tests

all_files_remaining <- checkhelper::check_clean_userspace() # Ce qui reste c'est dans tmpdir(), et donc plutôt OK all_files_remaining

Check spelling

usethis::use_spell_check()

spelling::spell_check_package() # juste regarder s'il y a des typos

Check URL are correct - No redirection

install.packages('urlchecker', repos = 'https://r-lib.r-universe.dev')

urlchecker::url_check() urlchecker::url_update() # corrige les redirections (a voir si le badge du readme est redirigé)

Check as cran

checkhelper::check_as_cran()

check on other distributions

devtools::check_rhub()

buildpath <- devtools::build() rhub::platforms() rhub::check_on_windows(check_args = "--force-multiarch", show_status = FALSE, path = buildpath) rhub::check_on_solaris(show_status = FALSE, path = buildpath) rhub::check(platform = "debian-clang-devel", show_status = FALSE, path = buildpath) rhub::check(platform = "debian-gcc-devel", show_status = FALSE, path = buildpath) rhub::check(platform = "fedora-clang-devel", show_status = FALSE, path = buildpath) rhub::check(platform = "macos-highsierra-release-cran", show_status = FALSE, path = buildpath) rhub::check_for_cran(show_status = FALSE, path = buildpath)

_win devel

devtools::check_win_devel() devtools::check_win_release()

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

devtools::check_mac_release() # Need to follow the URL proposed to see the results

Check reverse dependencies

https://github.com/r-lib/revdepcheck

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

install.packages('revdepcheck', repos = 'https://r-lib.r-universe.dev') usethis::use_git_ignore("revdep/") usethis::use_build_ignore("revdep/")

devtools::revdep() library(revdepcheck)

In another session

id <- rstudioapi::terminalExecute("Rscript -e 'revdepcheck::revdep_check(num_workers = 4)'") rstudioapi::terminalKill(id)

See outputs

revdep_details(revdep = "pkg") revdep_summary() # table of results by package revdep_report() # in revdep/

Clean up when on CRAN

revdep_reset()

Au pire, recup les GitHub de fusen et golem, installer attachment en local: check()

=> Informer les dev des packages en question que leur package va casser sur le CRAN

=> Réaliser les modifs nécessaires

Update NEWS

Bump version manually and add list of changes

Add comments for CRAN

usethis::use_cran_comments(open = rlang::is_interactive())

Why we have \dontrun{}

Upgrade version number

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

Verify you're ready for release, and release

devtools::release()

statnmap commented 1 year ago

C'est en ligne: https://cran.r-project.org/web/packages/attachment/index.html