Skip to content

Commit

Permalink
Deprecate 'update_babette'
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Oct 27, 2023
1 parent 9d59e43 commit 694320f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 21 deletions.
18 changes: 18 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

Newest versions at top.

## babette v2.3.4 (unreleased)

### NEW FEATURES

* None

### MINOR IMPROVEMENTS

* Deprecate 'upgrade_babette', as this is against CRAN guidelines

### BUG FIXES

* None

### DEPRECATED AND DEFUNCT

* None

## babette v2.3.3 (2022-09-25)

### NEW FEATURES
Expand Down
30 changes: 12 additions & 18 deletions R/update_babette.R
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
#' Deprecated function.
#'
#' Update all babette dependencies, by installing their
#' latest versions
#' latest versions.
#'
#' See \url{https://github.com/richelbilderbeek/babetteinstall}
#' how to do this.
#' @inheritParams remotes::install_github
#' @author Giovanni Laudanno, Richèl J.C. Bilderbeek
#' @examples
#' \dontrun{
#' # Updates the babette dependencies without asking
#' }
#' beastier::remove_beaustier_folders()
#' @export
update_babette <- function(upgrade = "default") {
repo_names <- c(
"ropensci/beautier", "ropensci/tracerer", "ropensci/beastier",
"ropensci/mauricer"
stop(
"'update_babette' is deprecated, ",
"as it did not follow CRAN guidelines. ",
"",
"Tip: one can use 'babetteinstall::updateba_bette' ",
"(from 'https://github.com/richelbilderbeek/babetteinstall')"
)
for (repo_name in repo_names) {
remotes::install_github(
repo_name,
ref = "develop",
quiet = TRUE,
dependencies = TRUE,
upgrade = upgrade
)
}
}
4 changes: 1 addition & 3 deletions tests/testthat/test-update_babette.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
test_that("update in silence", {
if (!beautier::is_on_ci()) return()
update_babette()
expect_silent(update_babette())
expect_error(update_babette(), "deprecated")
})

0 comments on commit 694320f

Please sign in to comment.