Skip to contents

Takes a MB state and updates the checksum used to trigger downstream updates

Usage

MB_update_checksum(state)

Arguments

state

MB state from MB_fetch_state()

Value

MB state object with the checksum updated

Examples

# Within shiny both session and input variables will exist,
# this creates examples here for testing purposes:
sess_res = MB_test_mksession(session=list())
#> → 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: 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)
#>  
#>  
#>  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: 98407146cbcfb0e5392b7bf47aeb1d09
#> → MB: module checksum updated:a317b4031c8ca91b0c52f2a06412fe69
#>  
#>  
#>  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: 99b8ba1b35abab95a3b996e9a746e957
#> → MB: module checksum updated:73f9beb51e56ccf966b8875d8b341812
session = sess_res$session
input   = sess_res$input

# We also need a state variable
state = sess_res$state

state = MB_update_checksum(state)