Skip to content

Commit

Permalink
v2.0.7.9034
Browse files Browse the repository at this point in the history
* refactor: Add error message for bad files in miniDOT concatenate in Shiny app
  • Loading branch information
leppott committed Oct 18, 2024
1 parent 1d62b56 commit 4471628
Show file tree
Hide file tree
Showing 10 changed files with 543 additions and 499 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ContDataQC
Title: Quality Control (QC) of Continous Monitoring Data
Version: 2.0.7.9033
Version: 2.0.7.9034
Authors@R: c(
person("Erik W", "Leppo", email="[email protected]",role=c("aut","cre")),
person("Ann","Roseberry Lincoln", role="ctb"),
Expand Down Expand Up @@ -36,11 +36,12 @@ Suggests:
StreamThermal,
XLConnect,
zip,
testthat (>= 3.0.0)
testthat (>= 3.0.0),
shinyalert
VignetteBuilder: knitr
Remotes:
tsangyp/StreamThermal,
jasonelaw/iha
StagedInstall: no
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Config/testthat/edition: 3
13 changes: 10 additions & 3 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ NEWS-ContDataQC

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

#> Last Update: 2024-06-26 15:12:12.624955
#> Last Update: 2024-10-18 09:53:59.053843

# Version History

## v2.0.7.9032
## v2.0.7.9034

2024-10-18

- refactor: Add error message for bad files in miniDOT concatenate in
Shiny app

## v2.0.7.9033

2024-06-26

Expand All @@ -29,7 +36,7 @@ NEWS-ContDataQC
- Config_Template.zip
- Config.R

## v2.0.7.9031
## v2.0.7.9032

2024-03-01

Expand Down
13 changes: 10 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ NEWS-ContDataQC

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

#> Last Update: 2024-06-26 15:12:12.624955
#> Last Update: 2024-10-18 09:53:59.053843

# Version History

## v2.0.7.9032
## v2.0.7.9034

2024-10-18

- refactor: Add error message for bad files in miniDOT concatenate in
Shiny app

## v2.0.7.9033

2024-06-26

Expand All @@ -29,7 +36,7 @@ NEWS-ContDataQC
- Config_Template.zip
- Config.R

## v2.0.7.9031
## v2.0.7.9032

2024-03-01

Expand Down
9 changes: 7 additions & 2 deletions NEWS.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ cat(paste0("Last Update: ",Sys.time()))

# Version History

## v2.0.7.9032
## v2.0.7.9034
2024-10-18

* refactor: Add error message for bad files in miniDOT concatenate in Shiny app

## v2.0.7.9033
2024-06-26

* fix: Update minidoct_cat() function to display midnight values, Issue #163
Expand All @@ -41,7 +46,7 @@ cat(paste0("Last Update: ",Sys.time()))
- Config_Template.zip
- Config.R

## v2.0.7.9031
## v2.0.7.9032
2024-03-01

* refactor: Update Shiny app
Expand Down
2 changes: 1 addition & 1 deletion inst/shiny-examples/ContDataQC/external/tab_3c_QCThresh.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function() {
# ,h4("4. Download custom thresholds file")
,sidebarLayout(
sidebarPanel(#width = 5
# , style = "position:fixed"#;width:22%"
# , style = "position:fixed"#;width:22%"
h4("1. Select Parameter")
,selectInput(inputId = "QC_Param_Input"
, label = NULL
Expand Down
3 changes: 2 additions & 1 deletion inst/shiny-examples/ContDataQC/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ library(zoo)
library(shinythemes)
library(zip)
library(shinyjs)
library(shinyalert)

###For downloading new versions of ContDataQC and USGS' DataRetrieval package
#library(devtools)
Expand All @@ -22,7 +23,7 @@ library(shinyjs)
# Sys.setenv(PATH = paste(Sys.getenv("PATH"), "C:\\Rtools\\bin", sep = ";"))

# Version Number
version <- "2.0.7.9033"
version <- "2.0.7.9034"

#Maximum individual file size that can be uploaded is 70 MB
options(shiny.maxRequestSize = 70 * 1024^2)
Expand Down
2 changes: 1 addition & 1 deletion inst/shiny-examples/ContDataQC/rmd/App_1b_TestData.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ if(boo_DEBUG==TRUE){
}## IF ~ boo_DEBUG ~ END
```

## Test files
Below are test files that you can download and run through the Shiny app. They are from Onset HOBO U20 water level loggers (non-vented pressure transducers) and miniDOT DO sensors. Please contact us if you have example files from other sensors that you would like us to add to this website.

# Test files
* [Onset HOBO U20](TestData_HOBOU20_20220822.zip) [ZIP]
* [miniDOT DO](TestData_miniDOT.zip) [ZIP]

Expand Down
23 changes: 23 additions & 0 deletions inst/shiny-examples/ContDataQC/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,29 @@ shinyServer(function(input, output, session) {
#Creates a data.frame for the R console output of the ContDataQC() script
console$disp <- data.frame(consoleOutput = character())

# check files for import errors
# popup with issues
# minidot_cat_warn <- FALSE
# tryCatch({result <- read.delim(list.files("miniDOT_cat", full.names = TRUE)[2])}
# , )
for (f in list.files(file.path("miniDOT_cat"), full.names = TRUE)) {
tryCatch({
df_test <- read.delim(f, stringsAsFactors = FALSE)
}, error = function(e) {
# pop up here OR log file name and delete, at end pop up with bad files
# end process with pop up
msg <- "'INDEX_NAME' column name is missing!"
shinyalert::shinyalert(title = "Bad file!"
, text = basename(f)
, type = "error"
, closeOnEsc = TRUE
, closeOnClickOutside = TRUE)
validate(msg)
})## tryCatch
}## f ~ check files



withProgress(message = paste("Running, runProcess_miniDOT_reformat"), value = 0, {

#A short pause before the operation begins
Expand Down
964 changes: 482 additions & 482 deletions inst/shiny-examples/ContDataQC/ui.R

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@



<div id="test-files" class="section level2">
<h2>Test files</h2>
<p>Below are test files that you can download and run through the Shiny
app. They are from Onset HOBO U20 water level loggers (non-vented
pressure transducers) and miniDOT DO sensors. Please contact us if you
have example files from other sensors that you would like us to add to
this website.</p>
<div id="test-files" class="section level1">
<h1>Test files</h1>
<ul>
<li><a href="TestData_HOBOU20_20220822.zip">Onset HOBO U20</a>
[ZIP]</li>
<li><a href="TestData_miniDOT.zip">miniDOT DO</a> [ZIP]</li>
</ul>
</div>
<div id="onset-hobo" class="section level2">
<h2>Onset HOBO</h2>
<p>The Onset HOBO U20 test data consist of two comma-separated values
Expand Down Expand Up @@ -60,4 +61,3 @@ <h2>miniDOT DO Sensors</h2>
data (edit if needed).</p></li>
</ul>
</div>
</div>

0 comments on commit 4471628

Please sign in to comment.