Skip to content

Commit

Permalink
doc(*): assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
dimfalk committed Mar 3, 2024
1 parent 3c36d33 commit 4c8fbe6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions R/calc_designstorm.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,12 @@ calc_designstorm <- function(x = NULL,
checkmate::assert_tibble(x)

allowed_d <- attr(x, "durations_min")
checkmate::assert_numeric(d, len = 1)
checkmate::assert_choice(d, allowed_d)

allowed_tn <- attr(x, "returnperiods_a")
checkmate::assert_numeric(tn, len = 1)
checkmate::assert_choice(tn, allowed_tn)

allowed_type <- c("EulerI", "EulerII")
checkmate::assert_character(type, len = 1)
checkmate::assert_choice(type, allowed_type)

# pre-processing -------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions R/get_depth.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ get_depth <- function(x = NULL,
checkmate::assert_tibble(x)

allowed_d <- attr(x, "durations_min")
checkmate::assert_numeric(d, len = 1)
checkmate::assert_choice(d, allowed_d)

allowed_tn <- attr(x, "returnperiods_a")
checkmate::assert_numeric(tn, len = 1)
checkmate::assert_choice(tn, allowed_tn)

checkmate::assert_logical(uc)
Expand Down
1 change: 0 additions & 1 deletion R/get_returnp.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ get_returnp <- function(x = NULL,
checkmate::assert_numeric(hn, len = 1, lower = 0)

allowed_d <- attr(x, "durations_min")
checkmate::assert_numeric(d, len = 1)
checkmate::assert_choice(d, allowed_d)

checkmate::assert_logical(interpolate)
Expand Down

0 comments on commit 4c8fbe6

Please sign in to comment.