From bea5ccbc322336d5652a170d6e0d955fdd76c7eb Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar" Date: Wed, 24 Jul 2024 15:27:29 -0700 Subject: [PATCH 1/3] use tidyselect 1.2.0 syntax for selection operations I was running tests for this package when I saw a flood of warnings that all looked like the one at the bottom of this issue. I then saw https://github.com/hubverse-org/hubData/pull/36#discussion_r1637826949 and found the fix by looking for selecting operations and then whittling down. --- R/collect_zoltar.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/collect_zoltar.R b/R/collect_zoltar.R index a13ab99..37e6c32 100644 --- a/R/collect_zoltar.R +++ b/R/collect_zoltar.R @@ -122,7 +122,7 @@ format_to_hub_model_output <- function(forecasts, zoltar_targets_df, point_outpu split_outputs |> dplyr::mutate(output_type = "sample", hub_value = suppressWarnings(as.numeric(sample))) |> dplyr::group_by(.data$model, .data$timezero, .data$unit, .data$target) |> - dplyr::mutate(output_type_id = as.character(dplyr::row_number()), .before = .data$hub_value) |> + dplyr::mutate(output_type_id = as.character(dplyr::row_number()), .before = "hub_value") |> dplyr::ungroup() } }) |> @@ -136,8 +136,8 @@ format_to_hub_model_output <- function(forecasts, zoltar_targets_df, point_outpu hub_model_outputs[, c("model", "timezero", "season", "unit", "numeric_horizon", "hub_target", "output_type", "output_type_id", "hub_value")] |> - dplyr::rename(model_id = .data$model, horizon = .data$numeric_horizon, target = .data$hub_target, - value = .data$hub_value) + dplyr::rename(model_id = "model", horizon = "numeric_horizon", target = "hub_target", + value = "hub_value") } validate_arguments <- function(zoltar_connection, project_name, models, timezeros, units, targets, types, as_of, From c4fde361548ca4148b4812beec52950e856159aa Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar" Date: Wed, 24 Jul 2024 15:30:22 -0700 Subject: [PATCH 2/3] bump dplyr version to 1.1.0 this version sets the minimum tidyselect to 1.2.0 --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index d844505..f7f57a1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -23,7 +23,7 @@ Imports: arrow (>= 12.0.0), checkmate, cli, - dplyr, + dplyr (>= 1.1.0), fs, hubUtils (>= 0.1.0), lifecycle, From 24e2ea7c5e9ae932ae350dcab9559c880de3877a Mon Sep 17 00:00:00 2001 From: "Zhian N. Kamvar" Date: Wed, 24 Jul 2024 15:30:46 -0700 Subject: [PATCH 3/3] bump version; add NEWS --- DESCRIPTION | 2 +- NEWS.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index f7f57a1..8f4feb7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: hubData Title: Tools for accessing and working with hubverse data -Version: 1.1.0 +Version: 1.1.1 Authors@R: c(person("Anna", "Krystalli", , "annakrystalli@googlemail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-2378-4915")), diff --git a/NEWS.md b/NEWS.md index c8992a7..ac256f1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# hubData 1.1.1 + +* Fix {tidyselect} warnings by converting internal syntax +* Bump required dplyr version to 1.1.0 + # hubData 1.1.0 * Add `"from_config"` option to the `output_type_id_datatype` argument in `create_hub_schema()`, `coerce_to_hub_schema()` and `connect_hub()`. This allows users to set the hub level `output_type_id` column data type through the `tasks.json` `output_type_id_datatype` property introduced in schema version v3.0.1. (#44)