Skip to content

Commit

Permalink
v2.0.0.9139
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
leppott committed Feb 6, 2024
1 parent 4616354 commit abb5237
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 47 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
15 changes: 13 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
BCGcalc-NEWS
================
<Erik.Leppo@tetratech.com>
2024-02-01 10:23:14.339318
2024-02-06 16:03:39.031286

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> 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)

Expand Down
15 changes: 13 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
BCGcalc-NEWS
================
<Erik.Leppo@tetratech.com>
2024-02-01 10:23:14.339318
2024-02-06 16:03:39.031286

<!-- NEWS.md is generated from NEWS.Rmd. Please edit that file -->

#> 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)

Expand Down
9 changes: 9 additions & 0 deletions NEWS.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions R/BCGcalc.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
#' #' qc.checks
#' #' ...
#'
#' @docType package
#' @name BCGcalc
#' "_PACKAGE"
NULL
2 changes: 1 addition & 1 deletion inst/shiny-examples/BCGcalc/global.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Shiny Global File

# Version ----
pkg_version <- "2.0.0.9138"
pkg_version <- "2.0.0.9139"

# Packages----
# nolint start
Expand Down
25 changes: 21 additions & 4 deletions inst/shiny-examples/BCGcalc/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
35 changes: 0 additions & 35 deletions man/BCGcalc.Rd

This file was deleted.

0 comments on commit abb5237

Please sign in to comment.