insightsengineering / cardx

R Package to Supplement ARD Functions Found in {cards}
https://insightsengineering.github.io/cardx/
Other
14 stars 2 forks source link

add `check_ard_structure()` unit tests #197

Closed ayogasekaram closed 2 months ago

ayogasekaram commented 2 months ago

closes #151


Pre-review Checklist (if item does not apply, mark is as complete)

Reviewer Checklist (if item does not apply, mark is as complete)

When the branch is ready to be merged:

github-actions[bot] commented 2 months ago

Unit Tests Summary

  1 files  138 suites   1m 3s :stopwatch: 137 tests 137 :white_check_mark: 0 :zzz: 0 :x: 614 runs  614 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 1dc84919.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 2 months ago

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
ard_aod_wald_test 💚 $1.20$ $-1.20$ $-2$ $-1$ $0$ $0$
ard_attributes.survey.design 💔 $0.35$ $+1.18$ $0$ $-1$ $0$ $0$
ard_emmeans_mean_difference 💚 $1.12$ $-1.12$ $-8$ $0$ $0$ $0$
ard_missing.survey.design 💚 $1.63$ $-1.63$ $-18$ $0$ $0$ $0$
Additional test case details | Test Suite | $Status$ | Time on `main` | $±Time$ | Test Case | |:-----|:----:|:----:|:----:|:-----| | ard_aod_wald_test | 👶 | | $+0.00$ | ard_aod_wald_test_follows_ard_structure | | ard_attributes.survey.design | 💔 | $0.35$ | $+1.18$ | ard_attributes.survey.design_works | | ard_car_anova | 👶 | | $+0.00$ | ard_car_anova_follows_ard_structure | | ard_car_vif | 👶 | | $+0.00$ | ard_car_vif_follows_ard_structure | | ard_categorical.survey.design | 👶 | | $+0.00$ | ard_categorical_follows_ard_structure | | ard_categorical_ci.survey.design | 👶 | | $+0.00$ | ard_categorical_ci.survey.design_follows_ard_structure | | ard_continuous.survey.design | 👶 | | $+0.00$ | ard_continuous.survey.design_follows_ard_structure | | ard_continuous.survey.design | 💚 | $19.40$ | $-4.25$ | unstratified_ard_continuous.survey.design_works | | ard_continuous_ci.data.frame | 👶 | | $+0.00$ | ard_continuous_ci.data.frame_follows_ard_structure | | ard_continuous_ci.survey.design | 👶 | | $+0.00$ | ard_continuous_ci.survey.design_follows_ard_structure | | ard_dichotomous.survey.design | 👶 | | $+0.00$ | ard_dichotomous.survey.design_follows_ard_structure | | ard_effectsize_cohens_d | 👶 | | $+0.00$ | ard_effectsize_cohens_d_follows_ard_structure | | ard_effectsize_hedges_g | 👶 | | $+0.00$ | ard_effectsize_cohens_d_follows_ard_structure | | ard_emmeans_mean_difference | 👶 | | $+0.00$ | ard_emmeans_mean_difference_follows_ard_structure | | ard_missing.survey.design | 👶 | | $+0.00$ | ard_missing.survey.design_follows_ard_structure | | ard_proportion_ci | 👶 | | $+0.00$ | ard_proportion_ci_follows_ard_structure | | ard_regression | 👶 | | $+0.00$ | ard_regression_follows_ard_structure | | ard_regression_basic | 👶 | | $+0.00$ | ard_regression_basic_follows_ard_structure | | ard_smd_smd | 👶 | | $+0.00$ | ard_smd_smd_follows_ard_structure | | ard_stats_anova | 👶 | | $+0.00$ | ard_stats_anova_follows_ard_structure | | ard_stats_aov | 👶 | | $+0.00$ | ard_stats_aov_follows_ard_structure | | ard_stats_chisq_test | 👶 | | $+0.00$ | ard_stats_chisq_test_follows_ard_structure | | ard_stats_fisher_test | 👶 | | $+0.00$ | ard_stats_fisher_test_follows_ard_structure | | ard_stats_kruskal_test | 👶 | | $+0.00$ | ard_stats_kruskal_test_follows_ard_structure | | ard_stats_mcnemar_test | 👶 | | $+0.00$ | ard_stats_mcnemar_test_follows_ard_structure | | ard_stats_mood_test | 👶 | | $+0.00$ | ard_stats_mood_test_follows_ard_structure | | ard_stats_oneway_test | 👶 | | $+0.00$ | ard_stats_oneway_test_follows_ard_structure | | ard_stats_prop_test | 👶 | | $+0.00$ | ard_stats_prop_test_follows_ard_structure | | ard_stats_t_test | 👶 | | $+0.00$ | ard_stats_t_test_follows_ard_structure | | ard_stats_t_test_onesample | 👶 | | $+0.00$ | ard_stats_t_test_onesample_follows_ard_structure | | ard_stats_wilcox_test | 👶 | | $+0.00$ | ard_stats_wilcox_test_follows_ard_structure | | ard_stats_wilcox_test_onesample | 👶 | | $+0.00$ | ard_stats_wilcox_test_onesample_follows_ard_structure | | ard_survey_svychisq | 👶 | | $+0.00$ | ard_survey_svychisq_follows_ard_structure | | ard_survey_svyranktest | 👶 | | $+0.00$ | ard_survey_svyranktest_follows_ard_structure | | ard_survey_svyttest | 👶 | | $+0.00$ | ard_survey_svyttest_follows_ard_structure | | ard_survival_survdiff | 👶 | | $+0.00$ | ard_survival_survdiff_follows_ard_structure | | ard_survival_survfit | 👶 | | $+0.00$ | ard_survival_survfit_follows_ard_structure | | ard_survival_survfit_diff | 👶 | | $+0.00$ | ard_survival_survfit_diff_follows_ard_structure | | construction_helpers | 💔 | $0.39$ | $+1.71$ | construct_model_works | | proportion_ci | 💔 | $0.14$ | $+1.53$ | check_the_proportion_ci__functions_work |

Results for commit 2d7ca06a4466354ae94538d116b8d99af77eb8dc

♻️ This comment has been updated with latest results.

github-actions[bot] commented 2 months ago

badge

Code Coverage Summary

Filename                                Stmts    Miss  Cover    Missing
------------------------------------  -------  ------  -------  ---------------------------------------------------------------------------
R/add_total_n.survey.design.R              12       0  100.00%
R/ard_aod_wald_test.R                      78       8  89.74%   39-44, 94, 97
R/ard_attributes.survey.design.R            2       0  100.00%
R/ard_car_anova.R                          45       2  95.56%   62, 65
R/ard_car_vif.R                            62       2  96.77%   52, 87
R/ard_categorical_ci.R                     96       6  93.75%   83, 134-138
R/ard_categorical_ci.survey.design.R      128       3  97.66%   152-153, 179
R/ard_categorical.survey.design.R         391      12  96.93%   77, 126-129, 226-229, 273, 515, 529
R/ard_continuous_ci.R                      28       1  96.43%   38
R/ard_continuous_ci.survey.design.R       137       4  97.08%   55-57, 208
R/ard_continuous.survey.design.R          201       3  98.51%   86, 177, 187
R/ard_dichotomous.survey.design.R          73       3  95.89%   51, 156, 161
R/ard_effectsize_cohens_d.R               103       2  98.06%   69, 122
R/ard_effectsize_hedges_g.R                91       2  97.80%   68, 120
R/ard_emmeans_mean_difference.R            70       0  100.00%
R/ard_missing.survey.design.R              79       1  98.73%   52
R/ard_regression_basic.R                   16       1  93.75%   46
R/ard_regression.R                         73       0  100.00%
R/ard_smd_smd.R                            69       5  92.75%   57, 83-86
R/ard_stats_anova.R                        95       0  100.00%
R/ard_stats_aov.R                          46       0  100.00%
R/ard_stats_chisq_test.R                   40       1  97.50%   39
R/ard_stats_fisher_test.R                  43       1  97.67%   42
R/ard_stats_kruskal_test.R                 36       1  97.22%   38
R/ard_stats_mcnemar_test.R                 80       2  97.50%   63, 106
R/ard_stats_mood_test.R                    49       1  97.96%   45
R/ard_stats_oneway_test.R                  39       0  100.00%
R/ard_stats_prop_test.R                    85       1  98.82%   43
R/ard_stats_t_test_onesample.R             41       0  100.00%
R/ard_stats_t_test.R                      112       2  98.21%   65, 111
R/ard_stats_wilcox_test_onesample.R        42       0  100.00%
R/ard_stats_wilcox_test.R                  99       2  97.98%   65, 117
R/ard_survey_svychisq.R                    38       1  97.37%   44
R/ard_survey_svyranktest.R                 54       1  98.15%   44
R/ard_survey_svyttest.R                    53       1  98.11%   42
R/ard_survival_survdiff.R                  89       0  100.00%
R/ard_survival_survfit_diff.R              76       8  89.47%   31-34, 43-46
R/ard_survival_survfit.R                  174      13  92.53%   79-81, 85, 95-97, 128-132, 237
R/construction_helpers.R                  105      39  62.86%   101-104, 107-111, 143-146, 149-153, 164-169, 192, 204-208, 234-238, 245-249
R/proportion_ci.R                         195      28  85.64%   290, 293, 302-307, 315, 330, 438-461
TOTAL                                    3345     157  95.31%

Diff against main

Filename             Stmts    Miss  Cover
-----------------  -------  ------  --------
R/ard_car_vif.R         +1       0  +0.05%
R/ard_stats_aov.R      +10       0  +100.00%
TOTAL                  +11       0  +0.02%

Results for commit: 1dc84919a8859553a92ec6ef42f525f852b381c2

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

ddsjoberg commented 2 months ago

hey @ayogasekaram ! Is this one ready for review?