Skip to content

inbo/checklist

Repository files navigation

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Lifecycle:maturing GitHub License Release R build status r-universe name r-universe package Codecov test coverage GitHub code size in bytes GitHub repo size DOI

The Checklist Package A hexagon with the word checklist

The goal of checklist is to provide an elaborate and strict set of checks for R packages and R code.

Installation

You can install the package from the INBO universe via

# Enable the INBO universe
options(
  repos = c(
    inbo = "https://inbo.r-universe.dev", CRAN = "https://cloud.r-project.org"
  )
)
# Install the packages
install.packages("checklist")

If that doesn’t work, you can install the version from GitHub with:

# install.packages("remotes")
remotes::install_github("inbo/checklist")

Setting a default organisation

We created checklist with the Research Institute for Nature and Forest (INBO) in mind. When you don’t specify the organisation, checklist assumes the code was written by INBO personnel. INBO has specific requirements which are not relevant for external users of checklist.

When you are not writing code for INBO, we recommend that you set a default organisation. Below we specify the defaults for INBO. More details in vignette("organisation", package = "checklist").

library(checklist)
org <- organisation$new(
  github = "inbo", community = "inbo", email = "info@inbo.be",
  rightsholder = "Research Institute for Nature and Forest (INBO)",
  funder = "Research Institute for Nature and Forest (INBO)",
  organisation = list(
    "inbo.be" = list(
      affiliation = c(
        en = "Research Institute for Nature and Forest (INBO)",
        nl = "Instituut voor Natuur en Bosonderzoek (INBO)"
      ),
      orcid = TRUE
    ) 
  )
)
default_organisation(org = org)

Using checklist on a package.

Before you can run the checks, you must initialise checklist on the package. Either use create_package() to create a new package from scratch. Or use setup_package() on an existing package. More details in vignette("getting_started", package = "checklist").

create_package()

Once initialised, you can run all the checks with check_package(). Or run the individual checks.

check_cran()
check_description()
check_documentation()
check_lintr()
check_filename()
check_folder()
update_citation()

To allow some of the warnings or notes, first run the checks and store them in an object. Update checklist.yml by writing that object.

x <- check_package()
write_checklist(x)

Using checklist on a project.

Before you can run the checks, you must initialise checklist on the project. Either use create_project() to create a new package from scratch. Or use setup_project() on an existing package. More details in vignette("getting_started_project", package = "checklist").

library(checklist)
create_project()

Once initialised, you can run all the checks with check_project(). Or run the individual checks.

check_lintr()
check_filename()
check_folder()
update_citation()

To allow some of the warnings or notes, first run the checks and store them in an object. Update checklist.yml by writing that object.

x <- check_project()
write_checklist(x)