diff --git a/NEWS.md b/NEWS.md index e40a295c..5f7dd284 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,6 +9,7 @@ Development version - Added check to ensure that the column ordering is the same (#32) - Added more informative error messaging if a specified key is missing from the base or comparison dataset (#113) - Added check for differences in classes between the base and comparison datasets (#42) +- The package is less shouty now (#112) # diffdf 1.0.4 @@ -35,4 +36,4 @@ Development version # diffdf 1.0.0 -- Initial Release !! \ No newline at end of file +- Initial Release \ No newline at end of file diff --git a/R/diffdf.R b/R/diffdf.R index 6f955380..d721119c 100644 --- a/R/diffdf.R +++ b/R/diffdf.R @@ -172,13 +172,13 @@ diffdf <- function( COMPARE[["UnsupportedColsBase"]] <- construct_issue( value = identify_unsupported_cols(BASE), - message = "There are columns in BASE with unsupported modes !!" + message = "There are columns in BASE with unsupported modes" ) COMPARE[["UnsupportedColsComp"]] <- construct_issue( value = identify_unsupported_cols(COMP), - message = "There are columns in COMPARE with unsupported modes !!" + message = "There are columns in COMPARE with unsupported modes" ) @@ -199,13 +199,13 @@ diffdf <- function( COMPARE[["VarModeDiffs"]] <- construct_issue( value = identify_mode_differences(BASE, COMP), - message = "There are columns in BASE and COMPARE with different modes !!" + message = "There are columns in BASE and COMPARE with different modes" ) COMPARE[["VarClassDiffs"]] <- construct_issue( value = identify_class_differences(BASE, COMP), - message = "There are columns in BASE and COMPARE with different classes !!" + message = "There are columns in BASE and COMPARE with different classes" ) @@ -265,7 +265,7 @@ diffdf <- function( BASE[, keep_vars_base, drop = FALSE], COMP[, keep_vars_comp, drop = FALSE] ), - message = "There are differences in the column ordering between BASE and COMPARE !!" + message = "There are differences in the column ordering between BASE and COMPARE" ) } @@ -273,7 +273,7 @@ diffdf <- function( ##### Check Attributes COMPARE[["AttribDiffs"]] <- construct_issue( value = identify_att_differences(BASE, COMP, exclude_cols), - message = "There are columns in BASE and COMPARE with differing attributes !!" + message = "There are columns in BASE and COMPARE with differing attributes" ) @@ -285,25 +285,25 @@ diffdf <- function( COMPARE[["ExtRowsBase"]] <- construct_issue( value = identify_extra_rows(BASE, COMP, KEYS), - message = "There are rows in BASE that are not in COMPARE !!" + message = "There are rows in BASE that are not in COMPARE" ) COMPARE[["ExtRowsComp"]] <- construct_issue( value = identify_extra_rows(COMP, BASE, KEYS), - message = "There are rows in COMPARE that are not in BASE !!" + message = "There are rows in COMPARE that are not in BASE" ) COMPARE[["ExtColsBase"]] <- construct_issue( value = identify_extra_cols(BASE, COMP), - message = "There are columns in BASE that are not in COMPARE !!" + message = "There are columns in BASE that are not in COMPARE" ) COMPARE[["ExtColsComp"]] <- construct_issue( value = identify_extra_cols(COMP, BASE), - message = "There are columns in COMPARE that are not in BASE !!" + message = "There are columns in COMPARE that are not in BASE" ) diff --git a/tests/testthat/_snaps/identify_column_order.md b/tests/testthat/_snaps/identify_column_order.md index 893a4d5e..a28435c3 100644 --- a/tests/testthat/_snaps/identify_column_order.md +++ b/tests/testthat/_snaps/identify_column_order.md @@ -16,7 +16,7 @@ ------------------------------------------------------------------ - There are differences in the column ordering between BASE and COMPARE !! + There are differences in the column ordering between BASE and COMPARE =================================== COLUMN BASE-INDEX COMPARE-INDEX ----------------------------------- @@ -44,7 +44,7 @@ ------------------------------------------------------------------ - There are differences in the column ordering between BASE and COMPARE !! + There are differences in the column ordering between BASE and COMPARE =================================== COLUMN BASE-INDEX COMPARE-INDEX ----------------------------------- @@ -53,7 +53,7 @@ ----------------------------------- - There are columns in BASE that are not in COMPARE !! + There are columns in BASE that are not in COMPARE ========= COLUMNS --------- @@ -80,7 +80,7 @@ ------------------------------------------------------------------ - There are columns in BASE that are not in COMPARE !! + There are columns in BASE that are not in COMPARE ========= COLUMNS --------- @@ -88,7 +88,7 @@ --------- - There are columns in COMPARE that are not in BASE !! + There are columns in COMPARE that are not in BASE ========= COLUMNS --------- @@ -115,7 +115,7 @@ ------------------------------------ - There are differences in the column ordering between BASE and COMPARE !! + There are differences in the column ordering between BASE and COMPARE =================================== COLUMN BASE-INDEX COMPARE-INDEX ----------------------------------- diff --git a/tests/testthat/_snaps/miscellaneous.md b/tests/testthat/_snaps/miscellaneous.md index 5adbba1e..c1547e60 100644 --- a/tests/testthat/_snaps/miscellaneous.md +++ b/tests/testthat/_snaps/miscellaneous.md @@ -16,7 +16,7 @@ -------------------------------------- - There are rows in COMPARE that are not in BASE !! + There are rows in COMPARE that are not in BASE First 10 of 150 rows are shown in table below =============== ..ROWNUMBER.. @@ -34,7 +34,7 @@ --------------- - There are columns in COMPARE that are not in BASE !! + There are columns in COMPARE that are not in BASE ============== COLUMNS -------------- @@ -65,7 +65,7 @@ -------------------------------------- - There are rows in BASE that are not in COMPARE !! + There are rows in BASE that are not in COMPARE First 10 of 150 rows are shown in table below =============== ..ROWNUMBER.. @@ -83,7 +83,7 @@ --------------- - There are columns in BASE that are not in COMPARE !! + There are columns in BASE that are not in COMPARE ============== COLUMNS -------------- @@ -114,7 +114,7 @@ ------------------------------------------------------------------ - There are rows in BASE that are not in COMPARE !! + There are rows in BASE that are not in COMPARE =============== ..ROWNUMBER.. --------------- @@ -124,7 +124,7 @@ --------------- - There are columns in BASE that are not in COMPARE !! + There are columns in BASE that are not in COMPARE ========= COLUMNS --------- @@ -151,7 +151,7 @@ ------------------------------------------------------------------ - There are rows in COMPARE that are not in BASE !! + There are rows in COMPARE that are not in BASE =============== ..ROWNUMBER.. --------------- @@ -161,7 +161,7 @@ --------------- - There are columns in COMPARE that are not in BASE !! + There are columns in COMPARE that are not in BASE ========= COLUMNS --------- @@ -188,7 +188,7 @@ ------------------------------------ - There are rows in BASE that are not in COMPARE !! + There are rows in BASE that are not in COMPARE ==== ID ---- @@ -196,7 +196,7 @@ ---- - There are rows in COMPARE that are not in BASE !! + There are rows in COMPARE that are not in BASE ==== ID ---- diff --git a/tests/testthat/_snaps/print_output.md b/tests/testthat/_snaps/print_output.md index 9d2532e9..239162db 100644 --- a/tests/testthat/_snaps/print_output.md +++ b/tests/testthat/_snaps/print_output.md @@ -102,7 +102,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with differing attributes !! + There are columns in BASE and COMPARE with differing attributes ===================================================================== VARIABLE ATTR_NAME VALUES.BASE VALUES.COMP --------------------------------------------------------------------- @@ -129,7 +129,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with differing attributes !! + There are columns in BASE and COMPARE with differing attributes ===================================================================== VARIABLE ATTR_NAME VALUES.BASE VALUES.COMP --------------------------------------------------------------------- @@ -156,7 +156,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with differing attributes !! + There are columns in BASE and COMPARE with differing attributes ============================================================ VARIABLE ATTR_NAME VALUES.BASE VALUES.COMP ------------------------------------------------------------ @@ -205,7 +205,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with differing attributes !! + There are columns in BASE and COMPARE with differing attributes ============================================================ VARIABLE ATTR_NAME VALUES.BASE VALUES.COMP ------------------------------------------------------------ @@ -254,7 +254,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with different classes !! + There are columns in BASE and COMPARE with different classes ====================================================== VARIABLE CLASS.BASE CLASS.COMP ------------------------------------------------------ @@ -281,7 +281,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with different classes !! + There are columns in BASE and COMPARE with different classes ====================================================== VARIABLE CLASS.BASE CLASS.COMP ------------------------------------------------------ @@ -308,7 +308,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with different modes !! + There are columns in BASE and COMPARE with different modes ================================ VARIABLE MODE.BASE MODE.COMP -------------------------------- @@ -316,7 +316,7 @@ -------------------------------- - There are columns in BASE and COMPARE with different classes !! + There are columns in BASE and COMPARE with different classes ================================== VARIABLE CLASS.BASE CLASS.COMP ---------------------------------- @@ -343,7 +343,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with different modes !! + There are columns in BASE and COMPARE with different modes ================================ VARIABLE MODE.BASE MODE.COMP -------------------------------- @@ -351,7 +351,7 @@ -------------------------------- - There are columns in BASE and COMPARE with different classes !! + There are columns in BASE and COMPARE with different classes ================================== VARIABLE CLASS.BASE CLASS.COMP ---------------------------------- @@ -378,7 +378,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with different modes !! + There are columns in BASE and COMPARE with different modes ================================ VARIABLE MODE.BASE MODE.COMP -------------------------------- @@ -386,7 +386,7 @@ -------------------------------- - There are columns in BASE and COMPARE with different classes !! + There are columns in BASE and COMPARE with different classes ================================== VARIABLE CLASS.BASE CLASS.COMP ---------------------------------- @@ -394,7 +394,7 @@ ---------------------------------- - There are columns in BASE that are not in COMPARE !! + There are columns in BASE that are not in COMPARE ========= COLUMNS --------- @@ -421,7 +421,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with different modes !! + There are columns in BASE and COMPARE with different modes ================================ VARIABLE MODE.BASE MODE.COMP -------------------------------- @@ -429,7 +429,7 @@ -------------------------------- - There are columns in BASE and COMPARE with different classes !! + There are columns in BASE and COMPARE with different classes ================================== VARIABLE CLASS.BASE CLASS.COMP ---------------------------------- @@ -437,7 +437,7 @@ ---------------------------------- - There are columns in BASE that are not in COMPARE !! + There are columns in BASE that are not in COMPARE ========= COLUMNS --------- @@ -464,7 +464,7 @@ ---------------------------------------------------------------------------- - There are rows in BASE that are not in COMPARE !! + There are rows in BASE that are not in COMPARE =============== ..ROWNUMBER.. --------------- @@ -500,7 +500,7 @@ ---------------------------------------------------------------------------- - There are rows in BASE that are not in COMPARE !! + There are rows in BASE that are not in COMPARE =============== ..ROWNUMBER.. --------------- @@ -536,7 +536,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with different modes !! + There are columns in BASE and COMPARE with different modes ================================ VARIABLE MODE.BASE MODE.COMP -------------------------------- @@ -544,7 +544,7 @@ -------------------------------- - There are columns in BASE and COMPARE with different classes !! + There are columns in BASE and COMPARE with different classes ====================================================== VARIABLE CLASS.BASE CLASS.COMP ------------------------------------------------------ @@ -553,7 +553,7 @@ ------------------------------------------------------ - There are columns in BASE and COMPARE with differing attributes !! + There are columns in BASE and COMPARE with differing attributes =============================================================================== VARIABLE ATTR_NAME VALUES.BASE VALUES.COMP ------------------------------------------------------------------------------- @@ -632,7 +632,7 @@ ---------------------------------------------------------------------------- - There are columns in BASE and COMPARE with different modes !! + There are columns in BASE and COMPARE with different modes ================================ VARIABLE MODE.BASE MODE.COMP -------------------------------- @@ -640,7 +640,7 @@ -------------------------------- - There are columns in BASE and COMPARE with different classes !! + There are columns in BASE and COMPARE with different classes ====================================================== VARIABLE CLASS.BASE CLASS.COMP ------------------------------------------------------ @@ -649,7 +649,7 @@ ------------------------------------------------------ - There are columns in BASE and COMPARE with differing attributes !! + There are columns in BASE and COMPARE with differing attributes =============================================================================== VARIABLE ATTR_NAME VALUES.BASE VALUES.COMP ------------------------------------------------------------------------------- @@ -763,7 +763,7 @@ ---------------------------------------------------------------------------------- - There are columns in BASE and COMPARE with different modes !! + There are columns in BASE and COMPARE with different modes ================================ VARIABLE MODE.BASE MODE.COMP -------------------------------- @@ -771,7 +771,7 @@ -------------------------------- - There are columns in BASE and COMPARE with different classes !! + There are columns in BASE and COMPARE with different classes ====================================================== VARIABLE CLASS.BASE CLASS.COMP ------------------------------------------------------ @@ -780,7 +780,7 @@ ------------------------------------------------------ - There are columns in BASE and COMPARE with differing attributes !! + There are columns in BASE and COMPARE with differing attributes =============================================================================== VARIABLE ATTR_NAME VALUES.BASE VALUES.COMP ------------------------------------------------------------------------------- @@ -860,7 +860,7 @@ ---------------------------------------------------------------------------------- - There are columns in BASE and COMPARE with different modes !! + There are columns in BASE and COMPARE with different modes ================================ VARIABLE MODE.BASE MODE.COMP -------------------------------- @@ -868,7 +868,7 @@ -------------------------------- - There are columns in BASE and COMPARE with different classes !! + There are columns in BASE and COMPARE with different classes ====================================================== VARIABLE CLASS.BASE CLASS.COMP ------------------------------------------------------ @@ -877,7 +877,7 @@ ------------------------------------------------------ - There are columns in BASE and COMPARE with differing attributes !! + There are columns in BASE and COMPARE with differing attributes =============================================================================== VARIABLE ATTR_NAME VALUES.BASE VALUES.COMP ------------------------------------------------------------------------------- diff --git a/tests/testthat/test-class_compare.R b/tests/testthat/test-class_compare.R index 033446b9..5ede4e88 100644 --- a/tests/testthat/test-class_compare.R +++ b/tests/testthat/test-class_compare.R @@ -55,6 +55,6 @@ test_that("Class comparison works as expected when disabled (the default)", { tibble(x = 1, y = 2), data.frame(x = 1) ), - regexp = "^\\nThere are columns in BASE that are not in COMPARE !!$" + regexp = "^\\nThere are columns in BASE that are not in COMPARE$" ) })