BiocCheck-class: An internal class for composing BiocCheck reports

BiocCheck-classR Documentation

An internal class for composing BiocCheck reports

Description

The BiocCheck class provides a framework for reporting checks based on Bioconductor guidelines. The class has several methods for working with the provided checks that handle and display messages and the display of the metadata. These methods also record the output of the BiocCheck() report in both plain text and JSON formats.

Note that currently, multiple BiocCheck runs will interfere with each other given that they are implemented via a reference class semantic. When running multiple checks in the same session, you can separate these instances by running them in separate processes (e.g., via BiocParallel).

Arguments

...

character() A vector that makes up the BiocCheck exception message (e.g., 'Vignette must be built by R CMD build'). The character vector is handled with paste0 and made into a list and appended with help_text and messages.

help_text

character(1) Additional text prompting a list of files (e.g,. "Found in files:")

condition

character(1) One of the three conditions handled: error, warning, or note

messages

character() Often a vector of file names where the check was triggered.

debug

logical(1) Whether to append the name of the originating check name into for trace-ability

checkName

character(1) The title of the current group of checks. It can be set with handleCheck, e.g., handleCheck("Checking for version number mismatch..."). Internally, it ' is saved with setCheck and obtained with getLastCheck.

isOnBBS

logical(1) Indicates whether the checks are being run on the Bioconductor Build System (BBS). This is helpful for avoiding the creation of folders in the BBS.

file

character(1) A path to a JSON file for writing or reading as created by toJSON and fromJSON BiocCheck methods.

Details

The metadata includes a number of standard fields to allow easier troubleshooting and display of potentially relevant information. Currently, the fields included are:

  • BiocCheckVersion: The version of the BiocCheck package

  • BiocVersion: The version of Bioconductor

  • Package: The name of the package in check

  • PackageVersion: The version of the package in check

  • sourceDir: The directory of the package source or tarball in check

  • installDir: The directory where the package is installed for testing, a temporary location by default

  • BiocCheckDir: The directory where the ⁠<package>.BiocCheck⁠ folder is saved. Usually the same folder as the package in check

  • platform: The platform/OS where the check is taking place

  • isTarBall: Whether the package in check is a source directory or a tarball

Value

An internal BiocCheck R5 Reference Class used to document conditions such as errors, warnings, and notes

Fields

log

list() A running list of all conditions raised (i.e., notes, warnings, errors)

check

character(1) The title of the last check used for logging purposes.

error,warning,note

list() Finer extraction of each condition type

metadata

list() A list of additional information relevant to the package and its state. See details.

methods

  • add: Include a condition to the BiocCheck report

  • addMetadata: Add metadata to the BiocCheck object from a BiocPackage object

  • getLastCheck: Obtain the name of the last check run

  • setCheck: Create a new element in the internal list for a check

  • get: Extract the list of conditions raised by BiocCheck

  • getNum: Tally the number of condition provided by the input

  • zero: Reset the internal log of the condition provided

  • getBiocCheckDir: Report and create the ⁠<package>.BiocCheck⁠ directory as obtained from the metadata

  • composeReport: Simplify the list structure from the log and provide a character vector of conditions raised

  • report: Write the ⁠00BiocCheck.log⁠ report into the BiocCheck folder

  • toJSON: Write a JSON file to the location indicated with the conditions raised

  • fromJSON: Read a JSON file from the location indicated with the output of previous conditions raised in the check

  • show: Display the information in the class. Currently empty.

  • show_meta: Display the metadata information stored in the metadata field

See Also

Message-class, BiocPackage-class

Examples


bc <- BiocCheck:::.BiocCheck


Bioconductor/BiocCheck documentation built on June 12, 2025, 6:32 p.m.