diff --git a/DESCRIPTION b/DESCRIPTION index 579c4ac..73ccf46 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: attachment Title: Deal with Dependencies -Version: 0.4.0.9001 +Version: 0.4.1 Authors@R: c( person("Sébastien", "Rochette", , "sebastien@thinkr.fr", role = c("cre", "aut"), comment = c(ORCID = "0000-0002-1565-9313")), @@ -32,6 +32,7 @@ Config/testthat/edition: 3 Encoding: UTF-8 Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.0 +Language: en-US Depends: R (>= 3.4) Imports: @@ -52,4 +53,3 @@ Suggests: renv (>= 0.8.4), rstudioapi, testthat (>= 3.0.0) -Language: en-US diff --git a/NEWS.md b/NEWS.md index 0fa751f..dc36722 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# attachment 0.4.0.9001 +# attachment 0.4.1 ## Bug fixes diff --git a/R/att_from_rmds.R b/R/att_from_rmds.R index fb26c47..dc4e2e9 100644 --- a/R/att_from_rmds.R +++ b/R/att_from_rmds.R @@ -82,7 +82,7 @@ att_from_rmd <- function(path, temp_dir = tempdir(), warn = -1, #' @inheritParams att_from_rmd #' #' @return Character vector of packages called with library or require. -#' {knitr} and {rmarkdown} are added by default to allow building the vignettes +#' \emph{knitr} and \emph{rmarkdown} are added by default to allow building the vignettes #' if the directory contains "vignettes" in the path #' #' @examples diff --git a/R/create_renv.R b/R/create_renv.R index 7d878e8..b9447dc 100644 --- a/R/create_renv.R +++ b/R/create_renv.R @@ -6,14 +6,14 @@ extra_dev_pkg <- c( "pkgdown" ) -#' Create reproducible environments for your R projects with {renv} +#' Create reproducible environments for your R projects with \emph{renv} #' #' @description #' `r lifecycle::badge("experimental")` #' #' Tool to create and maintain renv.lock files. #' The idea is to have 2 distinct files, one for development and the other for deployment. -#' Indeed, although packages like {attachment} or {pkgload} must be installed to develop, +#' Indeed, although packages like \emph{attachment} or \emph{pkgload} must be installed to develop, #' they are not necessary in your project, package or Shiny application. #' #' diff --git a/dev/.gitignore b/dev/.gitignore index 8c17928..32c92d7 100644 --- a/dev/.gitignore +++ b/dev/.gitignore @@ -1,3 +1,3 @@ - *.html *.R +dev_history_PREPARE_FOR_CRAN.md diff --git a/dev/dev_history.R b/dev/dev_history.R index 6782209..4bf5d73 100644 --- a/dev/dev_history.R +++ b/dev/dev_history.R @@ -102,6 +102,7 @@ attachment::dependencies_file_text(field = c("Depends", "Imports", "Suggests")) usethis::use_vignette("fill-pkg-description") # Checks +# remotes::install_github("r-lib/devtools") devtools::build_vignettes() devtools::check() @@ -129,119 +130,32 @@ tools:::.check_packages_used_in_tests(dir = ".", testdir = "tests/testthat") # Checks for CRAN release ---- -## Prepare for CRAN ---- +## Copy the latest version of PREPARE_FOR_CRAN ---- -# Check package coverage -covr::package_coverage() -covr::report() +url <- "https://raw.githubusercontent.com/ThinkR-open/prepare-for-cran/master/README.md" +destination <- "dev/dev_history_PREPARE_FOR_CRAN.md" +download.file(url, destfile = destination, mode = "wb") -# _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() - -# Check package as CRAN -rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran")) -# devtools::check(args = c("--no-manual", "--as-cran")) - -# Check content -# install.packages('checkhelper', repos = 'https://thinkr-open.r-universe.dev') -tags <- - checkhelper::find_missing_tags() # Toutes les fonctions doivent avoir soit `@noRd` soit un `@export`, (alias pour att_to_description ok) -tags - -# _Check that you let the house clean after the check, examples and tests -all_files <- checkhelper::check_clean_userspace() # ok si ce qui reste c'est dans tmpdir() -all_files - - -# 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 - - -# Check as cran: -# probleme rencontre: cf https://github.com/ThinkR-open/checkhelper/issues/79 -withr::with_options(list(repos = c(CRAN = "https://cran.rstudio.com")), - {callr::default_repos() - checkhelper::check_as_cran() }) -checkhelper::check_as_cran() - - - - -# check on other distributions -# _rhub -# 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() - -# Si cela ne fonctionne pas : recuperer les GitHub des packages dependant de attachment (fusen et golem), installer attachment en local et check() - -# Update NEWS -# Bump version manually and add list of changes - -# Upgrade version number -usethis::use_version(which = c("patch", "minor", "major", "dev")[2]) - -# Add comments for CRAN -# Need to .gitignore this file +line <- grep(pattern = "# Prepare for CRAN ----", readLines(destination)) +rstudioapi::navigateToFile(destination, line = line) + +### Run the automated tests + +## {attachment} specificity : ---- + +### An alias for `att_to_description` -> ok + +### If `Check reverse dependencies` doesn't work`with `revdep_check()`: +### retrieve the GitHub files of the {attachment}-dependent packages (checkhelper, fusen and golem), +### install attachment locally and check(). + +## BEFORE RELEASE: ---- + +### Add comments for CRAN +### Need to .gitignore this file usethis::use_cran_comments(open = rlang::is_interactive()) -# Why we have `\dontrun{}` +### Why we have `\dontrun{}` usethis::use_git_ignore("cran-comments.md") usethis::use_git_ignore("CRAN-SUBMISSION") -# Verify you're ready for release, and release -devtools::release() diff --git a/man/att_from_rmds.Rd b/man/att_from_rmds.Rd index 426c506..470d679 100644 --- a/man/att_from_rmds.Rd +++ b/man/att_from_rmds.Rd @@ -39,7 +39,7 @@ in case this must be executed in an external R session} } \value{ Character vector of packages called with library or require. -{knitr} and {rmarkdown} are added by default to allow building the vignettes +\emph{knitr} and \emph{rmarkdown} are added by default to allow building the vignettes if the directory contains "vignettes" in the path } \description{ diff --git a/man/attachment-package.Rd b/man/attachment-package.Rd index 5c11039..f2a2f28 100644 --- a/man/attachment-package.Rd +++ b/man/attachment-package.Rd @@ -20,12 +20,12 @@ Useful links: } \author{ -\strong{Maintainer}: Sébastien Rochette \email{sebastien@thinkr.fr} (\href{https://orcid.org/0000-0002-1565-9313}{ORCID}) +\strong{Maintainer}: Murielle Delmotte \email{murielle@thinkr.fr} (\href{https://orcid.org/0000-0002-1339-2424}{ORCID}) Authors: \itemize{ + \item Sébastien Rochette \email{sebastien@thinkr.fr} (\href{https://orcid.org/0000-0002-1565-9313}{ORCID}) \item Vincent Guyader \email{vincent@thinkr.fr} (\href{https://orcid.org/0000-0003-0671-9270}{ORCID}) (previous maintainer) - \item Murielle Delmotte \email{murielle@thinkr.fr} (\href{https://orcid.org/0000-0002-1339-2424}{ORCID}) \item Swann Floc'hlay \email{swann@thinkr.fr} (\href{https://orcid.org/0000-0003-1477-830X}{ORCID}) } diff --git a/man/create_renv_for_dev.Rd b/man/create_renv_for_dev.Rd index cb97a68..6c63fa7 100644 --- a/man/create_renv_for_dev.Rd +++ b/man/create_renv_for_dev.Rd @@ -3,7 +3,7 @@ \name{create_renv_for_dev} \alias{create_renv_for_dev} \alias{create_renv_for_prod} -\title{Create reproducible environments for your R projects with {renv}} +\title{Create reproducible environments for your R projects with \emph{renv}} \usage{ create_renv_for_dev( path = ".", @@ -57,7 +57,7 @@ a renv.lock file Tool to create and maintain renv.lock files. The idea is to have 2 distinct files, one for development and the other for deployment. -Indeed, although packages like {attachment} or {pkgload} must be installed to develop, +Indeed, although packages like \emph{attachment} or \emph{pkgload} must be installed to develop, they are not necessary in your project, package or Shiny application. } \examples{