diff --git a/DESCRIPTION b/DESCRIPTION index 93b9297..60c2107 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: StreamCatTools Type: Package Title: 'StreamCatTools' -Version: 0.9.0 +Version: 0.9.1 Authors@R: c(person(given = "Marc", family = "Weber", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index cf71fa4..dfbce09 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,8 +1,14 @@ +# StreamCatTools 0.9.1 + +- Handles a web service being down in testing using `testthat::skip_on_cran()` +- Converts most vignettes to articles and adds one new `Start Here` vignette + # StreamCatTools 0.9.0 -- Addresses CRAN error generated by tests that is -- Adds tryCatch handling for functions calling web services in order to fail - gracefully and not produce errors -- Adds documentation to vignettes for two new functions added to the package + +- Addresses CRAN error generated by tests that is +- Adds tryCatch handling for functions calling web services in order to fail + gracefully and not produce errors +- Adds documentation to vignettes for two new functions added to the package # StreamCatTools 0.8.0 diff --git a/R/sc_get_params.R b/R/sc_get_params.R index 2941822..afcf51e 100644 --- a/R/sc_get_params.R +++ b/R/sc_get_params.R @@ -179,7 +179,6 @@ sc_get_metric_names <- function(category = NULL, filters <- list(INDICATOR_CATEGORY = category, AOI = aoi, YEAR = year, DSNAME = dataset) - filter_data <- function(data, filters) { # Filter the data frame for each non-null filter filtered_data <- purrr::reduce( @@ -197,14 +196,17 @@ sc_get_metric_names <- function(category = NULL, ) return(filtered_data) } - results <- filter_data(resp, filters) - names_keep <- c("INDICATOR_CATEGORY", "METRIC_NAME", "AOI", "YEAR", - "WEBTOOL_NAME", "METRIC_DESCRIPTION", - "METRIC_UNITS", "SOURCE_NAME", "DSNAME") - results <- results[, names_keep, drop = FALSE] - names_new <- c("Category", "Metric", "AOI", "Year", "Short_Name", - "Metric_Description", "Units", "Source", "Dataset") - names(results) <- names_new + if (exists('resp') & !is.null(resp)){ + results <- filter_data(resp, filters) + names_keep <- c("INDICATOR_CATEGORY", "METRIC_NAME", "AOI", "YEAR", + "WEBTOOL_NAME", "METRIC_DESCRIPTION", + "METRIC_UNITS", "SOURCE_NAME", "DSNAME") + results <- results[, names_keep, drop = FALSE] + names_new <- c("Category", "Metric", "AOI", "Year", "Short_Name", + "Metric_Description", "Units", "Source", "Dataset") + names(results) <- names_new + } else + results <- 'the service appears to be down currently' return(results) } diff --git a/_pkgdown.yml b/_pkgdown.yml index 5af4906..cd7863d 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -5,6 +5,7 @@ articles: - title: Articles navbar: ~ contents: - - Introduction - - LakeCat - - Applications + - StartHere + - Articles/Introduction + - Articles/LakeCat + - Articles/Applications \ No newline at end of file diff --git a/cran-comments.md b/cran-comments.md index 499faf5..a7fb6bb 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,10 +1,14 @@ -This is a minor update that: - -- Addresses CRAN error noted by Dr. Brian Ripley generated by tests that is - required to be fixed by 10/25/25 -- Adds tryCatch handling for functions calling web services in order to fail - gracefully and not produce errors -- Adds documentation to vignettes for two new functions added to the package +This is a patch update that: + +- Handles a web service being down in testing using `testthat::skip_on_cran()` +- Handles a web service being down in vignettes by converting most vignettes to + articles and leaving just one `Start Here` vignette +- Due to the lapse in government funding in federal agencies in the US, + the web service StreamCatTools is built around may be down for some time +- Because of the lapse in government funding in federal agencies in the US, I + may not be able to respond readily to any CRAN emails to my government + email account weber.marc@epa.gov but my personal email is mweber36@gmail.com + ------- @@ -14,19 +18,9 @@ This is a resubmission. ## R CMD check results -Here is the output from `devtools::check()` on R Version 4.4.1, +Here is the output from `devtools::check()` on R Version R version 4.5.0, devtools version 2.4.6, and Windows 11 x64 operating system -0 errors ✔ | 0 warnings ✔ | 2 notes ✖ - -R CMD check succeeded - -NOTES: - -checking installed package size ... NOTE - installed size is 5.0Mb - sub-directories of 1Mb or more: - doc 4.4Mb +Duration: 2m 20.4s -checking for future file timestamps ... NOTE - unable to verify current time +0 errors ✔ | 0 warnings ✔ | 0 notes ✔ diff --git a/docs/404.html b/docs/404.html index f2da380..451d7fb 100644 --- a/docs/404.html +++ b/docs/404.html @@ -13,8 +13,8 @@ - - + + @@ -26,7 +26,7 @@ StreamCatTools - 0.9.0 + 0.9.1 diff --git a/docs/LICENSE.html b/docs/LICENSE.html index ab8e00d..c9e4e34 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -1,5 +1,5 @@ -CC0 1.0 Universal • StreamCatTools +CC0 1.0 Universal • StreamCatTools Skip to contents @@ -7,7 +7,7 @@ StreamCatTools - 0.9.0 + 0.9.1 -