Skip to content

Commit

Permalink
chore: prepare to CRAN v0.4.0
Browse files Browse the repository at this point in the history
why:
- Prepare the release (CRAN)

what:
- upgrade version
- update NEWS
- Complete README

Issue #99
  • Loading branch information
MurielleDelmotte committed May 4, 2023
1 parent e0b44b5 commit d1dde3b
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: attachment
Title: Deal with Dependencies
Version: 0.3.2
Version: 0.4.0
Authors@R: c(
person("Sébastien", "Rochette", , "[email protected]", role = c("cre", "aut"),
comment = c(ORCID = "0000-0002-1565-9313")),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# attachment 0.3.2
# attachment 0.4.0

## Breaking changes

Expand Down
9 changes: 9 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ library(attachment)

What you really want is to fill and update your description file along with the modifications of your documentation. Indeed, only the following function will really be called. Use and abuse during the development of your package !


```{r, eval=FALSE}
attachment::att_amend_desc()
```
Expand All @@ -63,6 +64,14 @@ As {pkgdown} and {covr} are not listed in any script in your package, a common c
attachment::att_amend_desc(extra.suggests = c("pkgdown", "covr"))
```

The `update.config = TRUE` parameter will save the parameters used in the call of `att_amend_desc()` to the package configuration file.

If you run `att_amend_desc()` , afterwards, directly from the console, it will use the last set of parameters executed when the configuration file was last updated.

```{r, eval=FALSE}
attachment::att_amend_desc(extra.suggests = c("pkgdown", "covr"), update.config = TRUE)
```

If you would like to add dependencies in the "Remotes" field of your DESCRIPTION file, to mimic your local installation, you will want to use:

```{r, eval=FALSE}
Expand Down
67 changes: 52 additions & 15 deletions dev/dev_history.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,32 +139,41 @@ testthat::test_dir("tests/testthat/")
# Run examples in interactive mode too
devtools::run_examples()

# Check that the state is clean after check
all_files <- checkhelper::check_clean_userspace()
all_files

# 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")
# 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`
checkhelper::find_missing_tags() # Toutes les fonctions doivent avoir soit `@noRd` soit un `@export`, (alias pour att_to_description ok)
tags
checkhelper::check_as_cran()

# _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()
spelling::spell_check_package() # juste regarder s'il y a des typos

# Check URL are correct
# remotes::install_github("r-lib/urlchecker")
# Check URL are correct - No redirection
# install.packages('urlchecker', repos = 'https://r-lib.r-universe.dev')
urlchecker::url_check()
urlchecker::url_update()
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()




# Upgrade version number
usethis::use_version(which = c("patch", "minor", "major", "dev")[2])
# check on other distributions
# _rhub
# devtools::check_rhub()
Expand Down Expand Up @@ -192,14 +201,42 @@ 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
usethis::use_cran_comments(open = rlang::is_interactive())
# Why we have `\dontrun{}`

usethis::use_git_ignore("cran-comments.md")
usethis::use_git_ignore("CRAN-SUBMISSION")
# Upgrade version number if necessary
usethis::use_version(which = c("patch", "minor", "major", "dev")[1])

# Verify you're ready for release, and release
devtools::release()

0 comments on commit d1dde3b

Please sign in to comment.