Skip to content

Commit

Permalink
Update superseded
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Jan 28, 2024
1 parent 272672d commit ad39592
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 57 deletions.
30 changes: 15 additions & 15 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -134,21 +134,6 @@ references:
orcid: https://orcid.org/0000-0002-9415-4582
year: '2024'
version: '>= 3.3.0'
- type: software
title: lifecycle
abstract: 'lifecycle: Manage the Life Cycle of your Package Functions'
notes: Imports
url: https://lifecycle.r-lib.org/
repository: https://CRAN.R-project.org/package=lifecycle
authors:
- family-names: Henry
given-names: Lionel
email: lionel@posit.co
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
orcid: https://orcid.org/0000-0003-4757-117X
year: '2024'
- type: software
title: readr
abstract: 'readr: Read Rectangular Text Data'
Expand Down Expand Up @@ -240,6 +225,21 @@ references:
email: xie@yihui.name
orcid: https://orcid.org/0000-0003-0645-5666
year: '2024'
- type: software
title: lifecycle
abstract: 'lifecycle: Manage the Life Cycle of your Package Functions'
notes: Suggests
url: https://lifecycle.r-lib.org/
repository: https://CRAN.R-project.org/package=lifecycle
authors:
- family-names: Henry
given-names: Lionel
email: lionel@posit.co
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
orcid: https://orcid.org/0000-0003-4757-117X
year: '2024'
- type: software
title: rmarkdown
abstract: 'rmarkdown: Dynamic Documents for R'
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ Depends:
Imports:
dplyr (>= 0.7.0),
ggplot2 (>= 3.3.0),
lifecycle,
readr (>= 1.0.0),
scales (>= 1.1.0),
tibble (>= 3.0.0),
tidyr,
utils
Suggests:
knitr,
lifecycle,
rmarkdown,
testthat (>= 3.0.0)
VignetteBuilder:
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ importFrom(ggplot2,element_text)
importFrom(ggplot2,margin)
importFrom(ggplot2,rel)
importFrom(ggplot2,unit)
importFrom(lifecycle,deprecated)
importFrom(utils,download.file)
importFrom(utils,read.csv2)
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Mostly changes on the color functions:

- `bde_vivid_pal()` and `bde_rose_pal()` have been deprecated. Use the new
- `bde_vivid_pal()` and `bde_rose_pal()` have been superseded. Use the new
function `bde_palettes()` instead.
- `scale_color_bde_d()` and friends leverage now on `bde_palettes()`, and
these functions gain two new arguments: `alpha` y `rev`.
Expand Down
29 changes: 18 additions & 11 deletions R/deprecated.R → R/superseded.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#' BdE superseeded palettes
#' BdE superseded palettes
#'
#' @description
#' `r lifecycle::badge('deprecated')` See [bde_palettes()]
#' `r lifecycle::badge('superseded')`
#'
#' These functions have been superseded, see [bde_palettes()] as a replacement.
#'
#' Custom palettes based on the publications of BdE.
#'
#'
#' @return A palette of colors.
Expand All @@ -22,10 +26,12 @@
#' # BdE rose pal
#' scales::show_col(bde_rose_pal()(6), labels = FALSE)
bde_vivid_pal <- function(...) {
lifecycle::deprecate_warn(
"0.3.4", "bde_vivid_pal()",
"bde_palettes()"
)
if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
"0.3.5", "bde_vivid_pal()",
"bde_palettes()"
)
}

pal <- c("#4180C2", "#D86E7B", "#F89E63", "#5FBD6A", "#62C8D0", "#AC8771")
return(scales::manual_pal(pal))
Expand All @@ -35,11 +41,12 @@ bde_vivid_pal <- function(...) {
#' @keywords internal
#' @export
bde_rose_pal <- function(...) {
lifecycle::deprecate_warn(
"0.3.4", "bde_rose_pal()",
"bde_palettes()"
)

if (requireNamespace("lifecycle", quietly = TRUE)) {
lifecycle::deprecate_soft(
"0.3.5", "bde_rose_pal()",
"bde_palettes()"
)
}
pal <- c("#b7365c", "#cb6e8a", "#db9aad", "#0a50a1", "#5385bd", "#89AEDA")
return(scales::manual_pal(pal))
}
5 changes: 0 additions & 5 deletions R/tidyBdE-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

# The following block is used by usethis to automatically manage
# roxygen namespace tags. Modify with care!
## usethis namespace: start
#' @importFrom lifecycle deprecated
## usethis namespace: end
NULL

# import stuffs
#' @importFrom utils download.file read.csv2
#' @importFrom ggplot2 unit element_rect element_text element_blank element_line
Expand Down
34 changes: 17 additions & 17 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "lifecycle",
"name": "lifecycle",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=lifecycle"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
Expand Down Expand Up @@ -121,18 +133,6 @@
"sameAs": "https://CRAN.R-project.org/package=ggplot2"
},
"4": {
"@type": "SoftwareApplication",
"identifier": "lifecycle",
"name": "lifecycle",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=lifecycle"
},
"5": {
"@type": "SoftwareApplication",
"identifier": "readr",
"name": "readr",
Expand All @@ -145,7 +145,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=readr"
},
"6": {
"5": {
"@type": "SoftwareApplication",
"identifier": "scales",
"name": "scales",
Expand All @@ -158,7 +158,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=scales"
},
"7": {
"6": {
"@type": "SoftwareApplication",
"identifier": "tibble",
"name": "tibble",
Expand All @@ -171,7 +171,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=tibble"
},
"8": {
"7": {
"@type": "SoftwareApplication",
"identifier": "tidyr",
"name": "tidyr",
Expand All @@ -183,7 +183,7 @@
},
"sameAs": "https://CRAN.R-project.org/package=tidyr"
},
"9": {
"8": {
"@type": "SoftwareApplication",
"identifier": "utils",
"name": "utils"
Expand All @@ -192,7 +192,7 @@
},
"applicationCategory": "Macroeconomics",
"isPartOf": "https://ropenspain.es/",
"fileSize": "273.699KB",
"fileSize": "273.717KB",
"citation": [
{
"@type": "SoftwareSourceCode",
Expand Down
1 change: 0 additions & 1 deletion inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ rOS
rect
secuencial
serie
superseeded
tibble
tidyr
tidyverse
10 changes: 7 additions & 3 deletions man/bde_pals.Rd

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

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
vpal <- bde_vivid_pal()(3)
Condition
Warning:
`bde_vivid_pal()` was deprecated in tidyBdE 0.3.4.
`bde_vivid_pal()` was deprecated in tidyBdE 0.3.5.
i Please use `bde_palettes()` instead.

# bde_rose_pal
Expand All @@ -13,6 +13,6 @@
vpal <- bde_rose_pal()(4)
Condition
Warning:
`bde_rose_pal()` was deprecated in tidyBdE 0.3.4.
`bde_rose_pal()` was deprecated in tidyBdE 0.3.5.
i Please use `bde_palettes()` instead.

File renamed without changes.

0 comments on commit ad39592

Please sign in to comment.