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: 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: /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:24933f86b657b9503f22440e8c4d3cac
#> → 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: ea755ef125efac5ee7c63278746f755b
#> → MB: module checksum updated:4384a4b237a13dcf1336aa17d775eaba
#>
#>
#> ℹ 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: 85045ec199c6740c2db16ac29e78d45e
#> → MB: module checksum updated:2fbe750710c93056cec56f103b8ea2a8
#> → 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: 89a81406b74e064e3b6900ddd55b4fc4
#> → MB: module checksum updated:d38d5ad2d937598ab9de9eee9a6373f8
#> → 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: 760e9e8b79d3ed74d07e5292550602ee
#> → MB: module checksum updated:f53f16d61b4b3e06e914e9708d695b03
#> → 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: 733d2a99d8aedb3dc652ebab2886310e
#> → MB: module checksum updated:da0eb5564092da700f999b139d202cee
#> → MB: added element idx: 2
#> → MB: module isgood: TRUE
session = sess_res$session
input = sess_res$input
# We also need a state variable
state = sess_res$state
state = MB_update_checksum(state)