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 = FALSE, .include = NULL)

add_config(.log_df)

Arguments

.base_dir

Base directory to look in for models.

.recurse

If FALSE, the default, only include models in .base_dir but not subdirectories. This is passed through to fs::dir_ls() -- If TRUE recurse fully, if a positive number the number of levels to recurse.

.include

A character vector specifying which runs or model tags to include in the run log.

.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 the model's output directory (which can be extracted via get_output_dir())

  • 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