Extracts selected fields from bbi_config.json, which is created by bbi in the model output folder to store metadata about the execution of a model run.

config_log(.base_dir, .recurse = TRUE)

add_config(.log_df)

Arguments

.base_dir

Base directory to look in for models.

.recurse

If TRUE, the default, search recursively in all subdirectories. Passed through to fs::dir_ls() -- If a positive number, the number of levels to recurse.

.log_df

A bbi_run_log_df tibble (the output of run_log()).

Value

An object of class bbi_config_log_df, which includes the fields described below. If no bbi_config.json files are found, the returned tibble will only contain the absolute_model_path and run columns, and will have 0 rows.

config_log() creates a new tibble with one row per bbi_config.json found in .base_dir (and subdirectories, if .recurse = TRUE).

add_config() adds these fields to the tibble passed to .log_df.

Details

The following fields from are extracted from bbi_config.json.

  • absolute_model_path: the path to the model file, excluding the file extension

  • model_md5: the MD5 sum of the model file

  • data_path: the path to the data file, relative to absolute_model_path

  • data_md5: the MD5 sum of the data file

  • bbi_version: the version of bbi last used to run the model

  • nm_version: the version of NONMEM last used to run the model

  • model_has_changed: a logical indicating whether the model file has changed since it was last run

  • data_has_changed: a logical indicating whether the data file has changed since the model was last run

See also