From 7d10477e2dc132d8f8596fb834e9ba50b1189777 Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Fri, 14 Nov 2025 16:17:50 +0100 Subject: [PATCH 1/5] prepare cran v1.6.0 --- DESCRIPTION | 2 +- NEWS.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6f57a01..5f51aa2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: nflplotR Title: NFL Logo Plots in 'ggplot2' and 'gt' -Version: 1.5.0.9003 +Version: 1.6.0 Authors@R: person("Sebastian", "Carl", , "mrcaseb@gmail.com", role = c("aut", "cre")) Description: A set of functions to visualize National Football League diff --git a/NEWS.md b/NEWS.md index 5ac0fef..ccaa025 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# nflplotR (development version) +# nflplotR 1.6.0 * Added new experimental function `gt_pct_bar()`. A helper that adds filled percentage bars to 'gt' table to add context to values. (#76, #77) * Changed css styling of images in package documentation by CRAN request. (#90) @@ -10,7 +10,7 @@ * The theme elements `element_nfl_logo()` and `element_nfl_wordmark()` now clean team abbreviations by calling `nflreadr::clean_team_abbrs()` and insert empty grobs for mismatches. * All geoms and theme elements will print more informative warnings about team abbreviation, or player ID mismatches. * The gt logo rendering functions now add alt text for accessibility and to silence an annoying pkgdown warning. (#69) -* nflplotR now requires R 4.1 because magick needs this R version. This also follows the [Tidyverse R version support rules](https://www.tidyverse.org/blog/2019/04/r-version-support/). (#71) +* nflplotR now requires R 4.1 because magick needs this R version. This also follows the [Tidyverse R version support rules](https://tidyverse.org/blog/2019/04/r-version-support/). (#71) # nflplotR 1.4.0 From fd29606d2680eab23932d2725b8a041cd2bd3de1 Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Fri, 14 Nov 2025 16:30:25 +0100 Subject: [PATCH 2/5] fail nicely if load_teams fails --- R/nfl_team_factors.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/nfl_team_factors.R b/R/nfl_team_factors.R index 63f5d9d..ddc3b18 100644 --- a/R/nfl_team_factors.R +++ b/R/nfl_team_factors.R @@ -66,7 +66,11 @@ nfl_team_factor <- function(teams, ...) { n_args <- rlang::dots_n(...) # load nflreadr teams and make it a data.table - nfl_teams <- data.table::setDT(nflreadr::load_teams()) + nfl_teams <- try(data.table::setDT(nflreadr::load_teams()), silent = TRUE) + if (nrow(nfl_teams) == 0L) { + cli::cli_alert_warning("Failed to download team info. Will return teams data.") + return(teams) + } div_split <- data.table::tstrsplit(nfl_teams$team_division, " ") nfl_teams$team_division_rev <- paste(div_split[[2]], div_split[[1]]) From bf02fecf6caf26be69dccf5197355ff1a89431e1 Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Fri, 14 Nov 2025 16:30:38 +0100 Subject: [PATCH 3/5] no need to check mac remotely --- R/utils.R | 1 - 1 file changed, 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index d6c20c4..ab43263 100644 --- a/R/utils.R +++ b/R/utils.R @@ -94,7 +94,6 @@ NULL # nocov start release_bullets <- function() { c( - '`devtools::check_mac_release()`', '`nflfastR:::my_rhub_check()`', '`pkgdown::check_pkgdown()`', '`nflfastR:::nflverse_thanks()`', From 8cd292240cbdbf15b0b2949b26a850586786d21c Mon Sep 17 00:00:00 2001 From: mrcaseb Date: Fri, 14 Nov 2025 16:54:18 +0100 Subject: [PATCH 4/5] comments and submission file --- CRAN-SUBMISSION | 3 +++ cran-comments.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 CRAN-SUBMISSION diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION new file mode 100644 index 0000000..216f599 --- /dev/null +++ b/CRAN-SUBMISSION @@ -0,0 +1,3 @@ +Version: 1.6.0 +Date: 2025-11-14 15:54:04 UTC +SHA: bf02fecf6caf26be69dccf5197355ff1a89431e1 diff --git a/cran-comments.md b/cran-comments.md index 227d6f1..6c209e9 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,6 @@ ## Submission -This is a minor release that makes nflplotR compatible with ggplot2 v4 and now fully transitioned its internals to ggpath v1.1.0 +This is a minor release that fixes an issue with images in Rd files (requested by CRAN) and introduces a new experimental feature. ## R CMD check results From e0211e7d80882d264fabcdda847e15d8afcaf20a Mon Sep 17 00:00:00 2001 From: mrcaseb <38586519+mrcaseb@users.noreply.github.com> Date: Fri, 14 Nov 2025 16:56:42 +0100 Subject: [PATCH 5/5] Update R/nfl_team_factors.R Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- R/nfl_team_factors.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/nfl_team_factors.R b/R/nfl_team_factors.R index ddc3b18..40d4693 100644 --- a/R/nfl_team_factors.R +++ b/R/nfl_team_factors.R @@ -68,7 +68,9 @@ nfl_team_factor <- function(teams, ...) { # load nflreadr teams and make it a data.table nfl_teams <- try(data.table::setDT(nflreadr::load_teams()), silent = TRUE) if (nrow(nfl_teams) == 0L) { - cli::cli_alert_warning("Failed to download team info. Will return teams data.") + cli::cli_alert_warning( + "Failed to download team info. Will return teams data." + ) return(teams) } div_split <- data.table::tstrsplit(nfl_teams$team_division, " ")