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

683 replace/remove is.probability/is.range/is.prob range with applicable additional checkmate assertions #692

Conversation

dimitriskontosBAY
Copy link
Collaborator

Pull Request

Addresses the following taks from #683

  • is.probability
  • is.range
  • is.probRange

@dimitriskontosBAY dimitriskontosBAY marked this pull request as ready for review October 5, 2023 16:31
@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

badge

Code Coverage Summary

Filename                    Stmts    Miss  Cover    Missing
------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
R/checkmate.R                  73       1  98.63%   72
R/crmPack-package.R             4       0  100.00%
R/Data-class.R                147       5  96.60%   43, 564-565, 571-576
R/Data-methods.R              203       0  100.00%
R/Data-validity.R             144       1  99.31%   21
R/Design-class.R              320       0  100.00%
R/Design-methods.R           2779    1874  32.57%   111, 136-139, 147-158, 162-181, 193-197, 203-216, 392-516, 659-663, 687-690, 698-717, 722-751, 755-756, 758, 773-781, 785, 797-816, 1034-1375, 1426, 1616, 1787-3971, 4069, 4071-4072, 4131, 4167, 4204-4207, 4226-4230, 4291-4298, 4326-4330, 4338-4356, 4382-4401, 4404, 4437, 4459-4477, 4711
R/Design-validity.R            24       0  100.00%
R/fromQuantiles.R             176      67  61.93%   238-378
R/helpers_covr.R               23       0  100.00%
R/helpers_data.R               84       1  98.81%   139
R/helpers_design.R             75      35  53.33%   77-129
R/helpers_jags.R               77       0  100.00%
R/helpers_model.R              78       4  94.87%   38, 89-90, 139
R/helpers_rules.R             428       0  100.00%
R/helpers_simulations.R        18       0  100.00%
R/helpers.R                   224      61  72.77%   107-127, 162-178, 200-304, 339-353
R/logger.R                     11       0  100.00%
R/mcmc.R                      287      18  93.73%   90-95, 374-375, 385, 387-388, 391-394, 577-578, 667, 673, 731
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              1012     155  84.68%   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
R/Model-methods.R             376      34  90.96%   78, 155, 208, 675-720, 1039-1048
R/Model-validity.R            435       8  98.16%   430-433, 442-445
R/ModelParams-class.R          17       0  100.00%
R/ModelParams-validity.R       21       0  100.00%
R/Rules-class.R               431       2  99.54%   3150, 3231
R/Rules-methods.R            1429     164  88.52%   741, 744, 887, 890, 893, 1008, 1011, 1014, 1134-1137, 1171, 1274-1277, 1312, 2475-2483, 2507-2514, 3017-3260
R/Rules-validity.R            418       0  100.00%
R/Samples-class.R               6       0  100.00%
R/Samples-methods.R          1104      45  95.92%   406-416, 644, 1358-1393, 1616, 1629, 1794, 2124-2129
R/Samples-validity.R           10       0  100.00%
R/Simulations-class.R         190      28  85.26%   601-613, 708-718, 770-773
R/Simulations-methods.R      1604    1460  8.98%    65-350, 406, 416-435, 448-453, 500-509, 675-2944
R/Simulations-validity.R       75      75  0.00%    20-168
R/utils.R                       6       0  100.00%
TOTAL                       12381    4039  67.38%

Diff against main

Filename             Stmts    Miss  Cover
-----------------  -------  ------  -------
R/fromQuantiles.R       -2      -2  +0.70%
R/helpers.R             -7      -5  +1.34%
TOTAL                   -9      -7  +0.03%

Results for commit: 314e350

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2023

Unit Tests Summary

       1 files       37 suites   4m 28s ⏱️
1 183 tests 1 051 ✔️ 132 💤 0
6 235 runs  6 068 ✔️ 167 💤 0

Results for commit 314e350.

♻️ This comment has been updated with latest results.

@dimitriskontosBAY dimitriskontosBAY mentioned this pull request Oct 4, 2023
16 tasks
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 @dimitriskontosBAY , please see below

R/Rules-methods.R Outdated Show resolved Hide resolved
R/Rules-methods.R Outdated Show resolved Hide resolved
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.

almost there!

R/fromQuantiles.R Outdated Show resolved Hide resolved
R/fromQuantiles.R Outdated Show resolved Hide resolved
@@ -87,7 +89,6 @@ Quantiles2LogisticNormal <- function(dosegrid,
identical(length(upper), nDoses),
all(lower < median),
all(upper > median),
is.probability(level, bounds = FALSE),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

also here used assert_probability and avoid stopifnot.

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.

@danielinteractive danielinteractive merged commit 58042ec into main Nov 1, 2023
21 checks passed
@danielinteractive danielinteractive deleted the 683-replace/remove_is.probability/is.range/is.probRange_with_applicable_additional_checkmate_assertions branch November 1, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants