Create log for slushy environment
slushy_log.Rd
The `slushy_log` function provides an overview of the package environment, including package usage, dependencies, and mismatches in comparison to the set of approved packages and selected snapshot date. It can generate a custom report comparing library, lockfile, and package usage details, with the option to have `renv::diagnostics` appended to the output.
Usage
slushy_log(project = NULL, config = get_config(), full_report = FALSE)
Arguments
- project
Character. Path to the project directory. Defaults to the root of the project if `NULL`.
- config
List. The configuration object retrieved from `get_config()` that includes the `pkgs` list.
- full_report
Logical. If `TRUE`, generates a full report by running `renv::diagnostics` in addition to the summarized report. Defaults to `FALSE`.
Value
Invisible `NULL`. Outputs details in the console. The function generates either a summarized or full report.
Details
This function inspects the following aspects of the package environment:
Synchronization between the local environment and `renv` lockfile.
Alignment of installed packages versus available versions in the CRAN snapshot.
Usage of agreed upon packages (i.e., those listed in the `DESCRIPTION` file) in code.
Changes to set of agreed upon packages. The config file is referenced for the original set of agreed upon packages, and the `DESCRIPTION` file is referenced for the current set of agreed upon packages.
Report use of any packages outside the agreed-upon set (in `DESCRIPTION`).
If `full_report` is `TRUE`, a more detailed report is generated by running `renv::diagnostics` in addition to the summarized diagnostic.
Examples
if (FALSE) { # \dontrun{
# Generate a summarized diagnostic report
slushy_log(config = get_config("slushy_config.yml"), project = "/path/to/project", full_report = FALSE)
# Generate a full diagnostic report with `renv::diagnostics`
slushy_log(config = get_config("slushy_config.yml"), project = "/path/to/project", full_report = TRUE)
} # }