Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert check to assert #795

Merged
merged 8 commits into from
Jan 12, 2023
Merged

convert check to assert #795

merged 8 commits into from
Jan 12, 2023

Conversation

pawelru
Copy link
Contributor

@pawelru pawelru commented Jan 10, 2023

refers to insightsengineering/nestdevs-tasks#3
fix checks so that we fail instead of just return false that is not used at all

@github-actions
Copy link
Contributor

github-actions bot commented Jan 10, 2023

badge

Code Coverage Summary

Filename                         Stmts    Miss  Cover    Missing
-----------------------------  -------  ------  -------  ------------------------------
R/dummy_functions.R                 74      61  17.57%   12-95
R/example_module.R                  18       9  50.00%   23-26, 29-33
R/get_rcode_utils.R                 52       2  96.15%   94, 99
R/get_rcode.R                      137      54  60.58%   74, 81, 86, 211-277
R/include_css_js.R                  24       0  100.00%
R/init.R                            22       2  90.91%   188-189
R/module_nested_tabs.R             130       7  94.62%   57, 96, 101-102, 148, 198, 227
R/module_tabs_with_filters.R        68       1  98.53%   162
R/module_teal_with_splash.R         33       2  93.94%   65, 77
R/module_teal.R                    111       5  95.50%   49, 52, 155-156, 180
R/modules_debugging.R               18      18  0.00%    37-56
R/modules.R                        101       8  92.08%   341-366
R/reporter_previewer_module.R       12       2  83.33%   18, 22
R/show_rcode_modal.R                20      20  0.00%    17-38
R/tdata.R                           41       2  95.12%   146, 172
R/utils.R                           13       0  100.00%
R/validate_inputs.R                 21       0  100.00%
R/validations.R                     62      39  37.10%   107-368
R/zzz.R                             11       7  36.36%   3-14
TOTAL                              968     239  75.31%

Diff against main

Filename              Stmts    Miss  Cover
------------------  -------  ------  -------
R/example_module.R        0      -9  +50.00%
R/init.R                 +1      -1  +5.19%
TOTAL                    +1     -10  +1.06%

Results for commit: a2fabb2

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Jan 10, 2023

Unit Tests Summary

    1 files    13 suites   13s ⏱️
145 tests 145 ✔️ 0 💤 0
287 runs  287 ✔️ 0 💤 0

Results for commit a9cdc6e.

♻️ This comment has been updated with latest results.

R/init.R Outdated Show resolved Hide resolved
Copy link
Contributor

@nikolas-burkoff nikolas-burkoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the docs so that init says modules can be of the appropriate type which then meant I needed to update the docs of other modules as for those they cannot be list of teal_module.

R/init.R Outdated
Comment on lines 164 to 173
checkmate::assert_multi_class(modules, c("teal_module", "list", "teal_modules"))
checkmate::check_list(modules)
checkmate::check_class(modules, "teal_modules")
checkmate::assert_list(filter, min.len = 0, names = "unique")
checkmate::assert_subset(names(filter), choices = teal.data::get_dataname(data))
checkmate::assert_character(id, max.len = 1, any.missing = FALSE)

teal.logger::log_system_info()

if (is(modules, "teal_module")) {
modules <- teal::modules(modules)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm you reverted my changes - was that intentional?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope - whoops

Nikolas Burkoff and others added 2 commits January 12, 2023 08:13
Signed-off-by: Nikolas Burkoff <nikolas.burkoff@capgemini.com>
@nikolas-burkoff nikolas-burkoff merged commit c1a3209 into main Jan 12, 2023
@nikolas-burkoff nikolas-burkoff deleted the checkmate_check_to_assert branch January 12, 2023 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants