1089 always avail alt df - #1102
Conversation
Signed-off-by: Gabe Becker <gabembecker@gmail.com>
|
fixes #1089 |
Code Coverage SummaryDiff against mainResults for commit: 406bcf9 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 31 suites 1m 53s ⏱️ Results for commit 406bcf9. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit 0135660 ♻️ This comment has been updated with latest results. |
| #' For the `.alt_df*` family of parameters, these will be passed data | ||
| #' subsets based on `df` if no `alt_counts_df` is specified in the | ||
| #' `build_table` call. In `rtables` versions `<= 0.6.13`, this instead | ||
| #' resulted in an error. } |
There was a problem hiding this comment.
@gmbecker small thing on the version here,I checked the tags and the stop() was actually still in v0.6.16, it is only being removed in this PR. So <= 0.6.13 is not right, it should point to the last release before this fix (0.6.16) or just say "in previous versions" to be safe. Also there is a double space and the closing } got glued onto the sentence (error. }), and this paragraph is sitting inside the \describe{} block, so it will render as a weird list item. I would move it out just after the closing brace so it reads as body text.
| #' `build_table` call. In `rtables` versions `<= 0.6.13`, this instead | ||
| #' resulted in an error. } | ||
| #' | ||
| #' @note If any of these formals is specified incorrectly or not present in the tabulation machinery, it will be |
There was a problem hiding this comment.
Related to the note just below (line 1056): it still says .alt_df_row and .alt_df "will not be present" when no alt_counts_df is given, but that is exactly what we are changing here, so it now contradicts the paragraph right above. Can we update/drop it? Otherwise it is a bit confusing for the user ;)
| check_alt_dfs <- function(df, .df_row, .alt_df_row, .alt_df, .alt_df_full) { | ||
| expect_identical(df, .alt_df) | ||
| expect_identical(.df_row, .alt_df_row) | ||
| expect_false(is.null(.alt_df_full)) |
There was a problem hiding this comment.
Nice test. One thing, here we only check .alt_df_full is not NULL, but the whole point is that it is the full df (not the row-group subset). I would add an expect_identical(.alt_df_full, ex_adsl) like the existing "full alt_counts_df is accessible" test does, otherwise a regression where it collapses to the subset would still pass here.
| expect_error(lyt |> build_table(DM), | ||
| regexp = "Layout contains afun\\/cfun functions that have optional*" | ||
| ) | ||
|
|
There was a problem hiding this comment.
Minor leftover: removing the old expect_error left a dangling blank line here, the keep_levels comment now floats away from the build_table call it refers to. Just yo tidy up.
No description provided.