Skip to content

Commit

Permalink
Merge pull request #51 from hubverse-org/znk/fix-tidyselect
Browse files Browse the repository at this point in the history
fix tidyselect warnings
  • Loading branch information
annakrystalli authored Jul 25, 2024
2 parents 8f475ce + 24e2ea7 commit 1b9e98f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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")),
Expand All @@ -23,7 +23,7 @@ Imports:
arrow (>= 12.0.0),
checkmate,
cli,
dplyr,
dplyr (>= 1.1.0),
fs,
hubUtils (>= 0.1.0),
lifecycle,
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
6 changes: 3 additions & 3 deletions R/collect_zoltar.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}) |>
Expand All @@ -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,
Expand Down

0 comments on commit 1b9e98f

Please # to comment.