Skip to contents

Populates the supplied session variable for testing.

Usage

CTS_test_mksession(session = list(), full = FALSE)

Arguments

session

Shiny session variable (in app) or a list (outside of app)

full

Boolean indicating if the full test session should be created (TRUE) or a minimal test session should be created (FALSE, default)

Value

The CTS portion of the all_sess_res returned from FM_app_preload

See also

Examples

# \donttest{
session = shiny::MockShinySession$new()
sess_res = CTS_test_mksession(session=session)
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → ASM:   dest:   file.path("config","report.docx")
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → ASM:   dest:   file.path("config","report.pptx")
#> → ASM: including file
#> → ASM:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → ASM:   dest:   file.path("config","report.yaml")
#> → ASM: State initialized
#> → ASM: setting word placeholders: 
#> → ASM:   -> setting docx ph: HEADERLEFT = left header
#> → ASM:   -> setting docx ph: HEADERRIGHT = right header
#> → ASM:   -> setting docx ph: FOOTERLEFT = left footer
#> → ASM: module isgood: TRUE
#> ! MB: User-defined model: /Users/jmh/projects/ruminate/github/ruminate/docs/reference/user_model.R not found (skipping)
#> ! MB: User-defined model: /Users/jmh/projects/ruminate/github/ruminate/docs/reference/user_model.ctl not found (skipping)
#> → MB: module checksum updated:f7de2055542d3ff1b085fafc2d30a1f8
#> → MB: State initialized
#> → MB: loading model idx: 1
#>  
#>  
#>  parameter labels from comments are typically ignored in non-interactive mode
#>  Need to run with the source intact to parse comments
#> → MB: model checksum updated: c14e969ba21054eeb262665b522b38ab
#> → MB: module checksum updated:1ee6bc174d3ac3d5f63e061f4b62ac9f
#>  
#>  
#>  parameter labels from comments are typically ignored in non-interactive mode
#>  Need to run with the source intact to parse comments
#> → MB: model checksum updated: 7ee41ddbee7dc64ec148e0e9943f80b0
#> → MB: module checksum updated:268c8e0d269ec758e8cb0c46b8f1af5b
#> → MB:   -> setting name: One compartment model
#> → MB:   -> setting time scale: hours
#> → MB:   -> setting base from: user
#> → MB:   -> setting catalog selection: 
#> → MB:   -> setting base model id: manual
#> → MB:   -> setting base model name: manual
#> → MB: model checksum updated: 18a6278d915317490fa0eceb1a19027f
#> → MB: module checksum updated:f88264abdaacc1cec87b4f6368ddb6ef
#> → MB: added element idx: 1
#> → MB: loading model idx: 2
#>  
#>  
#>  parameter labels from comments are typically ignored in non-interactive mode
#>  Need to run with the source intact to parse comments
#> → MB: model checksum updated: 9eb2007160d41e11ab23aaf9aa4f8afd
#> → MB: module checksum updated:60e9acd678dea9aa473ec7010f075c2d
#> → MB:   -> setting name: PK Biomarker
#> → MB:   -> setting time scale: days
#> → MB:   -> setting base from: user
#> → MB:   -> setting catalog selection: 
#> → MB:   -> setting base model id: manual
#> → MB:   -> setting base model name: manual
#> → MB: model checksum updated: 27532a1af6e3865834991039cac9b640
#> → MB: module checksum updated:30317e1bf424fd5fb0385290dc0fd361
#> → MB: added element idx: 2
#> → MB: module isgood: TRUE
#> → CTS: source model change detected
#> → CTS:  > covariates reset
#> → CTS: cohort checksum updated: 408dbcd3c36f3a28cfe2f53a64272ab6
#> → CTS: module checksum updated: a6d3070b979e676256c460b1458907b7
#> → CTS: State initialized
#> → CTS: loading element idx: 1
#> → CTS: setting cohort name: Single dose
#> → CTS: setting model source: MB_obj_1_rx
#> → CTS: setting trial options:
#> → CTS:   - nsub: 3
#> → CTS:   - visit_times: 0
#> → CTS:   - trial_end: 100
#> → CTS:   - fpage: 1
#> → CTS:   - dvcols: Cc
#> → CTS:   - time_scale: 
#> → CTS:   - tc_dim: d2x4
#> → CTS:   - evplot: 1
#> → CTS:   - cts_config_atol: 1e-8
#> → CTS:   - cts_config_rtol: 1e-6
#> → CTS:   - cts_config_sigdig: NULL
#> → CTS:   - cts_config_seed: 5446
#> → CTS:   - cts_config_nsteps: 5
#> → CTS:   - cts_config_preamble: 
#> → CTS: cohort checksum updated: 0437ea01cea4e2ef5504aa890a2cedcc
#> → CTS: module checksum updated: 3811e37a102f39ea9f417b5d44447421
#> → CTS: adding rule: first_dose
#> → CTS: add rule success
#> → CTS: rule added
#> → CTS: cohort checksum updated: f8d65447eee4810c711da3eb74d8f13e
#> → CTS: module checksum updated: 125c1ed508db99f334a3948173e88f04
#>  
#>  
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#>  
#>  
#> Warning: multi-subject simulation without without 'omega'
#> → CTS: simulation complete
#> → CTS: plot complete
#> → CTS: cohort checksum updated: 0570f60d8c801b785117fa7c7766185b
#> → CTS: module checksum updated: c3229443515fc9653d43d62fd1bb65c2
#> → CTS: added element idx: 1
#> → CTS: module isgood: TRUE
# }