metrumresearchgroup / bbr

R interface for model and project management
https://metrumresearchgroup.github.io/bbr/
Other
21 stars 2 forks source link

model status refactor #693

Closed barrettk closed 1 month ago

barrettk commented 1 month ago

closes https://github.com/metrumresearchgroup/bbr/issues/685

barrettk commented 1 month ago

Local Tests

New Tests

> devtools::test(filter = "model-status")
ℹ Testing bbr
✔ | F W  S  OK | Context
✔ |         26 | Model status functions [2.0s]                                                                                                               

══ Results ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Duration: 2.0 s

[ FAIL 0 | WARN 0 | SKIP 0 | PASS 26 ]
Full Test Results ```r > devtools::test() ℹ Testing bbr ✔ | F W S OK | Context ✔ | 21 | bbr exec functions ✔ | 13 | checking if models are up to date [1.3s] ✔ | 9 | Collapse columns to string representation [1.1s] ✔ | 73 | Constructing config log from bbi_config.json [3.7s] ✔ | 43 | Copying model objects ✔ | 8 | copy-model-helpers ✔ | 34 | cov-cor ✔ | 35 | Extract model paths from based_on fields [3.0s] ✔ | 34 | Test get_omega, get_sigma, and get_theta functions [2.4s] ✔ | 67 | Build paths from model object [1.6s] ✔ | 22 | inherit-param-estimates [4.4s] ✔ | 26 | initial-estimates [1.1s] ✔ | 7 | model_diff() comparing models ✔ | 26 | Model status functions [2.0s] ✔ | 19 | Test bbi summary on multiple models [1.0s] ✔ | 108 | Test bbi summary functions [3.2s] ✔ | 73 | Modify attributes of model object ✔ | 25 | Testing function to create or read in model object ✔ | 35 | nm-file ✔ | 38 | nm-join [3.0s] ✔ | 26 | nm-tables ✔ | 30 | Test bbi batch parameter estimate functions [8.1s] ✔ | 11 | Test param_estimates functions [1.1s] ✔ | 43 | test parsing labels for parameter table [1.6s] ✔ | 34 | testing print methods for bbi objects [8.1s] ✔ | 5 | read_bbi_path() helper function ✔ | 50 | Reading NONMEM output files into R ✔ | 66 | Constructing run log from model yaml [2.4s] ✔ | 10 | submit_model(.dry_run=T) ✔ | 14 | submit_models(.dry_run=T) ✔ | 86 | Test creating summary logs [13.1s] ✔ | 9 | Comparing tags between models ✔ | 47 | test_threads(.dry_run=T) [8.3s] ✔ | 21 | tweak-initial-estimates [1.1s] ✔ | 16 | test-use-bbi [4.1s] ✔ | 34 | Utility functions for building args, etc. ✔ | 43 | testing a composable workflow and running bbi [238.5s] ✔ | 72 | testing bootstrap functionality and running bbi [150.2s] ══ Results ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ Duration: 471.7 s [ FAIL 0 | WARN 0 | SKIP 0 | PASS 1333 ] ```
barrettk commented 1 month ago

Addressed comments:

Full Test Results ```r > devtools::test() ℹ Testing bbr ✔ | F W S OK | Context ✔ | 21 | bbr exec functions ✔ | 13 | checking if models are up to date [1.4s] ✔ | 9 | Collapse columns to string representation [1.1s] ✔ | 73 | Constructing config log from bbi_config.json [3.3s] ✔ | 43 | Copying model objects ✔ | 8 | copy-model-helpers ✔ | 34 | cov-cor ✔ | 35 | Extract model paths from based_on fields [3.7s] ✔ | 34 | Test get_omega, get_sigma, and get_theta functions [2.4s] ✔ | 67 | Build paths from model object [1.6s] ✔ | 22 | inherit-param-estimates [4.0s] ✔ | 26 | initial-estimates [1.3s] ✔ | 7 | model_diff() comparing models ✔ | 26 | Model status functions [2.3s] ✔ | 19 | Test bbi summary on multiple models ✔ | 108 | Test bbi summary functions [3.3s] ✔ | 73 | Modify attributes of model object ✔ | 25 | Testing function to create or read in model object ✔ | 35 | nm-file ✔ | 38 | nm-join [2.9s] ✔ | 26 | nm-tables ✔ | 30 | Test bbi batch parameter estimate functions [8.2s] ✔ | 11 | Test param_estimates functions [1.1s] ✔ | 43 | test parsing labels for parameter table [1.8s] ✔ | 34 | testing print methods for bbi objects [8.8s] ✔ | 5 | read_bbi_path() helper function ✔ | 50 | Reading NONMEM output files into R ✔ | 66 | Constructing run log from model yaml [2.3s] ✔ | 10 | submit_model(.dry_run=T) ✔ | 14 | submit_models(.dry_run=T) ✔ | 86 | Test creating summary logs [12.7s] ✔ | 9 | Comparing tags between models ✔ | 47 | test_threads(.dry_run=T) [6.9s] ✔ | 21 | tweak-initial-estimates [1.2s] ✔ | 16 | test-use-bbi [4.1s] ✔ | 34 | Utility functions for building args, etc. ✔ | 43 | testing a composable workflow and running bbi [233.1s] ✔ | 72 | testing bootstrap functionality and running bbi [151.3s] ══ Results ══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ Duration: 467.4 s [ FAIL 0 | WARN 0 | SKIP 0 | PASS 1333 ] ```