insightsengineering / teal.data

Data model for teal applications
https://insightsengineering.github.io/teal.data/
Other
8 stars 7 forks source link

Run verification check when check is `TRUE` #281

Closed vedhav closed 7 months ago

vedhav commented 7 months ago

Part of https://github.com/insightsengineering/teal/issues/1069

Please make sure that you also use the teal branch 1069-fix-code-warnings-when-data-is-verified@main for testing the example from the issue.

github-actions[bot] commented 7 months ago

Unit Tests Summary

  1 files   14 suites   2s :stopwatch: 175 tests 173 :white_check_mark: 2 :zzz: 0 :x: 244 runs  242 :white_check_mark: 2 :zzz: 0 :x:

Results for commit 740aae75.

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

github-actions[bot] commented 7 months ago

badge

Code Coverage Summary

Filename                         Stmts    Miss  Cover    Missing
-----------------------------  -------  ------  -------  ------------------
R/cdisc_data.R                       1       0  100.00%
R/default_cdisc_join_keys.R         11      11  0.00%    16-34
R/deprecated.R                      57      57  0.00%    19-344
R/dummy_function.R                   2       2  0.00%    14-15
R/formatters_var_labels.R           36      11  69.44%   60, 69-80
R/join_key.R                        38       0  100.00%
R/join_keys-c.R                     12       0  100.00%
R/join_keys-extract.R              128       0  100.00%
R/join_keys-names.R                 15       0  100.00%
R/join_keys-parents.R               30       0  100.00%
R/join_keys-print.R                 45       0  100.00%
R/join_keys-utils.R                 73       3  95.89%   35-38
R/join_keys.R                       21       0  100.00%
R/teal_data-class.R                 25       1  96.00%   69
R/teal_data-datanames.R             10       0  100.00%
R/teal_data-get_code.R              14       0  100.00%
R/teal_data-show.R                   4       4  0.00%    14-19
R/teal_data.R                       25       9  64.00%   35, 44-50, 53
R/testhat-helpers.R                 26       0  100.00%
R/topological_sort.R                32       0  100.00%
R/utils-get_code_dependency.R      166       1  99.40%   258
R/verify.R                          42      11  73.81%   63, 93-97, 100-104
R/zzz.R                             10      10  0.00%    4-16
TOTAL                              823     120  85.42%

Diff against main

Filename          Stmts    Miss  Cover
--------------  -------  ------  --------
R/cdisc_data.R        0      -1  +100.00%
R/teal_data.R        +3       0  +4.91%
TOTAL                +3      -1  +0.18%

Results for commit: 740aae7549fe1add8c590003ac03e0775fefb72b

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

gogonzo commented 7 months ago

@vedhav check shouldn't be used anymore - vignette about reproducibility shows only one way to verify object https://insightsengineering.github.io/teal.data/main/articles/teal-data-reproducibility.html

check should be deprecated with the link to the migration page https://github.com/insightsengineering/teal/discussions/988

vedhav commented 7 months ago

Got it. So, do you recommend creating a teal_data wrapper function that we just internally use in teal which has a way to check? Because I can't think of another way to verify a new teal_data object that we pass into the modules.

gogonzo commented 7 months ago

Got it. So, do you recommend creating a teal_data wrapper function that we just internally use in teal which has a way to check? Because I can't think of another way to verify a new teal_data object that we pass into the modules.

No, we won't reverify data. Here check has to be deprecated and in teal I've provided a solution in the review

vedhav commented 7 months ago

In this case, Shall we add a r lifecycle::badge("deprecated") and hint that they have to use verify method now?

gogonzo commented 7 months ago

closing this PR in favour of https://github.com/insightsengineering/teal.data/pull/282