Skip to content

Commit 7aebd44

Browse files
committed
Advance deprecations
1 parent 721a1bb commit 7aebd44

File tree

9 files changed

+14
-280
lines changed

9 files changed

+14
-280
lines changed

β€ŽNAMESPACEβ€Ž

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export(edit_rstudio_prefs)
3333
export(edit_rstudio_snippets)
3434
export(edit_template)
3535
export(gh_token_help)
36-
export(git_branch_default)
3736
export(git_default_branch)
3837
export(git_default_branch_configure)
3938
export(git_default_branch_rediscover)
@@ -125,11 +124,6 @@ export(use_git_protocol)
125124
export(use_git_remote)
126125
export(use_github)
127126
export(use_github_action)
128-
export(use_github_action_check_full)
129-
export(use_github_action_check_release)
130-
export(use_github_action_check_standard)
131-
export(use_github_action_pr_commands)
132-
export(use_github_actions)
133127
export(use_github_actions_badge)
134128
export(use_github_file)
135129
export(use_github_labels)
@@ -170,7 +164,6 @@ export(use_reprex)
170164
export(use_revdep)
171165
export(use_rmarkdown_template)
172166
export(use_roxygen_md)
173-
export(use_rscloud_badge)
174167
export(use_rstudio)
175168
export(use_rstudio_preferences)
176169
export(use_spell_check)
@@ -184,7 +177,6 @@ export(use_tidy_coc)
184177
export(use_tidy_contributing)
185178
export(use_tidy_dependencies)
186179
export(use_tidy_description)
187-
export(use_tidy_eval)
188180
export(use_tidy_github)
189181
export(use_tidy_github_actions)
190182
export(use_tidy_github_labels)

β€ŽNEWS.mdβ€Ž

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@
2727
usethis's `create_*()` functions, such as opening the newly created project in
2828
your IDE (#1891, @focardozom).
2929

30+
* Several deprecated functions have been removed:
31+
- `use_rscloud_badge()`, deprecated in v2.2.0; use `use_posit_cloud_badge()`
32+
instead
33+
- `git_branch_default()`, deprecated in v2.1.0; use `git_default_branch()`
34+
instead
35+
- `use_tidy_eval()`, deprecated in v2.2.0; no longer necessary
36+
- `use_github_actions()` and `use_github_action_check_release()`, deprecated
37+
in v.2.2.0; use `use_github_action('check-release')` instead
38+
- `use_github_action_check_standard()`, deprecated in v2.2.0; use
39+
`use_github_action('check-standard')` instead
40+
- `use_github_action_pr_commands()`, deprecated in v2.2.0
41+
- `use_github_action_check_full()`, deprecated in v2.1.0
42+
3043
# usethis 3.1.0
3144

3245
* `use_vignette()` and `use_article()` support Quarto. The `name` of the new

β€ŽR/usethis-deprecated.Rβ€Ž

Lines changed: 0 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,8 @@
1-
#' Deprecated Git functions
2-
#'
3-
#' @description
4-
#' `r lifecycle::badge("deprecated")`
5-
#'
6-
#' `git_branch_default()` has been replaced by [git_default_branch()].
7-
#'
8-
#' @keywords internal
9-
#' @export
10-
git_branch_default <- function() {
11-
lifecycle::deprecate_warn(
12-
"2.1.0",
13-
"git_branch_default()",
14-
"git_default_branch()"
15-
)
16-
git_default_branch()
17-
}
18-
19-
#' Deprecated badge function
20-
#'
21-
#' @description
22-
#' `r lifecycle::badge("deprecated")`
23-
#'
24-
#' `use_rscloud_badge()` has been replaced by [use_posit_cloud_badge()].
25-
#'
26-
#' @keywords internal
27-
#' @export
28-
use_rscloud_badge <- function(url) {
29-
lifecycle::deprecate_stop(
30-
"2.2.0",
31-
"use_rscloud_badge()",
32-
"use_posit_cloud_badge()"
33-
)
34-
}
35-
361
#' Deprecated tidyverse functions
372
#'
383
#' @description
394
#' `r lifecycle::badge("deprecated")`
405
#'
41-
#' * `use_tidy_eval()` is deprecated because there's no longer a need to
42-
#' systematically import and re-export a large number of functions in order
43-
#' to use tidy evaluation. Instead, use [use_import_from()] to tactically
44-
#' import functions as you need them.
456
#' * `use_tidy_style()` is deprecated because tidyverse packages are moving
467
#' towards the use of [Air](https://posit-dev.github.io/air/) for formatting.
478
#' See [use_air()] for how to start using Air. To continue using the styler
@@ -51,20 +12,6 @@ use_rscloud_badge <- function(url) {
5112
#' @name tidy-deprecated
5213
NULL
5314

54-
#' @export
55-
#' @rdname tidy-deprecated
56-
use_tidy_eval <- function() {
57-
lifecycle::deprecate_stop(
58-
"2.2.0",
59-
"use_tidy_eval()",
60-
details = c(
61-
"There is no longer a need to systematically import and/or re-export functions",
62-
"Instead import functions as needed, with e.g.:",
63-
'usethis::use_import_from("rlang", c(".data", ".env"))'
64-
)
65-
)
66-
}
67-
6815
#' @export
6916
#' @rdname tidy-deprecated
7017
use_tidy_style <- function(strict = TRUE) {
@@ -78,124 +25,3 @@ use_tidy_style <- function(strict = TRUE) {
7825
)
7926
)
8027
}
81-
82-
# GitHub actions --------------------------------------------------------------
83-
84-
#' Deprecated GitHub Actions functions
85-
#'
86-
#' @description
87-
#' `r lifecycle::badge("deprecated")`
88-
#'
89-
#' * `use_github_actions()` is deprecated because it was just an alias
90-
#' for [use_github_action_check_release()].
91-
#'
92-
#' * `use_github_action_check_full()` is overkill for most packages and is
93-
#' not recommended.
94-
#'
95-
#' * `use_github_action_check_release()`, `use_github_action_check_standard()`,
96-
#' and `use_github_action_pr_commands()` are deprecated in favor of
97-
#' [use_github_action()], which can now suggest specific workflows to use.
98-
#'
99-
#' @export
100-
#' @keywords internal
101-
use_github_actions <- function() {
102-
lifecycle::deprecate_warn(
103-
when = "2.2.0",
104-
what = "use_github_actions()",
105-
with = "use_github_action('check-release')"
106-
)
107-
use_github_action('check-release')
108-
}
109-
110-
#' @rdname use_github_actions
111-
#' @export
112-
use_github_action_check_release <- function(
113-
save_as = "R-CMD-check.yaml",
114-
ref = NULL,
115-
ignore = TRUE,
116-
open = FALSE
117-
) {
118-
lifecycle::deprecate_warn(
119-
when = "2.2.0",
120-
what = "use_github_action_check_release()",
121-
with = "use_github_action('check-release')"
122-
)
123-
124-
use_github_action(
125-
"check-release.yaml",
126-
ref = ref,
127-
save_as = save_as,
128-
ignore = ignore,
129-
open = open
130-
)
131-
use_github_actions_badge(save_as)
132-
}
133-
134-
#' @rdname use_github_actions
135-
#' @export
136-
use_github_action_check_standard <- function(
137-
save_as = "R-CMD-check.yaml",
138-
ref = NULL,
139-
ignore = TRUE,
140-
open = FALSE
141-
) {
142-
lifecycle::deprecate_warn(
143-
when = "2.2.0",
144-
what = "use_github_action_check_standard()",
145-
with = "use_github_action('check-standard')"
146-
)
147-
148-
use_github_action(
149-
"check-standard.yaml",
150-
ref = ref,
151-
save_as = save_as,
152-
ignore = ignore,
153-
open = open
154-
)
155-
use_github_actions_badge(save_as)
156-
}
157-
158-
#' @rdname use_github_actions
159-
#' @export
160-
use_github_action_pr_commands <- function(
161-
save_as = "pr-commands.yaml",
162-
ref = NULL,
163-
ignore = TRUE,
164-
open = FALSE
165-
) {
166-
lifecycle::deprecate_warn(
167-
when = "2.2.0",
168-
what = "use_github_action_pr_commands()",
169-
with = "use_github_action('pr-commands')"
170-
)
171-
172-
use_github_action(
173-
"pr-commands.yaml",
174-
ref = ref,
175-
save_as = save_as,
176-
ignore = ignore,
177-
open = open
178-
)
179-
}
180-
181-
#' @rdname use_github_actions
182-
#' @export
183-
use_github_action_check_full <- function(
184-
save_as = "R-CMD-check.yaml",
185-
ignore = TRUE,
186-
open = FALSE,
187-
repo_spec = NULL
188-
) {
189-
details <- glue(
190-
"
191-
It is overkill for the vast majority of R packages.
192-
The \"check-full\" workflow is among those configured by \\
193-
`use_tidy_github_actions()`.
194-
If you really want it, request it by name with `use_github_action()`."
195-
)
196-
lifecycle::deprecate_stop(
197-
"2.1.0",
198-
"use_github_action_check_full()",
199-
details = details
200-
)
201-
}

β€Ž_pkgdown.ymlβ€Ž

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,7 @@ reference:
157157
- use_rstudio_preferences
158158
- title: Deprecated functions
159159
contents:
160-
- git_branch_default
161-
- use_github_actions
162-
- use_tidy_eval
160+
- use_tidy_style
163161

164162
articles:
165163
- title: Basics

β€Žman/git_branch_default.Rdβ€Ž

Lines changed: 0 additions & 14 deletions
This file was deleted.

β€Žman/tidy-deprecated.Rdβ€Ž

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žman/use_github_actions.Rdβ€Ž

Lines changed: 0 additions & 53 deletions
This file was deleted.

β€Žman/use_rscloud_badge.Rdβ€Ž

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
test_that("use_tidy_eval() is deprecated", {
2-
skip_if_not_installed("roxygen2")
3-
4-
pkg <- create_local_package()
5-
expect_snapshot(use_tidy_eval(), error = TRUE)
6-
})
7-
81
test_that("use_tidy_style() is deprecated", {
92
expect_snapshot(use_tidy_style())
103
})

0 commit comments

Comments
Β (0)