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

Print methods #235

Merged
merged 5 commits into from
Oct 19, 2023
Merged

Print methods #235

merged 5 commits into from
Oct 19, 2023

Conversation

gowerc
Copy link
Collaborator

@gowerc gowerc commented Oct 18, 2023

Partially addresses #197

As a slightly annoying aside apparently print.<class> does not work for S4 objects so I had to break with the S3 method convention and define a show method in order for it to work.

@gowerc gowerc changed the title Print method for Parameter, Prior, ParameterList WIP - Print method for Parameter, Prior, ParameterList Oct 18, 2023
@gowerc gowerc removed the request for review from danielinteractive October 18, 2023 11:36
@gowerc
Copy link
Collaborator Author

gowerc commented Oct 18, 2023

Removing reviewer request and converting back to draft, the other print methods are highly dependent on the parameters so will do them together

@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2023

badge

Code Coverage Summary

Filename                       Stmts    Miss  Cover    Missing
---------------------------  -------  ------  -------  ----------------------
R/DataJoint.R                     56       0  100.00%
R/DataLongitudinal.R             100       1  99.00%   245
R/DataSubject.R                   52       1  98.08%   123
R/DataSurvival.R                  55       1  98.18%   145
R/defaults.R                      13       7  46.15%   27, 45-84, 111
R/generics.R                      15       1  93.33%   69
R/JointModel.R                    91       8  91.21%   113-125, 204, 210, 216
R/JointModelSamples.R             23       0  100.00%
R/Link.R                          18       0  100.00%
R/LinkGSF.R                       69      13  81.16%   116-128
R/LinkNone.R                       5       1  80.00%   36
R/LinkRandomSlope.R               11       0  100.00%
R/LongitudinalGSF.R               24       0  100.00%
R/LongitudinalModel.R             17       0  100.00%
R/LongitudinalQuantities.R        71       8  88.73%   89-96
R/LongitudinalRandomSlope.R       22       0  100.00%
R/Parameter.R                     14       0  100.00%
R/ParameterList.R                 37       1  97.30%   175
R/Prior.R                        117       0  100.00%
R/Quantities.R                    89       0  100.00%
R/simulations_gsf.R               43       0  100.00%
R/simulations_os.R                11       5  54.55%   35-39
R/simulations_rs.R                21       0  100.00%
R/simulations.R                   99       1  98.99%   122
R/StanModel.R                     14       0  100.00%
R/StanModule.R                   145       5  96.55%   197-198, 215, 252, 263
R/SurvivalExponential.R           10       0  100.00%
R/SurvivalLoglogistic.R           11       0  100.00%
R/SurvivalModel.R                 19       0  100.00%
R/SurvivalQuantities.R           103       6  94.17%   161-166
R/SurvivalWeibullPH.R             11       0  100.00%
R/utilities.R                    145       1  99.31%   13
R/zzz.R                           11      11  0.00%    4-29
TOTAL                           1542      71  95.40%

Diff against main

Filename                       Stmts    Miss  Cover
---------------------------  -------  ------  --------
R/generics.R                      +1       0  +0.48%
R/JointModel.R                   +29      +3  -0.73%
R/Link.R                         +12       0  +100.00%
R/LinkGSF.R                       +6      +1  +0.21%
R/LinkNone.R                      +2       0  +13.33%
R/LinkRandomSlope.R               +1       0  +100.00%
R/LongitudinalGSF.R               +1       0  +100.00%
R/LongitudinalModel.R             +7       0  +100.00%
R/LongitudinalRandomSlope.R       +1       0  +100.00%
R/Parameter.R                     +4       0  +100.00%
R/ParameterList.R                 +9      +1  -2.70%
R/Prior.R                        +17     -20  +20.00%
R/StanModel.R                     +8       0  +100.00%
R/SurvivalExponential.R           +1       0  +100.00%
R/SurvivalLoglogistic.R           +1     -10  +100.00%
R/SurvivalModel.R                 +7       0  +100.00%
R/SurvivalWeibullPH.R             +1       0  +100.00%
TOTAL                           +108     -25  +2.09%

Results for commit: c5a2eeb

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2023

Unit Tests Summary

    1 files    31 suites   6m 44s ⏱️
  76 tests   61 ✔️ 15 💤 0
292 runs  277 ✔️ 15 💤 0

Results for commit c5a2eeb.

♻️ This comment has been updated with latest results.

@gowerc gowerc changed the title WIP - Print method for Parameter, Prior, ParameterList Print methods Oct 18, 2023
@gowerc
Copy link
Collaborator Author

gowerc commented Oct 18, 2023

Ok @danielinteractive this should be ready for review now. Due to their interconnected nature this implements the print methods for

  • StanModel
  • SurvivalModel
  • SurvivalExponential
  • SurvivalLogLogistic
  • SurvivalWeibullPH
  • LongitudinalModel
  • LongitudinalGSF
  • LongitudinalRandomSlope
  • Link
  • LinkGSF
  • LinkLongitudinal
  • Parameter
  • Prior
  • ParameterList

I would recommend reviewing this by just reviewing the _snaps/*.md files which outline clearly what is displayed when each of these objects is printed.

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.

Looks great, thanks @gowerc ! Great work

@gowerc gowerc merged commit 7e31961 into main Oct 19, 2023
23 checks passed
@gowerc gowerc deleted the feature/print-methods branch October 19, 2023 08:06
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.

2 participants