diff --git a/DESCRIPTION b/DESCRIPTION index 49bc02a102267a3b1303a93fdf505f97eae87ffa..db0c7da3757143d024ddf15b641fa32f63b85a81 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: inldata Title: Collection of Datasets for the USGS-INL Monitoring Networks -Version: 1.2.5 +Version: 1.2.6 Authors@R: c( person(given = c("Jason", "C."), family = "Fisher", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index 3093d8aa7362829adefa33ce42b5668f10b144b2..7dacf38f0f4a22941875b9f340ebfa08f9e70914 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# inldata 1.2.6 + +- Remove `full_names` argument from `write_datasets` function. +- Fix invalid file paths in the downloads vignette. + # inldata 1.2.5 - Ensure functions `assert_url` and `download_file` fail gracefully with an informative message diff --git a/R/write_datasets.R b/R/write_datasets.R index 4e2b96e4b8656960c9418d616a5339823932fb54..440b7f2ddfe275191a81c7c1113ffcb847d97038 100644 --- a/R/write_datasets.R +++ b/R/write_datasets.R @@ -36,8 +36,6 @@ #' Whether to add indentation, whitespace, and newlines to JSON output (default is `TRUE`). #' See [`prettify`][jsonlite::prettify] function for details. #' The tradeoff for human-readable output is a much larger file size. -#' @param full_names 'logical' flag. -#' Whether the full paths of the files are returned (default). #' @param quiet 'logical' flag. #' Whether to suppress printing of debugging information. #' @@ -78,7 +76,6 @@ write_datasets <- function(package, include = NULL, exclude = NULL, pretty = TRUE, - full_names = TRUE, quiet = FALSE) { # check arguments @@ -119,7 +116,6 @@ write_datasets <- function(package, null.ok = TRUE ) checkmate::assert_flag(pretty) - checkmate::assert_flag(full_names) checkmate::assert_flag(quiet) # check packages @@ -332,12 +328,6 @@ write_datasets <- function(package, } } - # express as relative path - if (!full_names) { - paths <- sprintf("^%s/", destdir) |> - sub(replacement = "", x = paths) - } - # return output paths invisible(paths) } diff --git a/man/write_datasets.Rd b/man/write_datasets.Rd index cc29bbf9ee6de5e71ac6277342521817c44f4a1c..2d51c019ec99c87f0fef7bf12e0a70c257b1b12e 100644 --- a/man/write_datasets.Rd +++ b/man/write_datasets.Rd @@ -13,7 +13,6 @@ write_datasets( include = NULL, exclude = NULL, pretty = TRUE, - full_names = TRUE, quiet = FALSE ) } @@ -51,9 +50,6 @@ Whether to add indentation, whitespace, and newlines to JSON output (default is See \code{\link[jsonlite:prettify]{prettify}} function for details. The tradeoff for human-readable output is a much larger file size.} -\item{full_names}{'logical' flag. -Whether the full paths of the files are returned (default).} - \item{quiet}{'logical' flag. Whether to suppress printing of debugging information.} } diff --git a/vignettes/download.Rmd b/vignettes/download.Rmd index 34df8f24abf59b95602a05943ebe017fc9320672..dcf04242edd103f35b203bde8a247122962bfe21 100644 --- a/vignettes/download.Rmd +++ b/vignettes/download.Rmd @@ -15,12 +15,15 @@ files <- inldata::write_datasets( package = "inldata", destdir = destdir, gzip = c("json", "geojson"), - pretty = FALSE, - full_names = FALSE -) + pretty = FALSE +) |> basename() exts <- inldata::get_file_ext(files) fmts <- exts |> unique() |> sort() -paths <- lapply(fmts, FUN = function(x) files[exts %in% x]) +paths <- lapply(fmts, + FUN = function(x) { + paste(destdir, files[exts %in% x], sep = "/") + } +) names(paths) <- fmts cols <- rbind( diff --git a/vignettes/erd.Rmd b/vignettes/erd.Rmd index 00d3bedf24ea6188697cfc4c5174487442818ffc..f45b3e1df46d605907fe058365ff24870d555e73 100644 --- a/vignettes/erd.Rmd +++ b/vignettes/erd.Rmd @@ -4,4 +4,4 @@ title: "Entity Relationship Diagram" Entity Relationship Diagram (ERD) for the **inldata** package datasets: This diagram represents the various entities (datasets) within the package and their interrelationships. Each entity is a specific dataset in the package, and the relationships depict how these datasets are interconnected based on shared attributes. This ERD provides a overview of the structure of the data within the **inldata** package, enabling efficient data organization and extraction of meaningful insights. - +<p><img src="../man/figures/erd.svg" alt="ERD" /></p> diff --git a/vignettes/parameters.Rmd b/vignettes/parameters.Rmd index fab3dfccf2144840989001b3bf2680ac421ac2a1..c9841ebe0f8ff4e368522499102200fc240c5896 100644 --- a/vignettes/parameters.Rmd +++ b/vignettes/parameters.Rmd @@ -26,7 +26,7 @@ columns <- list( header = htmltools::tags$div("Parameter name", title = "A long parameter name assigned by the USGS." ), - minWidth = 200, + minWidth = 300, sticky = "left" ),