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

814 implement knit print for subclasses of design #823

Merged
merged 50 commits into from
Jun 5, 2024

Conversation

Puzzled-Face
Copy link
Collaborator

Closes #814.

Please check methods involving Effloglog and LogisticIndepBeta to confirm my interpretation.

PuzzledFace and others added 28 commits May 9, 2023 15:21
Merge branch 'main' of github.com:Roche/crmPack into main

# Conflicts:
#	README.md
Merge branch 'main' of github.com:Roche/crmPack into main

# Conflicts:
#	R/Samples-methods.R
#	devel/rolling-crm-Simona.Rmd
#	examples/Sample-methods-approximate.R
#	man/approximate.Rd
#	tests/testthat/_snaps/Samples-methods.md
#	tests/testthat/test-Samples-methods.R
Merge branch 'main' of github.com:Roche/crmPack into main

# Conflicts:
#	vignettes/example.Rnw
Merge branch 'main' of github.com:Roche/crmPack into main

# Conflicts:
#	tests/testthat/_snaps/Samples-methods.md
#	tests/testthat/test-Samples-methods.R
Merge branch 'main' of github.com:Roche/crmPack into main

# Conflicts:
#	design/devel/rolling-crm-Simona.Rmd
Merge branch 'main' of github.com:Roche/crmPack into main

# Conflicts:
#	tests/testthat/_snaps/Samples-methods.md
Merge branch 'main' of github.com:Roche/crmPack into main

# Conflicts:
#	tests/testthat/_snaps/Samples-methods.md
Merge branch 'main' of github.com:Roche/crmPack into main
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Merge branch 'main' into 814-implement-knit_print-for-subclasses-of-design

# Conflicts:
#	DESCRIPTION
#	NAMESPACE
#	R/helpers_knitr_GeneralData.R
#	R/helpers_knitr_NextBest.R
#	R/helpers_knitr_Stopping.R
#	man/knit_print.Rd
@Puzzled-Face Puzzled-Face linked an issue May 13, 2024 that may be closed by this pull request
Copy link
Contributor

github-actions bot commented May 13, 2024

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
CrmPackClass-class 💚 $32.29$ $-7.74$ $+1$ $0$ $0$ $0$
CrmPackClass-methods 💚 $51.18$ $-1.81$ $+2$ $0$ $0$ $0$
Rules-methods 💔 $29.84$ $+1.01$ $0$ $0$ $0$ $0$
helpers_knitr 💔 $50.11$ $+6.72$ $+66$ $0$ $0$ $0$
helpers_knitr_Design 👶 $+0.94$ $+51$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
CrmPackClass-class 💚 $32.15$ $-7.74$ CrmPackClass_correctly_identifies_crmPack_classes
CrmPackClass-methods 💔 $21.53$ $+3.11$ tidy_methods_exist_for_all_relevant_classes
CrmPackClass-methods 💚 $29.66$ $-4.91$ tidy_methods_return_non_empty_value_for_all_classes
helpers_knitr 💔 $27.37$ $+3.24$ asis_parameter_works_correctly_for_all_implemented_methods
helpers_knitr 💔 $21.94$ $+3.44$ knit_print_output_is_suffixed_by_two_newlines_for_all_implemented_methods
helpers_knitr_Design 👶 $+0.06$ h_markdown_header_fails_gracefully_with_bad_input
helpers_knitr_Design 👶 $+0.01$ h_markdown_header_works_correctly
helpers_knitr_Design 👶 $+0.02$ h_prepare_section_labels_works_correctly
helpers_knitr_Design 👶 $+0.12$ knit_print_DADesign_works_correctly
helpers_knitr_Design 👶 $+0.10$ knit_print_DTDDesign_works_correctly
helpers_knitr_Design 👶 $+0.10$ knit_print_Design_works_correctly
helpers_knitr_Design 👶 $+0.13$ knit_print_DualDesign_works_correctly
helpers_knitr_Design 👶 $+0.13$ knit_print_DualResponsesDesign_works_correctly
helpers_knitr_Design 👶 $+0.16$ knit_print_DualResponsesSamplesDesign_works_correctly
helpers_knitr_Design 👶 $+0.05$ knit_print_RuleDesignOrdinal_works_correctly
helpers_knitr_Design 👶 $+0.03$ knit_print_RuleDesign_works_correctly
helpers_knitr_Design 👶 $+0.01$ knit_print_StartingDose_works_correctly
helpers_knitr_Design 👶 $+0.04$ v_starting_dose_works_correctly

Results for commit 6562989

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented May 15, 2024

badge

Code Coverage Summary

Filename                          Stmts    Miss  Cover    Missing
------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
R/checkmate.R                        87       2  97.70%   72, 432
R/crmPack-package.R                   4       0  100.00%
R/CrmPackClass-methods.R              5       0  100.00%
R/Data-class.R                      156       5  96.79%   43, 565-566, 572-577
R/Data-methods.R                    267       0  100.00%
R/Data-validity.R                   144       1  99.31%   21
R/Design-class.R                    396       0  100.00%
R/Design-methods.R                 2766     771  72.13%   563-567, 591-594, 602-621, 626-655, 659-660, 662, 677-685, 689, 701-720, 1122-1126, 1253, 1267-1271, 1333, 1523, 1740, 1767-1770, 1779-1790, 1794-1813, 1824-1828, 1834-1846, 2109, 2134-2137, 2144-2155, 2159-2178, 2190-2194, 2200-2212, 2496-2499, 2527-2530, 2538-2550, 2553-2564, 2568-2604, 2621-2630, 2636-2651, 2676, 2717-2718, 2981-3451, 3546-3557, 3560-3571, 3575-3611, 3628-3637, 3645-3660, 3698, 3740-3741, 4020, 4022-4023, 4082, 4118, 4155-4158, 4177-4181, 4242-4249, 4277-4281, 4289-4307, 4333-4352, 4355, 4388, 4410-4428, 4686, 4774
R/Design-validity.R                  34      10  70.59%   47-56
R/fromQuantiles.R                   172      52  69.77%   294-362
R/helpers_broom.R                    74      10  86.49%   30, 34-35, 37-38, 40, 81, 102-104
R/helpers_covr.R                     23       0  100.00%
R/helpers_data.R                     96       1  98.96%   139
R/helpers_design.R                  126      42  66.67%   22, 77-129, 250, 255-259
R/helpers_jags.R                     77       0  100.00%
R/helpers_knitr_CohortSize.R        109       0  100.00%
R/helpers_knitr_Design.R            346       8  97.69%   24-29, 323-324
R/helpers_knitr_GeneralData.R       180      59  67.22%   63-66, 79-82, 95-98, 110-113, 126-129, 151-153, 236-240, 249-294, 341
R/helpers_knitr_GeneralModel.R      730       3  99.59%   105, 401, 813
R/helpers_knitr_Increments.R        165       1  99.39%   297
R/helpers_knitr_NextBest.R          312       0  100.00%
R/helpers_knitr_SafetyWindow.R      142       1  99.30%   103
R/helpers_knitr_Stopping.R          225       0  100.00%
R/helpers_knitr.R                    12       0  100.00%
R/helpers_model.R                    85       4  95.29%   38, 89-90, 139
R/helpers_rules.R                   428       0  100.00%
R/helpers_samples.R                   5       0  100.00%
R/helpers_simulations.R              27       0  100.00%
R/helpers.R                         214      61  71.50%   107-127, 162-178, 200-302, 337-351
R/logger.R                           11       0  100.00%
R/mcmc.R                            290      18  93.79%   92-97, 376-377, 387, 389-390, 393-396, 579-580, 669, 675, 733
R/McmcOptions-class.R                22       0  100.00%
R/McmcOptions-methods.R               8       1  87.50%   43
R/McmcOptions-validity.R             42       0  100.00%
R/Model-class.R                    1062     166  84.37%   145-147, 216-218, 222-224, 283-285, 357-359, 363-365, 444-446, 513-515, 577-581, 584-587, 690-693, 697-698, 813-817, 937-939, 943-951, 1096-1098, 1103-1106, 1110-1113, 1229-1233, 1235-1238, 1242-1245, 1248, 1409-1419, 1424-1430, 1585-1588, 1594-1601, 1758, 1767, 1776, 1785, 1794-1799, 1935, 1944, 1953, 1961-1963, 2807-2836, 2840-2846, 2853-2857, 2862, 2969-2982, 3008, 3104-3106, 3110, 3203-3205, 3209, 3278-3290, 3308, 3368-3370, 3372-3373, 3376-3381
R/Model-methods.R                   505      38  92.48%   78, 233-238, 809-854, 1175-1184
R/Model-validity.R                  443      16  96.39%   430-433, 442-445, 596-604
R/ModelParams-class.R                17       0  100.00%
R/ModelParams-validity.R             21       0  100.00%
R/Rules-class.R                     463       0  100.00%
R/Rules-methods.R                  1561     182  88.34%   889, 892, 895, 1010, 1013, 1016, 1136-1139, 1173, 1276-1279, 1314, 2582-2590, 2614-2621, 2784-2793, 3109-3118, 3251-3494, 3781, 3785
R/Rules-validity.R                  448      30  93.30%   684-723
R/Samples-class.R                     6       0  100.00%
R/Samples-methods.R                1188      21  98.23%   410-420, 648, 1665-1666, 1698, 1711, 1893, 2223-2228
R/Samples-validity.R                 10       0  100.00%
R/Simulations-class.R               208       5  97.60%   759-762, 1019
R/Simulations-methods.R            1617    1473  8.91%    65-350, 406, 416-435, 448-453, 500-509, 674-2969
R/Simulations-validity.R             75      75  0.00%    20-168
R/utils.R                             6       0  100.00%
TOTAL                             15410    3056  80.17%

Diff against main

Filename                          Stmts    Miss  Cover
------------------------------  -------  ------  --------
R/helpers_knitr_CohortSize.R         +4       0  +100.00%
R/helpers_knitr_Design.R           +346      +8  +97.69%
R/helpers_knitr_GeneralData.R        -4      -3  +0.92%
R/helpers_knitr_GeneralModel.R     +182      -4  +0.87%
R/helpers_knitr_Increments.R         +4      -1  +0.64%
R/helpers_knitr_NextBest.R           +2       0  +100.00%
R/helpers_knitr_SafetyWindow.R       -6      -1  +0.65%
R/helpers_knitr_Stopping.R           +3       0  +100.00%
R/helpers_knitr.R                   +12       0  +100.00%
R/Model-methods.R                   +33       0  +0.53%
TOTAL                              +576      -1  +0.78%

Results for commit: 9b38ce4

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@Puzzled-Face
Copy link
Collaborator Author

For the following classes, a bare reference to a class object (for example .DefaultDesign()) generates no output. However, wrapping the reference in knit_print() produces the expected results. I am not sure why.

  • Design

Copy link
Collaborator

@danielinteractive danielinteractive left a comment

Choose a reason for hiding this comment

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

Thanks @Puzzled-Face , great progress!

Puzzled-Face and others added 5 commits June 4, 2024 13:23
Merge remote-tracking branch 'origin/main' into 814-implement-knit_print-for-subclasses-of-design

# Conflicts:
#	README.Rmd
…ithub.com:openpharma/crmPack into 814-implement-knit_print-for-subclasses-of-design
@danielinteractive
Copy link
Collaborator

This PR has been implemented on github.com/openpharma/crmPack. Do not use this PR.

The PR has also been moved. So this is now #823

@Puzzled-Face Puzzled-Face merged commit ac947e7 into main Jun 5, 2024
24 checks passed
@Puzzled-Face Puzzled-Face deleted the 814-implement-knit_print-for-subclasses-of-design branch June 5, 2024 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement knit_print for subclasses of Design
3 participants