-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
191 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,7 @@ | |
^.*CITATION.cff$ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^.lintr$ | ||
^tests/.lintr$ | ||
^codecov\.yml$ | ||
^\.github$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
ValidationKey: '39524' | ||
ValidationKey: '198020' | ||
AutocreateReadme: yes | ||
AcceptedWarnings: | ||
- 'Warning: package ''.*'' was built under R version' | ||
- 'Warning: namespace ''.*'' is not available and has been replaced' | ||
AcceptedNotes: ~ | ||
allowLinterWarnings: no | ||
AcceptedNotes: | ||
- no visible binding for global variable | ||
- 'Found the following hidden files and directories:' | ||
allowLinterWarnings: yes | ||
enforceVersionUpdate: no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
*.RData | ||
*.Ruserdata | ||
*.html | ||
.Rproj.user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
linters: lucode2::lintrRules() | ||
encoding: "UTF-8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,16 @@ cff-version: 1.2.0 | |
message: If you use this software, please cite it using the metadata from this file. | ||
type: software | ||
title: 'piamValidation: Validation Tools for PIK-PIAM' | ||
version: 0.0.2 | ||
date-released: '2024-02-09' | ||
version: 0.1.0 | ||
date-released: '2024-03-20' | ||
abstract: The piamValidation package provides validation tools for the Potsdam Integrated | ||
Assessment Modelling environment. | ||
authors: | ||
- family-names: Weigmann | ||
given-names: Pascal | ||
email: [email protected] | ||
- family-names: Richters | ||
given-names: Oliver | ||
license: LGPL-3.0 | ||
repository-code: https://github.com/pik-piam/piamValidation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
Type: Package | ||
Package: piamValidation | ||
Title: Validation Tools for PIK-PIAM | ||
Version: 0.0.2 | ||
Date: 2024-02-09 | ||
Version: 0.1.0 | ||
Date: 2024-03-20 | ||
Authors@R: | ||
person("Pascal", "Weigmann", , "[email protected]", role = c("aut", "cre")) | ||
c(person("Pascal", "Weigmann",, "[email protected]", role = c("aut", "cre")), | ||
person("Oliver", "Richters",, role = "aut")) | ||
Description: The piamValidation package provides validation tools for the Potsdam Integrated Assessment Modelling environment. | ||
License: LGPL-3 | ||
URL: https://github.com/pik-piam/piamValidation | ||
|
@@ -15,9 +16,11 @@ Imports: | |
plotly, | ||
quitte (>= 0.3123.0), | ||
readxl, | ||
tibble, | ||
tidyr | ||
Suggests: | ||
testthat | ||
testthat, | ||
remind2 | ||
Encoding: UTF-8 | ||
RoxygenNote: 7.3.1 | ||
Depends: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
#' @importFrom dplyr filter select mutate summarise group_by %>% | ||
# yellowFail: if set to TRUE a yellow check result of a critical variable will | ||
# lead to the scenario not passing as validated | ||
#' returns information on whether scenarios passed critical validation checks | ||
#' | ||
#' @param data data.frame as returned from ``validateScenarios()`` | ||
#' @param yellowFail if set to TRUE a yellow check result of a critical | ||
#' variable will lead to the scenario not passing as validated | ||
#' | ||
#' @importFrom dplyr %>% | ||
#' @export | ||
validationPass <- function(data, yellowFail = FALSE) { | ||
|
||
fail_color <- ifelse(yellowFail, c("red", "yellow"), "red") | ||
|
||
# see if any critical variables have failed per scenario and model | ||
pass <- data %>% | ||
filter(check %in% fail_color, critical == "yes") %>% | ||
group_by(model, scenario) %>% | ||
summarize(pass = n() == 0, | ||
n_fail = n() | ||
) | ||
dplyr::filter(check %in% fail_color, critical == "yes") %>% | ||
dplyr::group_by(model, scenario) %>% | ||
dplyr::summarize(pass = dplyr::n() == 0, n_fail = dplyr::n()) | ||
|
||
return(pass) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#' Validation Tools for PIK-PIAM | ||
#' | ||
#' The piamValidation package provides validation tools for the Potsdam Integrated Assessment Modelling environment. | ||
#' | ||
#' @name piamValidation-package | ||
#' @aliases piamValidation-package piamValidation | ||
"_PACKAGE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
comment: true | ||
github_checks: | ||
annotations: false | ||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "0...95" | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
threshold: 1% | ||
informational: true | ||
patch: | ||
default: | ||
target: auto | ||
threshold: 1% | ||
informational: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.