Skip to content

Increase test coverage - #268

Merged
llrs-roche merged 34 commits into
mainfrom
802_validation
Nov 16, 2026
Merged

llrs-roche merged 34 commits into
mainfrom
802_validation

Conversation

@llrs-roche

Copy link
Copy Markdown
Contributor

Pull Request

Closes https://github.com/insightsengineering/coredev-tasks/issues/802

Adds tests to the package.

In addition I fixed two warnings related to tidyselect (select(all_of())) and ggplot2 (aes_() to aes() and an argument partial match on seq(lenght) to seq(length.out).

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ All contributors have signed the CLA
Posted by the CLA Assistant Lite bot.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

badge

Code Coverage Summary

Filename                           Stmts    Miss  Cover    Missing
-------------------------------  -------  ------  -------  ------------
R/g_boxplot.R                        116       0  100.00%
R/g_correlationplot.R                138       3  97.83%   407, 413-414
R/g_density_distribution_plot.R       86       0  100.00%
R/g_lineplot.R                       276       2  99.28%   382, 592
R/g_scatterplot.R                      5       0  100.00%
R/g_spaghettiplot.R                  101       0  100.00%
R/geom_axes_line.R                   167       0  100.00%
R/t_summarytable.R                   102       0  100.00%
R/utils.R                             70       0  100.00%
TOTAL                               1061       5  99.53%

Diff against main

Filename                           Stmts    Miss  Cover
-------------------------------  -------  ------  --------
R/g_boxplot.R                          0    -116  +100.00%
R/g_correlationplot.R                 +1    -134  +97.83%
R/g_density_distribution_plot.R        0     -86  +100.00%
R/g_lineplot.R                         0    -274  +99.28%
R/g_scatterplot.R                      0      -5  +100.00%
R/g_spaghettiplot.R                    0    -101  +100.00%
R/geom_axes_line.R                     0    -167  +100.00%
R/t_summarytable.R                     0    -102  +100.00%
R/utils.R                              0     -70  +100.00%
TOTAL                                 +1   -1055  +99.53%

Results for commit: b9c9eb4

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Unit Tests Summary

  1 files    7 suites   9s ⏱️
 46 tests  46 ✅ 0 💤 0 ❌
127 runs  127 ✅ 0 💤 0 ❌

Results for commit edec383.

♻️ This comment has been updated with latest results.

@llrs-roche

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@osenan osenan self-assigned this Nov 10, 2026

@osenan osenan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi,

Thanks for the big PR! We already reached the goal of coverage but we need to make further changes.

I would modify the .lintr and remove the pipe linter. In my opinion, the pipes can be native pipes for the tests and magritr pipes for the package.

Please see the comments on the file. We need refactor in the tests that are using internal functions. There are specific suggestions mentioned in many files.

Comment thread tests/testthat/helper-data.R Resolved
Comment thread tests/testthat/helper-data.R Resolved
Comment thread tests/testthat/helper-data.R Resolved
Comment thread tests/testthat/helper-data.R Resolved
Comment thread tests/testthat/test-utils.R Resolved
Comment thread tests/testthat/test-geom_axes_line.R Resolved
Comment thread tests/testthat/test-geom_axes_line.R Resolved
Comment thread tests/testthat/test-t_summarytable.R Resolved
Comment thread tests/testthat/test-t_summarytable.R Resolved
@llrs-roche
llrs-roche requested a review from osenan November 12, 2026 10:05

@osenan osenan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks! Now is much better. Please address the comments and fix the checks, which should be simple, lintrs and change the DESCRIPTION.

Comment thread tests/testthat/test-g_correlationplot.R Resolved
Comment thread tests/testthat/test-g_lineplot.R Resolved
Comment thread tests/testthat/test-g_scatterplot.R Resolved
Comment thread tests/testthat/test-t_summarytable.R Resolved
@llrs-roche

Copy link
Copy Markdown
Contributor Author

Let's open a new issue for the lintr issues. There are many and most of them refer to using the magrittr pipe instead of base R one. This requires a discussion if upgrading the R version is acceptable.

@llrs-roche
llrs-roche enabled auto-merge (squash) November 16, 2026 13:42
@llrs-roche
llrs-roche merged commit b5af3d8 into main Nov 16, 2026
29 of 30 checks passed
@llrs-roche
llrs-roche deleted the 802_validation branch November 16, 2026 13:46
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants