diff --git a/DESCRIPTION b/DESCRIPTION index ee78079..c9d2212 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: BCGcalc Type: Package Title: Biological Condition Gradient, calculator -Version: 2.0.0.9138 +Version: 2.0.0.9139 Authors@R: c( person("Erik W.", "Leppo", email="Erik.Leppo@tetratech.com", role=c("aut","cre")), person("Jen", "Stamp", email="Jen.Stamp@tetratech.com", role="ctb"), diff --git a/NEWS b/NEWS index d051e23..2d5fa70 100644 --- a/NEWS +++ b/NEWS @@ -1,11 +1,22 @@ BCGcalc-NEWS ================ -2024-02-01 10:23:14.339318 +2024-02-06 16:03:39.031286 - #> Last Update: 2024-02-01 10:23:14.673873 + #> Last Update: 2024-02-06 16:03:39.067839 + +# BCGcalc 2.0.0.9139 (2024-02-06) + +- refactor: Shiny app file builder generate class parameters, Issue \#89 + - Add shinyalert for more than 500 records + - `nhdplustools` and `StreamCatTools` timeout issues with too many + records +- fix: Shiny app calculation of BioMonTools::metric.scores, + leppott/BioMonTools#103 + - Affected BDI calculation, checked and no other instances +- fix: Update package documenation per roxygen2 (since 7.0.0) # BCGcalc 2.0.0.9138 (2024-02-01) diff --git a/NEWS.md b/NEWS.md index d051e23..2d5fa70 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,11 +1,22 @@ BCGcalc-NEWS ================ -2024-02-01 10:23:14.339318 +2024-02-06 16:03:39.031286 - #> Last Update: 2024-02-01 10:23:14.673873 + #> Last Update: 2024-02-06 16:03:39.067839 + +# BCGcalc 2.0.0.9139 (2024-02-06) + +- refactor: Shiny app file builder generate class parameters, Issue \#89 + - Add shinyalert for more than 500 records + - `nhdplustools` and `StreamCatTools` timeout issues with too many + records +- fix: Shiny app calculation of BioMonTools::metric.scores, + leppott/BioMonTools#103 + - Affected BDI calculation, checked and no other instances +- fix: Update package documenation per roxygen2 (since 7.0.0) # BCGcalc 2.0.0.9138 (2024-02-01) diff --git a/NEWS.rmd b/NEWS.rmd index 4e7003e..a102fb6 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -21,6 +21,15 @@ knitr::opts_chunk$set( cat(paste0("Last Update: ",Sys.time())) ``` +# BCGcalc 2.0.0.9139 (2024-02-06) + +* refactor: Shiny app file builder generate class parameters, Issue #89 + + Add shinyalert for more than 500 records + + `nhdplustools` and `StreamCatTools` timeout issues with too many records +* fix: Shiny app calculation of BioMonTools::metric.scores, leppott/BioMonTools#103 + + Affected BDI calculation, checked and no other instances +* fix: Update package documenation per roxygen2 (since 7.0.0) + # BCGcalc 2.0.0.9138 (2024-02-01) * fix: Shiny app fuzzy model not working, change community reference diff --git a/R/BCGcalc.R b/R/BCGcalc.R index 95cffa6..fb46f4c 100644 --- a/R/BCGcalc.R +++ b/R/BCGcalc.R @@ -7,6 +7,5 @@ #' #' qc.checks #' #' ... #' -#' @docType package -#' @name BCGcalc +#' "_PACKAGE" NULL \ No newline at end of file diff --git a/inst/shiny-examples/BCGcalc/global.R b/inst/shiny-examples/BCGcalc/global.R index 6327212..a0d56ca 100644 --- a/inst/shiny-examples/BCGcalc/global.R +++ b/inst/shiny-examples/BCGcalc/global.R @@ -1,7 +1,7 @@ # Shiny Global File # Version ---- -pkg_version <- "2.0.0.9138" +pkg_version <- "2.0.0.9139" # Packages---- # nolint start diff --git a/inst/shiny-examples/BCGcalc/server.R b/inst/shiny-examples/BCGcalc/server.R index 37309f0..9b50a41 100644 --- a/inst/shiny-examples/BCGcalc/server.R +++ b/inst/shiny-examples/BCGcalc/server.R @@ -1055,6 +1055,23 @@ shinyServer(function(input, output) { names(df_sites)[boo_dup] <- names_old[boo_dup] }## IF ~ boo_dup + # File Size + nrow_sites <- nrow(df_sites) + if (nrow_sites > 500) { + # end process with pop up + msg <- paste0("More than 500 sites will cause a timeout on downloading NHD+ and StreamCat data." + , "Your file has " + , nrow_sites + , " records." + ) + shinyalert::shinyalert(title = "Generate Index Class Parameters" + , text = msg + , type = "error" + , closeOnEsc = TRUE + , closeOnClickOutside = TRUE) + # validate(msg) + }## IF ~ nrow_sites + ## Calc, 03, Run Function, StreamCat ---- prog_detail <- "Stream Cat; COMID and elev" message(paste0("\n", prog_detail)) @@ -2264,7 +2281,7 @@ shinyServer(function(input, output) { }## IF ~ input$ExclTaxa - + ## Calc, 3, BCG Flag Cols ---- # get columns from Flags (non-metrics) to carry through prog_detail <- "Calculate, Keep BCG Model Columns" @@ -2333,7 +2350,7 @@ shinyServer(function(input, output) { dn_metval <- path_results_sub pn_metval <- file.path(dn_metval, fn_metval) write.csv(df_metval, pn_metval, row.names = FALSE) - + ## Save Results (BCG) ---- # Munge ## Model and QC Flag metrics only @@ -2478,7 +2495,7 @@ shinyServer(function(input, output) { dn_levflags <- path_results_sub pn_levflags <- file.path(dn_levflags, fn_levflags) write.csv(df_lev_flags_summ, pn_levflags, row.names = TRUE) - + # Save, Results fn_results <- paste0("_", fn_abr_save, "RESULTS.csv") dn_results <- path_results_sub @@ -4110,7 +4127,7 @@ shinyServer(function(input, output) { df_metric_scores_bugs <- metric.scores(DF_Metrics = df_metric_values_bugs , col_MetricNames = myMetrics.Bugs , col_IndexName = "INDEX_NAME" - , col_IndexRegion = "INDEX_CLASS" + , col_IndexClass = "INDEX_CLASS" , DF_Thresh_Metric = df_thresh_metric , DF_Thresh_Index = df_thresh_index) diff --git a/man/BCGcalc.Rd b/man/BCGcalc.Rd deleted file mode 100644 index 8091157..0000000 --- a/man/BCGcalc.Rd +++ /dev/null @@ -1,35 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/BCGcalc.R -\docType{package} -\name{BCGcalc} -\alias{BCGcalc-package} -\alias{BCGcalc} -\title{BCGcalc: Metric calculation and other tasks related to BCG} -\description{ -Enables users to employ various tools and calculations related -to BCG. -} -\section{BCGcal functions}{ - -#' qc.checks -#' ... -} - -\seealso{ -Useful links: -\itemize{ - \item \url{https://github.com/leppott/BCGcalc} - \item Report bugs at \url{https://github.com/leppott/BCGcalc/issues} -} - -} -\author{ -\strong{Maintainer}: Erik W. Leppo \email{Erik.Leppo@tetratech.com} - -Other contributors: -\itemize{ - \item Jen Stamp \email{Jen.Stamp@tetratech.com} [contributor] - \item Matt Hedin \email{Matt.Hedin@tetratech.com} [contributor] -} - -}