Skip to content

Commit

Permalink
Merge pull request #110 from ThinkR-open/cran_0_4_1
Browse files Browse the repository at this point in the history
chore: bump version 0.4.1
  • Loading branch information
MurielleDelmotte authored Jan 22, 2024
2 parents a4a3b8e + 720b094 commit f9bacdc
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 121 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", role = c("cre", "aut"),
comment = c(ORCID = "0000-0002-1565-9313")),
Expand Down Expand Up @@ -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:
Expand All @@ -52,4 +53,3 @@ Suggests:
renv (>= 0.8.4),
rstudioapi,
testthat (>= 3.0.0)
Language: en-US
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# attachment 0.4.0.9001
# attachment 0.4.1

## Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion R/att_from_rmds.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions R/create_renv.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#'
#'
Expand Down
2 changes: 1 addition & 1 deletion dev/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

*.html
*.R
dev_history_PREPARE_FOR_CRAN.md
132 changes: 23 additions & 109 deletions dev/dev_history.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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()
2 changes: 1 addition & 1 deletion man/att_from_rmds.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/attachment-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/create_renv_for_dev.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f9bacdc

Please sign in to comment.