Skip to content

Commit

Permalink
Merge pull request #53 from hubverse-org/hotfix/zoltr-dep
Browse files Browse the repository at this point in the history
  • Loading branch information
annakrystalli authored Aug 1, 2024
2 parents 4f79c69 + 4cf529b commit 33ac27c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
3 changes: 1 addition & 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.2.0
Version: 1.2.1
Authors@R:
c(person("Anna", "Krystalli", , "annakrystalli@googlemail.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-2378-4915")),
Expand Down Expand Up @@ -48,7 +48,6 @@ Suggests:
testthat (>= 3.2.0)
Remotes:
hubverse-org/hubUtils,
reichlab/zoltr,
apache/arrow/r@apache-arrow-15.0.2
Config/Needs/website: hubverse-org/hubStyle
Depends:
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.2.1

* Removed dependency on development version of `zoltr` package.
* Fixed minor error in `connect_hub()` article.

# hubData 1.2.0

* Adds a `skip_checks` parameter to the `connect_hub` and `connect_model_output` functions. When `skip_checks` is set to `TRUE`, these functions will bypass the default behavior of scanning the hub's model output directory for invalid files. Omitting these checks results in better performance when connecting to cloud-based hubs but can result in errors when querying the data. This option is only valid when connecting to hubs that meet the following criteria:
Expand Down
14 changes: 8 additions & 6 deletions R/connect_hub.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@
#' `admin.json` and is ignored by default.
#' If supplied, it will override hub configuration setting. Multiple formats can
#' be supplied to `connect_hub` but only a single file format can be supplied to `connect_mod_out`.
#' @param skip_checks Logical. If `FALSE` (default), check file_format parameter against the
#' hub's model output files. Also excludes invalid model output files when opening hub datasets.
#' Setting to `TRUE`` will improve performance but will result in an error if the model output
#' directory includes invalid files. Cannot be `TRUE` when there are multiple file formats in
#' the hub's model output directory or when the hub's model output directory contains files that
#' are not model output data (for example, a README).
#' @param skip_checks Logical. If `FALSE` (default), check `file_format` parameter
#' against the hub's model output files. Also excludes invalid model output files
#' when opening hub datasets.
#' Setting to `TRUE` will improve performance but will result in an error if
#' the model output directory includes invalid files. **Cannot be `TRUE`** when
#' there are **multiple file formats** in the hub's model output directory or when
#' the hub's model output directory contains **files that are not model output
#' data** (for example, a README).
#' @inheritParams create_hub_schema
#'
#' @return
Expand Down
12 changes: 8 additions & 4 deletions man/connect_hub.Rd

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

2 changes: 1 addition & 1 deletion vignettes/articles/connect_hub.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ Like `connect_hub`, `connect_model_output` has an optional `skip_checks` argumen

```{r}
mod_out_dir_cloud <- s3_bucket("hubverse/hubutils/testhubs/parquet/model-output/")
mod_out_con_cloud <- connect_hub(mod_out_dir_cloud, file_format = "parquet", skip_checks = TRUE)
mod_out_con_cloud <- connect_model_output(mod_out_dir_cloud, file_format = "parquet", skip_checks = TRUE)
mod_out_con_cloud
```

Expand Down

0 comments on commit 33ac27c

Please # to comment.