Takes a MB state and updates the checksum used to trigger downstream updates
Arguments
- state
MB state from
MB_fetch_state()
Examples
# Within shiny both session and input variables will exist,
# this creates examples here for testing purposes:
sess_res = MB_test_mksession()
#> → 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: including file
#> → MB: source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → MB: dest: file.path("config","report.docx")
#> → MB: including file
#> → MB: source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → MB: dest: file.path("config","report.pptx")
#> → MB: including file
#> → MB: source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → MB: dest: file.path("config","report.yaml")
#> ! MB: User-defined model: /private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpajgEZL/preload_8ef86c0fb54f/user_model.R not found (skipping)
#> ! MB: User-defined model: /private/var/folders/pq/7srbf_fx3rd3k706hgxkg61r0000gp/T/RtmpajgEZL/preload_8ef86c0fb54f/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: dbe2b51528cd80c016e14caab704cce9
#> → MB: module checksum updated:7bd92b322e49d245920d8daac113bb26
#>
#>
#> ℹ 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: 03c4bee0db67bd8f526af7a9df3772e7
#> → MB: module checksum updated:8aebff15b1ec474b31590c1aebe52c0d
#> → 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: 2d736a3a9a0f0815893b7ec8d599b8b5
#> → MB: module checksum updated:d06b067e9fc68a8fbae038a2dd2a8720
#> → 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: cae61cd7b23273ac980e8eba5604eecf
#> → MB: module checksum updated:5b0c9b61d23568e60447e343110e8b25
#> → 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: f8a442963fac79351e3c7b6dab6da095
#> → MB: module checksum updated:20402c34573afa5b0b37175f7f889025
#> → MB: added element idx: 2
#> → MB: module isgood: TRUE
#> → # preload_complete is good: TRUE ------------------------------------------
session = sess_res$session
input = sess_res$input
# We also need a state variable
state = sess_res$state
state = MB_update_checksum(state)
