From c2138c0bd831620671b09ae0416fe93b22f1927b Mon Sep 17 00:00:00 2001 From: cristinamullin <46969696+cristinamullin@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:07:46 -0500 Subject: [PATCH 1/8] remove duplicate tests --- tests/testthat/test-Golem.R | 23 -------- tests/testthat/test-golem-recommended.R | 72 ------------------------- 2 files changed, 95 deletions(-) delete mode 100644 tests/testthat/test-golem-recommended.R diff --git a/tests/testthat/test-Golem.R b/tests/testthat/test-Golem.R index f6df14f8a..e30c6b47b 100644 --- a/tests/testthat/test-Golem.R +++ b/tests/testthat/test-Golem.R @@ -47,26 +47,3 @@ testthat::test_that( ) } ) - -# Configure this test to fit your need. -# testServer() function makes it possible to test code in server functions and modules, without needing to run the full Shiny application -# shiny::testServer(app_server, { - -# Set and test an input -# session$setInputs(x = 2) -# expect_equal(input$x, 2) - -# Example of tests you can do on the server: -# - Checking reactiveValues -# expect_equal(r$lg, 'EN') -# - Checking output -# expect_equal(output$txt, "Text") -# }) - -# Configure this test to fit your need -testthat::test_that( - "app launches", - { - golem::expect_running(sleep = 5) - } -) diff --git a/tests/testthat/test-golem-recommended.R b/tests/testthat/test-golem-recommended.R deleted file mode 100644 index b861515b4..000000000 --- a/tests/testthat/test-golem-recommended.R +++ /dev/null @@ -1,72 +0,0 @@ -test_that("app ui", { - ui <- app_ui() - golem::expect_shinytaglist(ui) - # Check that formals have not been removed - fmls <- formals(app_ui) - for (i in c("request")) { - expect_true(i %in% names(fmls)) - } -}) - -test_that("app server", { - server <- app_server - expect_type(server, "closure") - # Check that formals have not been removed - fmls <- formals(app_server) - for (i in c("input", "output", "session")) { - expect_true(i %in% names(fmls)) - } -}) - -test_that( - "app_sys works", - { - expect_true( - app_sys("golem-config.yml") != "" - ) - } -) - -test_that( - "golem-config works", - { - config_file <- app_sys("golem-config.yml") - skip_if(config_file == "") - - expect_true( - get_golem_config( - "app_prod", - config = "production" - ) - ) - expect_false( - get_golem_config( - "app_prod", - config = "dev" - ) - ) - } -) - -# Configure this test to fit your need. -# testServer() function makes it possible to test code in server functions and modules, without needing to run the full Shiny application -# testServer(app_server, { - -# Set and test an input -# session$setInputs(x = 2) -# expect_equal(input$x, 2) - -# Example of tests you can do on the server: -# - Checking reactiveValues -# expect_equal(r$lg, 'EN') -# - Checking output -# expect_equal(output$txt, "Text") -# }) - -# Configure this test to fit your need -test_that( - "app launches", - { - golem::expect_running(sleep = 5) - } -) From c5d462becb86ff63aaffd1ad45d936dbbe21d496 Mon Sep 17 00:00:00 2001 From: cristinamullin <46969696+cristinamullin@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:19:25 -0500 Subject: [PATCH 2/8] update description, email and authors --- DESCRIPTION | 17 +++++------------ dev/01_start.R | 39 ++++++++++++++++++++++++++------------- inst/golem-config.yml | 2 +- 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0af983a7e..113c06858 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,18 +3,11 @@ Type: Package Title: Water Quality Portal Data Discovery and Cleaning: First R Shiny App in the TADA (Tools for Automated Data Analysis) Series Version: 0.0.0.9000 Authors@R: c( - person(given = "U.S. Environmental Protection Agency", role = "aut"), - person(given = "Cristina", - family = "Mullin", - role = c("aut", "cre"), - email = "mullin.cristina@epa.gov", - comment = c(ORCID = "0000-0002-0615-6087")), - person(given = "Trip", - family = "Hook", - role = "aut"), - person(given = "Elise", - family = "Hinman", - role = "aut") + person("TADA Team", "U.S. Environmental Protection Agency", , "mywaterway@epa.gov", role = "aut"), + person("Cristina", "Mullin", role = c("aut", "cre"), + comment = c(ORCID = "0000-0002-0615-6087")), + person("Trip", "Hook", role = "aut"), + person("Elise", "Hinman", role = "aut") ) Description: Assists data partners in retrieving, wrangling, quality checking, and harmonizing data from the Water Quality Portal for subsequent analyses. License: CC0 diff --git a/dev/01_start.R b/dev/01_start.R index da736acd2..362709d12 100644 --- a/dev/01_start.R +++ b/dev/01_start.R @@ -20,11 +20,24 @@ ## golem::fill_desc( pkg_name = "TADAShiny", # The Name of the package containing the App - pkg_title = "TADAShiny", # The Title of the package containing the App - pkg_description = "This Shiny application is the first of the Water Quality Portal TADA (Tools for Automated Data Analysis) series.", # The Description of the package containing the App - author_first_name = "TADA Team", # Your First Name - author_last_name = "EPA", # Your Last Name - author_email = "mullin.cristina@epa.gov", # Your Email + pkg_title = "Water Quality Portal Data Discovery and Cleaning: First R Shiny App in the TADA (Tools for Automated Data Analysis) Series", # The Title of the package containing the App + pkg_description = "Assists data partners in retrieving, wrangling, quality checking, and harmonizing data from the Water Quality Portal for subsequent analyses.", # The Description of the package containing the App + authors = c( + person(given = "TADA Team", + family = "U.S. Environmental Protection Agency", + role = "aut", + email = "mywaterway@epa.gov"), + person(given = "Cristina", + family = "Mullin", + role = c("aut", "cre"), + comment = c(ORCID = "0000-0002-0615-6087")), + person(given = "Trip", + family = "Hook", + role = "aut"), + person(given = "Elise", + family = "Hinman", + role = "aut") + ), repo_url = "https://github.com/USEPA/TADAShiny" # The URL of the GitHub Repo (optional) ) @@ -33,21 +46,21 @@ golem::set_golem_options() ## Create Common Files ---- ## See ?usethis for more information -usethis::use_cc0_license() # You can set another license here -usethis::use_readme_rmd( open = FALSE ) -usethis::use_code_of_conduct("mullin.cristina@epa.gov") -usethis::use_lifecycle_badge( "Experimental" ) -usethis::use_news_md( open = FALSE ) +# usethis::use_cc0_license() # You can set another license here +# usethis::use_readme_rmd( open = FALSE ) +# usethis::use_code_of_conduct("mullin.cristina@epa.gov") +# usethis::use_lifecycle_badge( "Experimental" ) +# usethis::use_news_md( open = FALSE ) ## Use git ---- -usethis::use_git() +# usethis::use_git() ## Init Testing Infrastructure ---- ## Create a template for tests -golem::use_recommended_tests() +# golem::use_recommended_tests() ## Use Recommended Packages ---- -golem::use_recommended_deps() +# golem::use_recommended_deps() ## Favicon ---- # If you want to change the favicon (default is golem's one) diff --git a/inst/golem-config.yml b/inst/golem-config.yml index 4113da058..05b983039 100644 --- a/inst/golem-config.yml +++ b/inst/golem-config.yml @@ -5,4 +5,4 @@ default: production: app_prod: yes dev: - golem_wd: !expr here::here() + golem_wd: !expr golem::pkg_path() From 8da2da9ddeaea69f4926fef032c5404d255e37f8 Mon Sep 17 00:00:00 2001 From: cristinamullin <46969696+cristinamullin@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:20:18 -0500 Subject: [PATCH 3/8] Update 01_start.R --- dev/01_start.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/01_start.R b/dev/01_start.R index 362709d12..0fa6d3421 100644 --- a/dev/01_start.R +++ b/dev/01_start.R @@ -68,8 +68,8 @@ golem::use_favicon() # path = "path/to/ico". Can be an online file. golem::remove_favicon() ## Add helper functions ---- -golem::use_utils_ui() -golem::use_utils_server() +# golem::use_utils_ui() +# golem::use_utils_server() # You're now set! ---- From f9538f3c370e9d05b3688ef3fe4e5c278bb25918 Mon Sep 17 00:00:00 2001 From: cristinamullin <46969696+cristinamullin@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:39:00 -0500 Subject: [PATCH 4/8] update description and dev files --- DESCRIPTION | 4 +- dev/01_start.R | 4 +- dev/02_dev.R | 152 ++++++++++++++++++++++++------------------------ dev/03_deploy.R | 38 ++++++------ 4 files changed, 99 insertions(+), 99 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 113c06858..6b420d541 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,8 +3,8 @@ Type: Package Title: Water Quality Portal Data Discovery and Cleaning: First R Shiny App in the TADA (Tools for Automated Data Analysis) Series Version: 0.0.0.9000 Authors@R: c( - person("TADA Team", "U.S. Environmental Protection Agency", , "mywaterway@epa.gov", role = "aut"), - person("Cristina", "Mullin", role = c("aut", "cre"), + person("TADA Team", "U.S. Environmental Protection Agency", role = "aut"), + person("Cristina", "Mullin", , "mywaterway@epa.gov", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-0615-6087")), person("Trip", "Hook", role = "aut"), person("Elise", "Hinman", role = "aut") diff --git a/dev/01_start.R b/dev/01_start.R index 0fa6d3421..c373aea59 100644 --- a/dev/01_start.R +++ b/dev/01_start.R @@ -25,11 +25,11 @@ golem::fill_desc( authors = c( person(given = "TADA Team", family = "U.S. Environmental Protection Agency", - role = "aut", - email = "mywaterway@epa.gov"), + role = "aut"), person(given = "Cristina", family = "Mullin", role = c("aut", "cre"), + email = "mywaterway@epa.gov", comment = c(ORCID = "0000-0002-0615-6087")), person(given = "Trip", family = "Hook", diff --git a/dev/02_dev.R b/dev/02_dev.R index 67d0cf1d8..d96116aac 100644 --- a/dev/02_dev.R +++ b/dev/02_dev.R @@ -10,114 +10,114 @@ ################################### #### CURRENT FILE: DEV SCRIPT ##### ################################### -usethis::use_cc0_license() +# usethis::use_cc0_license() # Engineering ## Dependencies ---- ## Add one line by package you want to add as dependency -usethis::use_package( "thinkr" ) -usethis::use_package("shiny") -usethis::use_package("shinycssloaders") -usethis::use_package("dplyr") -usethis::use_package("xlsx") -usethis::use_package("readr") -usethis::use_pipe() -usethis::use_package("bootstrap") -usethis::use_package("stringr") -usethis::use_package("NADA") -usethis::use_package("readxl") -usethis::use_package("writexl") -usethis::use_package("DT") -usethis::use_package("EnvStats") -usethis::use_package("shinyjs") -usethis::use_package("ggplot2") -usethis::use_package("leaflet") -usethis::use_package("sf") -usethis::use_package("shinybusy") -usethis::use_package("shinyWidgets") -usethis::use_package("forcats") -usethis::use_package("TADA") -usethis::use_package("scales") -usethis::use_package("combinat") +# usethis::use_package( "thinkr" ) +# usethis::use_package("shiny") +# usethis::use_package("shinycssloaders") +# usethis::use_package("dplyr") +# usethis::use_package("xlsx") +# usethis::use_package("readr") +# usethis::use_pipe() +# usethis::use_package("bootstrap") +# usethis::use_package("stringr") +# usethis::use_package("NADA") +# usethis::use_package("readxl") +# usethis::use_package("writexl") +# usethis::use_package("DT") +# usethis::use_package("EnvStats") +# usethis::use_package("shinyjs") +# usethis::use_package("ggplot2") +# usethis::use_package("leaflet") +# usethis::use_package("sf") +# usethis::use_package("shinybusy") +# usethis::use_package("shinyWidgets") +# usethis::use_package("forcats") +# usethis::use_package("TADA") +# usethis::use_package("scales") +# usethis::use_package("combinat") ## Add modules ---- ## Create a module infrastructure in R/ -golem::add_module( name = "name_of_module1" ) # Name of the module -golem::add_module( name = "import" ) # Name of the import module -golem::add_module(name = "query_data", with_test = TRUE) # Name of the module -golem::add_module(name = "overview", with_test = TRUE) # Name of the module -golem::add_module(name = "upload_data", with_test = TRUE) # Name of the module -golem::add_module(name = "summary", with_test = TRUE) # Name of the module -golem::add_module(name = "TADA_summary") # Name of the module -golem::add_module(name = "censored_data") +# golem::add_module(name = "name_of_module1") # Name of the module +# golem::add_module(name = "import") # Name of the import module +# golem::add_module(name = "query_data", with_test = TRUE) # Name of the module +# golem::add_module(name = "overview", with_test = TRUE) # Name of the module +# golem::add_module(name = "upload_data", with_test = TRUE) # Name of the module +# golem::add_module(name = "summary", with_test = TRUE) # Name of the module +# golem::add_module(name = "TADA_summary") # Name of the module +# golem::add_module(name = "censored_data") ## Add helper functions ---- ## Creates fct_* and utils_* -golem::add_fct( "helpers" ) -golem::add_utils( "helpers" ) +# golem::add_fct( "helpers" ) +# golem::add_utils( "helpers" ) ## External resources ## Creates .js and .css files at inst/app/www -golem::add_js_file( "script" ) -golem::add_js_handler( "handlers" ) -golem::add_css_file( "custom" ) +# golem::add_js_file( "script" ) +# golem::add_js_handler( "handlers" ) +# golem::add_css_file( "custom" ) ## Add internal datasets ---- ## If you have data in your package -usethis::use_data_raw( name = "my_dataset", open = FALSE ) +# usethis::use_data_raw( name = "my_dataset", open = FALSE ) ## Tests ---- ## Add one line by test you want to create -usethis::use_test( "app" ) +# usethis::use_test( "app" ) # Documentation ## Vignette ---- -usethis::use_vignette("TADAShiny") -devtools::build_vignettes() +# usethis::use_vignette("TADAShiny") +# devtools::build_vignettes() ## Code Coverage---- ## Set the code coverage service ("codecov" or "coveralls") -usethis::use_coverage() +# usethis::use_coverage() ## CI ---- ## Use this part of the script if you need to set up a CI ## service for your application ## ## (You'll need GitHub there) - -usethis::use_github() - -# GitHub Actions -usethis::use_github_action() -# Chose one of the two -# See https://usethis.r-lib.org/reference/use_github_action.html -usethis::use_github_action_check_release() -usethis::use_github_action_check_standard() -# usethis::use_github_action_check_full() -# Add action for PR -usethis::use_github_action_pr_commands() - -# Travis CI -usethis::use_travis() -usethis::use_travis_badge() - -# AppVeyor -usethis::use_appveyor() -usethis::use_appveyor_badge() - -# Circle CI -usethis::use_circleci() -usethis::use_circleci_badge() - -# Jenkins -usethis::use_jenkins() - -# GitLab CI -usethis::use_gitlab_ci() - -# You're now set! ---- -# go to dev/03_deploy.R +# +# usethis::use_github() +# +# # GitHub Actions +# usethis::use_github_action() +# # Chose one of the two +# # See https://usethis.r-lib.org/reference/use_github_action.html +# usethis::use_github_action_check_release() +# usethis::use_github_action_check_standard() +# # usethis::use_github_action_check_full() +# # Add action for PR +# usethis::use_github_action_pr_commands() +# +# # Travis CI +# usethis::use_travis() +# usethis::use_travis_badge() +# +# # AppVeyor +# usethis::use_appveyor() +# usethis::use_appveyor_badge() +# +# # Circle CI +# usethis::use_circleci() +# usethis::use_circleci_badge() +# +# # Jenkins +# usethis::use_jenkins() +# +# # GitLab CI +# usethis::use_gitlab_ci() +# +# # You're now set! ---- +# # go to dev/03_deploy.R rstudioapi::navigateToFile("dev/03_deploy.R") diff --git a/dev/03_deploy.R b/dev/03_deploy.R index c3b39a885..d37986c95 100644 --- a/dev/03_deploy.R +++ b/dev/03_deploy.R @@ -25,22 +25,22 @@ rhub::check_for_cran() ## sent to CRAN, or to a package manager devtools::build() -## RStudio ---- -## If you want to deploy on RStudio related platforms -golem::add_rstudioconnect_file() -golem::add_shinyappsio_file() -golem::add_shinyserver_file() - -## Docker ---- -## If you want to deploy via a generic Dockerfile -golem::add_dockerfile() - -## If you want to deploy to ShinyProxy -golem::add_dockerfile_shinyproxy() - -## If you want to deploy to Heroku -golem::add_dockerfile_heroku() - -## If you want to build github pages -usethis::use_pkgdown() # run once to configure your package -pkgdown::build_site() +# ## RStudio ---- +# ## If you want to deploy on RStudio related platforms +# golem::add_rstudioconnect_file() +# golem::add_shinyappsio_file() +# golem::add_shinyserver_file() +# +# ## Docker ---- +# ## If you want to deploy via a generic Dockerfile +# golem::add_dockerfile() +# +# ## If you want to deploy to ShinyProxy +# golem::add_dockerfile_shinyproxy() +# +# ## If you want to deploy to Heroku +# golem::add_dockerfile_heroku() +# +# ## If you want to build github pages +# usethis::use_pkgdown() # run once to configure your package +# pkgdown::build_site() From 85dd2031b3b11c18a9dcedb856c9ff17fd6fe323 Mon Sep 17 00:00:00 2001 From: cristinamullin <46969696+cristinamullin@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:41:03 -0500 Subject: [PATCH 5/8] update contributing doc --- CONTRIBUTING.Rmd | 283 +++++++++++++++++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 10 -- 2 files changed, 283 insertions(+), 10 deletions(-) create mode 100644 CONTRIBUTING.Rmd delete mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.Rmd b/CONTRIBUTING.Rmd new file mode 100644 index 000000000..efeb439e2 --- /dev/null +++ b/CONTRIBUTING.Rmd @@ -0,0 +1,283 @@ +--- +title: "Contributing" +date: "`r Sys.Date()`" +output: + rmarkdown::html_vignette: + toc: true + number_sections: false +vignette: > + %\VignetteIndexEntry{Contributing} + \usepackage[utf8]{inputenc} + %\VignetteEngine{knitr::rmarkdown} +editor_options: + chunk_output_type: console + markdown: + wrap: 72 +--- + +```{r setup, include=FALSE} +library(knitr) + +knitr::opts_chunk$set( + echo = TRUE, + warning = FALSE, + message = FALSE +) +``` + +## Contribute to TADA! + +We encourage you to read this project's +[CONTRIBUTING](https://usepa.github.io/EPATADA/articles/CONTRIBUTING.html) +policy (you are here), its +[LICENSE](https://github.com/USEPA/EPATADA/blob/develop/LICENSE.md), and +its [README](https://usepa.github.io/EPATADA/). + +We're so glad you're thinking about contributing to an EPA open source +project! If you're unsure about anything, just ask --- or submit your +issue or pull request anyway. The worst that can happen is we'll +politely ask you to change something. We appreciate all friendly +contributions. + +No matter who you are, if you spot an error, omission, or bug, you're +welcome to open an issue in this repo! + +## TADA Working Group Mission + +To share and develop R code for evaluating and visualizing Water Quality +Portal (WQP) data more efficiently though collaboration and open-source +programming. This includes working together to find commonalities in +assessment processes across the nation, creating flexible tools that can +be easily customized to work within existing workflows, supporting each +other in learning R, and ensuring products will be accessible to +organizations most in need. + +## Development + +This article will walk through how to contribute to TADA via +a pull request workflow. This is also not a complete guide to R package +development (a comprehensive guide is [R +Packages](https://r-pkgs.org/)), instead this is meant as more of a +checklist for the general steps. Several references are included at the +bottom for more information on [R-package](https://r-pkgs.org/) +development and [git](https://happygitwithr.com/) workflows. + +## What is GitHub? + +GitHub is a third-party website that offers version-controlled +repositories that developers and scientists can use to collaborate on +projects (e.g., software, text, manuscripts, etc.) in real-time. GitHub +also provides social networking features that allow developers to follow +open-source projects, share code and learn how code changes are made +throughout the development process. GitHub is so named because it +utilizes the open-source version control system (VCS) known as Git. +There are multiple ways to interact with GitHub using Git. + +- Option 1: Interact with GitHub using a GUI instead of the command + line or a web browser + + - [Getting Started with GitHub + Desktop](https://docs.github.com/en/desktop/overview/getting-started-with-github-desktop) + +- Option 2: Interact with GitHub using the command line or a web + browser + + - [Setting Up Git](https://docs.github.com/en/get-started/getting-started-with-git/set-up-git) + + - [Git Basics](https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository) + + - [Comprehensive Guide: Happy Git and GitHub for the + useR](https://happygitwithr.com/ "Great and comprehensive guide for Git with an R flair") + +## Required Installations + +There are several programs that are needed before any work can begin. +With admin access to your computer, you can install all of these, +otherwise create a ticket with your IT group with the following +requests. The links provided assume a Windows computer. Adjustments +might be needed for Mac or Linux OS: + +- Recommend all three: + + - [R](https://cran.r-project.org/bin/windows/base/) + + - [RStudio](https://posit.co/download/rstudio-desktop/) + + - [Rtools](https://cran.r-project.org/bin/windows/Rtools/) + +- Download both: + + - [GitHub Desktop](https://github.com/apps/desktop) + + - [Git](https://git-scm.com/downloads) + +External Collaborators (using GitHub Desktop): + +Once you have downloaded R, RStudio, Rtools, GitHub Desktop, and Git you +will need to create a GitHub account. Open GitHub Desktop and login in +with your account. In the web browser go the main TADA page +() and click on the "Code" button. + +Select the "Open With GitHub Desktop" option. When a pop-up window +appears in GitHub Desktop, click "Clone". As you do not have write +access to the TADA repository, you will be prompted to create a fork. In +the "How are you planning to use this fork?" window you should select +"To contribute to the parent project". + +It is possible to work with EPATADA admins to gain write access as +external collaborators. This may be a better option if you plan to make +multiple or substantial contributions. It allows us all to work together +on branches more seamlessly. In this scenario, EPATADA admins should +fill out this +[form](https://forms.office.com/Pages/ResponsePage.aspx?id=s3iziEhnZ0is-Xaqy-ymp-SFBJAioqZJiIikkUGw3NhUNUtVSEVHRjZWMEFDVTNNR1NEM0lEVk5BSyQlQCN0PWcu) +to make EPA GitHub organization admins aware of the collaboration. + +To make moving between branches while working in RStudio easy, create an +R Project. Open R Studio and the file menu select "New Project". In the +New Project Wizard select "Existing Directory" and select the file path +for the local repository. Name the R Project "TADA.RProj" as this file +name is already included in the .gitignore. Now when you open TADA.RProj +the file name should match the name of the branch you have selected in +GitHub Desktop. Any changes you make in R Studio and save will be saved +to the selected branch. + +Once those have been installed, the following R packages will be needed +for R-package development work: + +```{r, eval = F} +install.packages(c("devtools", "rmarkdown")) +``` + +## Issues + +- If you see an error or have feedback, the best way to let us know is + to file an [issue](https://github.com/USEPA/EPATADA/issues). +- Issues are labeled to help indicate what they are about. For + example, we are using "Good First Issue" to indicate issues that + might be good first pickings for your first contribution to this + open-source project. +- Pull requests can be directly + [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue) + to a specific issue. If linked, the Repository Administrators can + more easily review the pull request and issue at the same time once + a contributor submits the pull request. The issue can then be closed + once the pull request is merged. + +## Branches and Pull Requests + +All new development currently happens in the **develop** branch. + +To contribute a specific change or new code, outside contributors can +[create a new +fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository), +using the **develop** branch as the source. We recommend that +contributors work from their personal fork, and on one specific "task" +at a time. When complete, you may submit a pull request to request that +your changes be merged from your fork into the TADA develop branch. +Contributors should submit separate pull requests for each "task". + +"Tasks" should be small in scope. For example, they may pertain to a bug +fix or update relevant to a single function. A single "task" may also +encompass the same changes made across many functions if needed. Another +example of a single "task" could be to make changes to all documentation +to improve clarity, for example. Furthermore, a task may include +developing a new function, or a series of related functions. In some +cases, tasks can also be synonymous with issues, and the pull requests +can be directly linked to a specific issue (in that case, the Repository +Administrators will review the pull request and issue at the same time +and the issue can be closed once the pull request is merged). + +Complete the pull request by detailing all fixes and contributions, and +tagging TADA repo admins who should review the work. For this package, +please tag cristinamullin (Cristina Mullin). Repository Administrators +will review code contributions from both internal EPA and external +collaborators and integrate code commits into source code. This is done +to ensure code stability and consistency and prevent degradation of code +performance. After review, the admin will either accept the submission, +recommend specific improvements to the submission, or in some cases +reject the submission. + +To avoid issues, developers contributing code should contact the +repository admins (Cristina Mullin) early in the development process and +maintain contact throughout to help ensure the submission is compatible +with the code base and is a robust addition. + +A few tips: + +- GitHub makes it easy to review Pull Requests for changes on each + file, and to discuss the changes if needed using comments + +- We have set up [automated + checks](https://github.com/USEPA/EPATADA/tree/develop/.github/workflows) + (using Github Actions). Any new code included in Pull Requests must + pass these checks before it can be merged into develop. These checks + will run automatically when Pull Requests are submitted, and are + ancillary to our content review, and help make sure the code is + robust. + +- We recommend to run devtools::check() often during development. + +- Be descriptive with your commits and commit descriptions, but don't + over-think it! All changes are tracked. Include comments and details + within the package code itself to describe what the code does. + +- Always pull in upstream changes from the develop branch before + adding a new commit on your branch. + +- Directly link Pull Request to Issues they address, if relevant. + +## Additional References + +- [R Packages](https://r-pkgs.org/) + +- [testthat](https://testthat.r-lib.org/) + +- [R markdown](https://r4ds.had.co.nz/r-markdown.html) + +## Open-Source Code Policy + +Effective August 8, 2016, the [OMB Mandate: M-16-21; Federal Source Code +Policy: Achieving Efficiency, Transparency, and Innovation through +Reusable and Open Source +Software](https://www.whitehouse.gov/wp-content/uploads/legacy_drupal_files/omb/memoranda/2016/m_16_21.pdf) +applies to new custom-developed code created or procured by EPA +consistent with the scope and applicability requirements of Office of +Management and Budget's (OMB's) Federal Source Code Policy. In general, +it states that all new custom-developed code by Federal Agencies should +be made available and reusable as open-source code. + +The EPA specific implementation of OMB Mandate M-16-21 is addressed in +the [System Life Cycle Management +Procedure](https://www.epa.gov/irmpoli8/policy-procedures-and-guidance-system-life-cycle-management-slcm). +EPA has chosen to use GitHub as its version control system as well as +its inventory of open-source code projects. EPA uses GitHub to inventory +its custom-developed, open-source code and generate the necessary +metadata file that is then posted to code.gov for broad reuse in +compliance with OMB Mandate M-16-21. + +If you have any questions or want to read more, check out the [EPA Open +Source Project Repo](https://github.com/USEPA/open-source-projects). + +## License + +All contributions to this project will be released under the CCO-1.0 +license file dedication. By submitting a pull request or issue, you are +agreeing to comply with this waiver of copyright interest. + +## Disclaimer + +This United States Environmental Protection Agency (EPA) GitHub project +code is provided on an "as is" basis and the user assumes responsibility +for its use. EPA has relinquished control of the information and no +longer has responsibility to protect the integrity, confidentiality, or +availability of the information. Any reference to specific commercial +products, processes, or services by service mark, trademark, +manufacturer, or otherwise, does not constitute or imply their +endorsement, recommendation or favoring by EPA. The EPA seal and logo +shall not be used in any manner to imply endorsement of any commercial +product or activity by EPA or the United States Government. + +## Contact + +If you have any questions, please reach out to the TADA Team +([mywaterway\@epa.gov](mailto:mywaterway@epa.gov){.email}). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index c41cbe1f9..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -## Welcome! - -We’re so glad you’re thinking about contributing to an EPA open source project! If you’re unsure about anything, just ask — or submit your issue or pull request anyway. The worst that can happen is we’ll politely ask you to change something. We appreciate all friendly contributions. - -We encourage you to read this project’s CONTRIBUTING policy (you are here), its -LICENSE, and its [README](https://github.com/USEPA/TADAShiny/blob/develop/README.md). - -All contributions to this project will be released under the CCO dedication. By submitting a pull request or issue, you are agreeing to comply with this waiver of copyright interest. - -If you have any questions or want to read more, check out the [EPA Open Source Project Repo](https://github.com/USEPA/open-source-projects) and [EPA's Interim Open Source Code Guidance](https://developer.epa.gov/guide/open-source-code/). \ No newline at end of file From b20075d31cb77ebd4e8da60fc54d8ef11e604f7a Mon Sep 17 00:00:00 2001 From: cristinamullin <46969696+cristinamullin@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:08:02 -0500 Subject: [PATCH 6/8] simplify flagType used for flag_prompts and flag_tests join --- inst/flag_prompts.csv | 14 ++-- inst/flag_tests.csv | 158 +++++++++++++++++++++--------------------- 2 files changed, 86 insertions(+), 86 deletions(-) diff --git a/inst/flag_prompts.csv b/inst/flag_prompts.csv index b6e0eac85..447705ae2 100644 --- a/inst/flag_prompts.csv +++ b/inst/flag_prompts.csv @@ -1,18 +1,18 @@ Order,Level,Prompt,flagType -1,Required,Result value is not numeric (text) OR result value is NA and no detection limit value is provided (see TADA.ResultMeasureValueDataTypes.Flag),Result value is not numeric or NA and no detection limit value is provided -2,Required,Result value is not numeric or NA and the detection limit value cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter [or the detection limit type is not in WQX domain tables (USGS/NWIS-specific)] (see TADA.CensoredData.Flag),Result value is not numeric or NA and the detection limit value cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter [or the detection limit type is not in WQX domain tables (USGS/NWIS-specific)] +1,Required,Result value is not numeric (text) OR result value is NA and no detection limit value is provided (see TADA.ResultMeasureValueDataTypes.Flag),Result value is not numeric or NA +2,Required,"Result value is not numeric or NA and the detection limit value is not documented, cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter, or the detection limit type is not in WQX domain tables (USGS/NWIS-specific) (see TADA.CensoredData.Flag)",Detection limit missing or not usable 3,Recommended,Suspect characteristic and speciation combination (see TADA.MethodSpeciation.Flag),Suspect characteristic and speciation combination 4,Recommended,Suspect characteristic and fraction combination (see TADA.SampleFraction.Flag),Suspect characteristic and fraction combination 5,Recommended,Suspect characteristic and unit combination (see TADA.ResultUnit.Flag),Suspect characteristic and unit combination 6,Recommended,"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank (see TADA.ActivityType.Flag)","ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank" 7,Recommended,MeasureQualifierCode indicates result value is suspect (see TADA.MeasureQualifierCode.Flag),MeasureQualifierCode indicates result value is suspect -8,Optional,Metadata indicates duplicative uploads of the same results within a single organization (see TADA.SingleOrgDup.Flag),Metadata indicates duplicative uploads of the same results within a single organization +8,Optional,Metadata indicates duplicative uploads of the same results within a single organization (see TADA.SingleOrgDup.Flag),Single org duplicates 9,Optional,Metadata indicates duplicative uploads of the same results by multiple organizations (see TADA.ResultSelectedMultipleOrgs),Metadata indicates duplicative uploads of the same results by multiple organizations 10,Optional,Uncommon or suspect characteristic and analytical method combination (see TADA.AnalyticalMethod.Flag),Uncommon or suspect characteristic and analytical method combination -11,Optional,"Quality Assurance Project Plan (QAPPApprovedIndicator) indicates ""N"" (not approved) or NA","Quality Assurance Project Plan (QAPPApprovedIndicator) indicates ""N"" (not approved) or NA" -12,Optional,Quality Assurance Project Plan (QAPP) document is not available via the ProjectFileUrl (see TADA.QAPPDocAvailable),Quality Assurance Project Plan (QAPP) document is not available via the ProjectFileUrl -13,Optional,"Result value(s) above the national threshold for a given characteristic, possibly indicating non-sensical value(s) (see TADA.ResultValueAboveUpperThreshold.Flag)","Result value(s) above the national upper threshold for a given characteristic, possibly indicating non-sensical value(s)" -14,Optional,"Result value(s) below the national threshold for a given characteristic, possibly indicating non-sensical value(s) (see TADA.ResultValueBelowLowerThreshold.Flag)","Result value(s) below the national lower threshold for a given characteristic, possibly indicating non-sensical value(s)" +11,Optional,"Quality Assurance Project Plan (QAPPApprovedIndicator) indicates ""N"" (not approved) or NA",No approved QAPP +12,Optional,Quality Assurance Project Plan (QAPP) document is not available via the ProjectFileUrl (see TADA.QAPPDocAvailable),Missing QAPP doc +13,Optional,"Result value(s) above the national threshold for a given characteristic, possibly indicating non-sensical value(s) (see TADA.ResultValueAboveUpperThreshold.Flag)",Above upper threshold +14,Optional,"Result value(s) below the national threshold for a given characteristic, possibly indicating non-sensical value(s) (see TADA.ResultValueBelowLowerThreshold.Flag)",Below lower threshold 15,Optional,Coordinates are outside of the United States (see TADA.SuspectCoordinates.Flag),Coordinates are outside of the United States 16,Optional,Coordinates are imprecise (less than three decimal digits) (see TADA.SuspectCoordinates.Flag),Coordinates are imprecise (less than three decimal digits) 17,Optional,Metadata indicates result values are less than 4 hours apart and are likely from continuous monitoring probes (sensors). Continuous data may (or may not) be suitable for integration with discrete water quality data for analyses.,Continuous results diff --git a/inst/flag_tests.csv b/inst/flag_tests.csv index b5325d5f4..04bdd5f68 100644 --- a/inst/flag_tests.csv +++ b/inst/flag_tests.csv @@ -1,79 +1,79 @@ -flagType,columnName,flagValue,keep,remove -"Quality Assurance Project Plan (QAPPApprovedIndicator) indicates ""N"" (not approved) or NA",QAPPApprovedIndicator,NA,0,1 -"Quality Assurance Project Plan (QAPPApprovedIndicator) indicates ""N"" (not approved) or NA",QAPPApprovedIndicator,Y,0,0 -"Quality Assurance Project Plan (QAPPApprovedIndicator) indicates ""N"" (not approved) or NA",QAPPApprovedIndicator,N,0,1 -"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,Non_QC,0,0 -"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_replicate,0,1 -"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_duplicate,0,1 -"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_calibration,0,1 -"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_blank,0,1 -"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_other,0,1 -Uncommon or suspect characteristic and analytical method combination,TADA.AnalyticalMethod.Flag,Not Reviewed,0,0 -Uncommon or suspect characteristic and analytical method combination,TADA.AnalyticalMethod.Flag,Suspect,0,1 -Uncommon or suspect characteristic and analytical method combination,TADA.AnalyticalMethod.Flag,Pass,0,0 -Uncommon or suspect characteristic and analytical method combination,TADA.AnalyticalMethod.Flag,Accepted,0,0 -Uncommon or suspect characteristic and analytical method combination,TADA.AnalyticalMethod.Flag,Rejected,0,1 -Result value is not numeric or NA and the detection limit value cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter [or the detection limit type is not in WQX domain tables (USGS/NWIS-specific)],TADA.CensoredData.Flag,Detection condition or detection limit is not documented in TADA reference tables.,0,1 -Result value is not numeric or NA and the detection limit value cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter [or the detection limit type is not in WQX domain tables (USGS/NWIS-specific)],TADA.CensoredData.Flag,Detection condition is missing and required for censored data ID.,0,1 -Result value is not numeric or NA and the detection limit value cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter [or the detection limit type is not in WQX domain tables (USGS/NWIS-specific)],TADA.CensoredData.Flag,Conflict between Condition and Limit,0,1 -Result value is not numeric or NA and the detection limit value cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter [or the detection limit type is not in WQX domain tables (USGS/NWIS-specific)],TADA.CensoredData.Flag,Non-Detect,0,0 -Result value is not numeric or NA and the detection limit value cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter [or the detection limit type is not in WQX domain tables (USGS/NWIS-specific)],TADA.CensoredData.Flag,Over-Detect,0,0 -Result value is not numeric or NA and the detection limit value cannot be interpreted because there is a conflict between the detection condition text and detection limit type provided by the data submitter [or the detection limit type is not in WQX domain tables (USGS/NWIS-specific)],TADA.CensoredData.Flag,Other Condition/Limit Populated,0,0 -Coordinates are outside of the United States,TADA.SuspectCoordinates.Flag,LAT_OutsideUSA,0,1 -Coordinates are outside of the United States,TADA.SuspectCoordinates.Flag,LONG_OutsideUSA,0,1 -Coordinates are imprecise (less than three decimal digits),TADA.SuspectCoordinates.Flag,Imprecise_lessthan3decimaldigits,0,1 -Coordinates are imprecise (less than three decimal digits),TADA.SuspectCoordinates.Flag,Pass,0,0 -MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,NA - Not Available,0,0 -MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,Non-Detect,0,0 -MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,Pass,0,0 -MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,Suspect,0,1 -MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,Over-Detect,0,0 -MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,Not Reviewed,0,0 -Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Pass,0,0 -Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Suspect,0,1 -Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Not Reviewed,0,0 -Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Accepted,0,0 -Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Non Standardized,0,0 -Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Nonstandardized,0,0 -Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,NonStandardized,0,0 -Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Rejected,0,1 -Quality Assurance Project Plan (QAPP) document is not available via the ProjectFileUrl,TADA.QAPPDocAvailable,Y_ProjectFileUrlProvided,0,0 -Quality Assurance Project Plan (QAPP) document is not available via the ProjectFileUrl,TADA.QAPPDocAvailable,N,0,1 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Non-ASCII Character(s),0,1 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Coerced to NA,0,1 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Numeric,0,0 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Less Than,0,0 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Greater Than,0,0 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Approximate Value,0,0 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Percentage,0,0 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Comma-Separated Numeric,0,0 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Result Value/Unit Copied from Detection Limit,0,0 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Result Value/Unit Estimated from Detection Limit,0,0 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,NA - Not Available,0,1 -Result value is not numeric or NA and no detection limit value is provided,TADA.ResultMeasureValueDataTypes.Flag,Text,0,1 -Metadata indicates duplicative uploads of the same results by multiple organizations,TADA.ResultSelectedMultipleOrgs,N,0,1 -Suspect characteristic and unit combination,TADA.ResultUnit.Flag,Pass,0,0 -Suspect characteristic and unit combination,TADA.ResultUnit.Flag,NonStandardized,0,0 -Suspect characteristic and unit combination,TADA.ResultUnit.Flag,Suspect,0,1 -Suspect characteristic and unit combination,TADA.ResultUnit.Flag,Not Reviewed,0,0 -Suspect characteristic and unit combination,TADA.ResultUnit.Flag,Accepted,0,0 -Suspect characteristic and unit combination,TADA.ResultUnit.Flag,Rejected,0,1 -Suspect characteristic and unit combination,TADA.ResultUnit.Flag,MethodNeeded,0,0 -"Result value(s) above the national upper threshold for a given characteristic, possibly indicating non-sensical value(s)",TADA.ResultValueAboveUpperThreshold.Flag,Suspect,0,1 -"Result value(s) above the national upper threshold for a given characteristic, possibly indicating non-sensical value(s)",TADA.ResultValueAboveUpperThreshold.Flag,Pass,0,0 -"Result value(s) above the national upper threshold for a given characteristic, possibly indicating non-sensical value(s)",TADA.ResultValueAboveUpperThreshold.Flag,Not Reviewed,0,0 -"Result value(s) above the national upper threshold for a given characteristic, possibly indicating non-sensical value(s)",TADA.ResultValueAboveUpperThreshold.Flag,NA - Not Available,0,0 -"Result value(s) below the national lower threshold for a given characteristic, possibly indicating non-sensical value(s)",TADA.ResultValueBelowLowerThreshold.Flag,Suspect,0,1 -"Result value(s) below the national lower threshold for a given characteristic, possibly indicating non-sensical value(s)",TADA.ResultValueBelowLowerThreshold.Flag,Pass,0,0 -"Result value(s) below the national lower threshold for a given characteristic, possibly indicating non-sensical value(s)",TADA.ResultValueBelowLowerThreshold.Flag,Not Reviewed,0,0 -"Result value(s) below the national lower threshold for a given characteristic, possibly indicating non-sensical value(s)",TADA.ResultValueBelowLowerThreshold.Flag,NA - Not Available,0,0 -Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,Pass,0,0 -Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,NonStandardized,0,0 -Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,Suspect,0,1 -Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,Not Reviewed,0,0 -Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,Accepted,0,0 -Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,Rejected,0,1 -Metadata indicates duplicative uploads of the same results within a single organization,TADA.SingleOrgDup.Flag,Duplicate,0,1 -Metadata indicates duplicative uploads of the same results within a single organization,TADA.SingleOrgDup.Flag,Unique,0,0 -Continuous results,TADA.ContinuousData.Flag,Continuous,0,1 -Continuous results,TADA.ContinuousData.Flag,Discrete,0,0 +flagType,columnName,flagValue,keep,remove,,, +No approved QAPP,QAPPApprovedIndicator,NA,0,1,,, +No approved QAPP,QAPPApprovedIndicator,Y,0,0,,, +No approved QAPP,QAPPApprovedIndicator,N,0,1,,, +"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,Non_QC,0,0,,, +"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_replicate,0,1,,, +"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_duplicate,0,1,,, +"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_calibration,0,1,,, +"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_blank,0,1,,, +"ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_other,0,1,,, +Uncommon or suspect characteristic and analytical method combination,TADA.AnalyticalMethod.Flag,Not Reviewed,0,0,,, +Uncommon or suspect characteristic and analytical method combination,TADA.AnalyticalMethod.Flag,Suspect,0,1,,, +Uncommon or suspect characteristic and analytical method combination,TADA.AnalyticalMethod.Flag,Pass,0,0,,, +Uncommon or suspect characteristic and analytical method combination,TADA.AnalyticalMethod.Flag,Accepted,0,0,,, +Uncommon or suspect characteristic and analytical method combination,TADA.AnalyticalMethod.Flag,Rejected,0,1,,, +Detection limit missing or not usable,TADA.CensoredData.Flag,Detection condition or detection limit is not documented in TADA reference tables.,0,1,,, +Detection limit missing or not usable,TADA.CensoredData.Flag,Detection condition is missing and required for censored data ID.,0,1,,, +Detection limit missing or not usable,TADA.CensoredData.Flag,Conflict between Condition and Limit,0,1,,, +Detection limit missing or not usable,TADA.CensoredData.Flag,Non-Detect,0,0,,, +Detection limit missing or not usable,TADA.CensoredData.Flag,Over-Detect,0,0,,, +Detection limit missing or not usable,TADA.CensoredData.Flag,Other Condition/Limit Populated,0,0,,, +Coordinates are outside of the United States,TADA.SuspectCoordinates.Flag,LAT_OutsideUSA,0,1,,, +Coordinates are outside of the United States,TADA.SuspectCoordinates.Flag,LONG_OutsideUSA,0,1,,, +Coordinates are imprecise (less than three decimal digits),TADA.SuspectCoordinates.Flag,Imprecise_lessthan3decimaldigits,0,1,,, +Coordinates are imprecise (less than three decimal digits),TADA.SuspectCoordinates.Flag,Pass,0,0,,, +MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,NA - Not Available,0,0,,, +MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,Non-Detect,0,0,,, +MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,Pass,0,0,,, +MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,Suspect,0,1,,, +MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,Over-Detect,0,0,,, +MeasureQualifierCode indicates result value is suspect,TADA.MeasureQualifierCode.Flag,Not Reviewed,0,0,,, +Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Pass,0,0,,, +Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Suspect,0,1,,, +Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Not Reviewed,0,0,,, +Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Accepted,0,0,,, +Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Non Standardized,0,0,,, +Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Nonstandardized,0,0,,, +Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,NonStandardized,0,0,,, +Suspect characteristic and speciation combination,TADA.MethodSpeciation.Flag,Rejected,0,1,,, +Missing QAPP doc,TADA.QAPPDocAvailable,Y_ProjectFileUrlProvided,0,0,,, +Missing QAPP doc,TADA.QAPPDocAvailable,N,0,1,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Non-ASCII Character(s),0,1,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Coerced to NA,0,1,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Numeric,0,0,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Less Than,0,0,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Greater Than,0,0,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Approximate Value,0,0,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Percentage,0,0,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Comma-Separated Numeric,0,0,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Result Value/Unit Copied from Detection Limit,0,0,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Result Value/Unit Estimated from Detection Limit,0,0,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,NA - Not Available,0,1,,, +Result value is not numeric or NA,TADA.ResultMeasureValueDataTypes.Flag,Text,0,1,,, +Metadata indicates duplicative uploads of the same results by multiple organizations,TADA.ResultSelectedMultipleOrgs,N,0,1,,, +Suspect characteristic and unit combination,TADA.ResultUnit.Flag,Pass,0,0,,, +Suspect characteristic and unit combination,TADA.ResultUnit.Flag,NonStandardized,0,0,,, +Suspect characteristic and unit combination,TADA.ResultUnit.Flag,Suspect,0,1,,, +Suspect characteristic and unit combination,TADA.ResultUnit.Flag,Not Reviewed,0,0,,, +Suspect characteristic and unit combination,TADA.ResultUnit.Flag,Accepted,0,0,,, +Suspect characteristic and unit combination,TADA.ResultUnit.Flag,Rejected,0,1,,, +Suspect characteristic and unit combination,TADA.ResultUnit.Flag,MethodNeeded,0,0,,, +Above upper threshold,TADA.ResultValueAboveUpperThreshold.Flag,Suspect,0,1,,, +Above upper threshold,TADA.ResultValueAboveUpperThreshold.Flag,Pass,0,0,,, +Above upper threshold,TADA.ResultValueAboveUpperThreshold.Flag,Not Reviewed,0,0,,, +Above upper threshold,TADA.ResultValueAboveUpperThreshold.Flag,NA - Not Available,0,0,,, +Below lower threshold,TADA.ResultValueBelowLowerThreshold.Flag,Suspect,0,1,,, +Below lower threshold,TADA.ResultValueBelowLowerThreshold.Flag,Pass,0,0,,, +Below lower threshold,TADA.ResultValueBelowLowerThreshold.Flag,Not Reviewed,0,0,,, +Below lower threshold,TADA.ResultValueBelowLowerThreshold.Flag,NA - Not Available,0,0,,, +Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,Pass,0,0,,, +Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,NonStandardized,0,0,,, +Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,Suspect,0,1,,, +Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,Not Reviewed,0,0,,, +Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,Accepted,0,0,,, +Suspect characteristic and fraction combination,TADA.SampleFraction.Flag,Rejected,0,1,,, +Single org duplicates,TADA.SingleOrgDup.Flag,Duplicate,0,1,,, +Single org duplicates,TADA.SingleOrgDup.Flag,Unique,0,0,,, +Continuous results,TADA.ContinuousData.Flag,Continuous,0,1,,, +Continuous results,TADA.ContinuousData.Flag,Discrete,0,0,,, From 987f9fd5ce414d53eb3a2019be4d188ec0bb1c82 Mon Sep 17 00:00:00 2001 From: cristinamullin <46969696+cristinamullin@users.noreply.github.com> Date: Thu, 21 Nov 2024 10:46:38 -0500 Subject: [PATCH 7/8] update flag prompt --- R/mod_query_data.R | 2 +- inst/flag_prompts.csv | 2 +- inst/flag_tests.csv | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/R/mod_query_data.R b/R/mod_query_data.R index 93c23db87..f5b716bb5 100644 --- a/R/mod_query_data.R +++ b/R/mod_query_data.R @@ -285,7 +285,7 @@ mod_query_data_server <- function(id, tadat) { readFile(tadat, input$progress_file$datapath) }) - # if user presses example data button, make tadat$raw the nutrients dataset contained within the TADA package. + # if user presses example data button, make tadat$raw the one of the example_data contained within the TADA package. shiny::observeEvent(input$example_data_go, { # a modal that pops up showing it's working on querying the portal shinybusy::show_modal_spinner( diff --git a/inst/flag_prompts.csv b/inst/flag_prompts.csv index 447705ae2..76652d9cc 100644 --- a/inst/flag_prompts.csv +++ b/inst/flag_prompts.csv @@ -9,7 +9,7 @@ Order,Level,Prompt,flagType 8,Optional,Metadata indicates duplicative uploads of the same results within a single organization (see TADA.SingleOrgDup.Flag),Single org duplicates 9,Optional,Metadata indicates duplicative uploads of the same results by multiple organizations (see TADA.ResultSelectedMultipleOrgs),Metadata indicates duplicative uploads of the same results by multiple organizations 10,Optional,Uncommon or suspect characteristic and analytical method combination (see TADA.AnalyticalMethod.Flag),Uncommon or suspect characteristic and analytical method combination -11,Optional,"Quality Assurance Project Plan (QAPPApprovedIndicator) indicates ""N"" (not approved) or NA",No approved QAPP +11,Optional,"Quality Assurance Project Plan (QAPPApprovedIndicator) indicates ""N"" (not approved) or NA",QAPP not approved or NA 12,Optional,Quality Assurance Project Plan (QAPP) document is not available via the ProjectFileUrl (see TADA.QAPPDocAvailable),Missing QAPP doc 13,Optional,"Result value(s) above the national threshold for a given characteristic, possibly indicating non-sensical value(s) (see TADA.ResultValueAboveUpperThreshold.Flag)",Above upper threshold 14,Optional,"Result value(s) below the national threshold for a given characteristic, possibly indicating non-sensical value(s) (see TADA.ResultValueBelowLowerThreshold.Flag)",Below lower threshold diff --git a/inst/flag_tests.csv b/inst/flag_tests.csv index 04bdd5f68..ab0484d55 100644 --- a/inst/flag_tests.csv +++ b/inst/flag_tests.csv @@ -1,7 +1,7 @@ flagType,columnName,flagValue,keep,remove,,, -No approved QAPP,QAPPApprovedIndicator,NA,0,1,,, -No approved QAPP,QAPPApprovedIndicator,Y,0,0,,, -No approved QAPP,QAPPApprovedIndicator,N,0,1,,, +QAPP not approved or NA,QAPPApprovedIndicator,NA,0,1,,, +QAPP not approved or NA,QAPPApprovedIndicator,Y,0,0,,, +QAPP not approved or NA,QAPPApprovedIndicator,N,0,1,,, "ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,Non_QC,0,0,,, "ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_replicate,0,1,,, "ActivityTypeCode indicates result value is a QC replicate, duplicate, or blank",TADA.ActivityType.Flag,QC_duplicate,0,1,,, From 68cd8fca7a23d1c1f8f09365700cf0efda9da750 Mon Sep 17 00:00:00 2001 From: cristinamullin <46969696+cristinamullin@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:46:58 -0500 Subject: [PATCH 8/8] increase max file size --- R/app_server.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/app_server.R b/R/app_server.R index 08de6b8fa..3e2b1f76b 100644 --- a/R/app_server.R +++ b/R/app_server.R @@ -7,7 +7,7 @@ # Below increases the max data upload size from the Shiny default of 5MB per file # to 30MB for file -options(shiny.maxRequestSize = 30 * 1024^2) +options(shiny.maxRequestSize = 400 * 1024^2) options(warn = 2) app_server <- function(input, output, session) { # Your application server logic