Skip to content

Commit 3914e13

Browse files
authored
Upkeep spring 2025 (#6440)
* update last upkeep field * bump required R version * replace `%>%` with `|>` * Convert some simple anonymous functions to shorthand * add ROR * bump licence year * tidy description * tidy GHA * document * exempt `cut3()` from short function form * redocument
1 parent 4330f9b commit 3914e13

25 files changed

+65
-66
lines changed

.github/workflows/test-coverage.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ jobs:
3535
clean = FALSE,
3636
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
3737
)
38+
print(cov)
3839
covr::to_cobertura(cov)
3940
shell: Rscript {0}
4041

41-
- uses: codecov/codecov-action@v4
42+
- uses: codecov/codecov-action@v5
4243
with:
43-
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
44-
file: ./cobertura.xml
45-
plugin: noop
44+
# Fail if error if not on PR, or if on PR and token is given
45+
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
46+
files: ./cobertura.xml
47+
plugins: noop
4648
disable_search: true
4749
token: ${{ secrets.CODECOV_TOKEN }}
4850

DESCRIPTION

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Authors@R: c(
2020
comment = c(ORCID = "0000-0002-9415-4582")),
2121
person("Teun", "van den Brand", role = "aut",
2222
comment = c(ORCID = "0000-0002-9335-7468")),
23-
person("Posit, PBC", role = c("cph", "fnd"))
23+
person("Posit, PBC", role = c("cph", "fnd"),
24+
comment = c(ROR = "03wc8by49"))
2425
)
2526
Description: A system for 'declaratively' creating graphics, based on "The
2627
Grammar of Graphics". You provide the data, tell 'ggplot2' how to map
@@ -30,7 +31,7 @@ License: MIT + file LICENSE
3031
URL: https://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2
3132
BugReports: https://github.com/tidyverse/ggplot2/issues
3233
Depends:
33-
R (>= 4.0)
34+
R (>= 4.1)
3435
Imports:
3536
cli,
3637
grDevices,
@@ -77,7 +78,7 @@ VignetteBuilder:
7778
knitr
7879
Config/Needs/website: ggtext, tidyr, forcats, tidyverse/tidytemplate
7980
Config/testthat/edition: 3
80-
Config/usethis/last-upkeep: 2024-10-24
81+
Config/usethis/last-upkeep: 2025-04-23
8182
Encoding: UTF-8
8283
LazyData: true
8384
Roxygen: list(markdown = TRUE)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
YEAR: 2024
1+
YEAR: 2025
22
COPYRIGHT HOLDER: ggplot2 core developer team

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
Copyright (c) 2024 ggplot2 core developer team
3+
Copyright (c) 2025 ggplot2 core developer team
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

R/annotation-logticks.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
#' a <- ggplot(msleep, aes(bodywt, brainwt)) +
4444
#' geom_point(na.rm = TRUE) +
4545
#' scale_x_log10(
46-
#' breaks = scales::trans_breaks("log10", function(x) 10^x),
46+
#' breaks = scales::trans_breaks("log10", \(x) 10^x),
4747
#' labels = scales::trans_format("log10", scales::math_format(10^.x))
4848
#' ) +
4949
#' scale_y_log10(
50-
#' breaks = scales::trans_breaks("log10", function(x) 10^x),
50+
#' breaks = scales::trans_breaks("log10", \(x) 10^x),
5151
#' labels = scales::trans_format("log10", scales::math_format(10^.x))
5252
#' ) +
5353
#' theme_bw()

R/geom-function.R

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,9 @@ GeomFunction <- ggproto("GeomFunction", GeomPath,
6565
#' geom_function(aes(colour = "t, df = 1"), fun = dt, args = list(df = 1))
6666
#'
6767
#' # Using a custom anonymous function
68-
#' base + geom_function(fun = function(x) 0.5 * exp(-abs(x)))
68+
#' base + geom_function(fun = \(x) 0.5 * exp(-abs(x)))
6969
#' # or using lambda syntax:
7070
#' # base + geom_function(fun = ~ 0.5 * exp(-abs(.x)))
71-
#' # or in R4.1.0 and above:
72-
#' # base + geom_function(fun = \(x) 0.5 * exp(-abs(x)))
7371
#' # or using a custom named function:
7472
#' # f <- function(x) 0.5 * exp(-abs(x))
7573
#' # base + geom_function(fun = f)

R/geom-histogram.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
#' # different ranges because the function will be called once per facet
133133
#' ggplot(economics_long, aes(value)) +
134134
#' facet_wrap(~variable, scales = 'free_x') +
135-
#' geom_histogram(binwidth = function(x) 2 * IQR(x) / (length(x)^(1/3)))
135+
#' geom_histogram(binwidth = \(x) 2 * IQR(x) / (length(x)^(1/3)))
136136
geom_histogram <- make_constructor(
137137
GeomBar, stat = "bin", position = "stack",
138138
# Passed to bin stat:

R/geom-map.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ NULL
5555
#'
5656
#' crimes <- data.frame(state = tolower(rownames(USArrests)), USArrests)
5757
#'
58-
#' # Equivalent to crimes %>% tidyr::pivot_longer(Murder:Rape)
58+
#' # Equivalent to crimes |> tidyr::pivot_longer(Murder:Rape)
5959
#' vars <- lapply(names(crimes)[-1], function(j) {
6060
#' data.frame(state = crimes$state, variable = j, value = crimes[[j]])
6161
#' })

R/labeller.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
#' p + facet_grid(. ~ cyl2, labeller = label_parsed)
8686
#'
8787
#' # Include optional argument in label function
88-
#' p + facet_grid(. ~ cyl, labeller = function(x) label_both(x, sep = "="))
88+
#' p + facet_grid(. ~ cyl, labeller = \(x) label_both(x, sep = "="))
8989
#' }
9090
#' @name labellers
9191
NULL

R/stat-summary-2d.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ StatSummary2d <- ggproto(
9999
#' d + stat_summary_2d()
100100
#'
101101
#' # Specifying function
102-
#' d + stat_summary_2d(fun = function(x) sum(x^2))
102+
#' d + stat_summary_2d(fun = \(x) sum(x^2))
103103
#' d + stat_summary_2d(fun = ~ sum(.x^2))
104104
#' d + stat_summary_2d(fun = var)
105105
#' d + stat_summary_2d(fun = "quantile", fun.args = list(probs = 0.1))

0 commit comments

Comments
 (0)