项目作者: inbo

项目描述 :
An R package for checking R packages and R code
高级语言: R
项目地址: git://github.com/inbo/checklist.git
创建时间: 2020-07-06T07:53:41Z
项目社区:https://github.com/inbo/checklist

开源协议:GNU General Public License v3.0

下载


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

" class="reference-link">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

  1. # Enable the INBO universe
  2. options(
  3. repos = c(
  4. inbo = "https://inbo.r-universe.dev", CRAN = "https://cloud.r-project.org"
  5. )
  6. )
  7. # Install the packages
  8. install.packages("checklist", dependencies = TRUE)

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

  1. # install.packages("remotes")
  2. remotes::install_github("inbo/checklist", dependencies = TRUE)

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").

  1. library(checklist)
  2. org <- organisation$new(
  3. github = "inbo", community = "inbo", email = "info@inbo.be",
  4. rightsholder = "Research Institute for Nature and Forest (INBO)",
  5. funder = "Research Institute for Nature and Forest (INBO)",
  6. organisation = list(
  7. "inbo.be" = list(
  8. affiliation = c(
  9. en = "Research Institute for Nature and Forest (INBO)",
  10. nl = "Instituut voor Natuur en Bosonderzoek (INBO)"
  11. ),
  12. orcid = TRUE
  13. )
  14. )
  15. )
  16. 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").

  1. create_package()

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

  1. check_cran()
  2. check_description()
  3. check_documentation()
  4. check_lintr()
  5. check_filename()
  6. check_folder()
  7. 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.

  1. x <- check_package()
  2. 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").

  1. library(checklist)
  2. create_project()

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

  1. check_lintr()
  2. check_filename()
  3. check_folder()
  4. 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.

  1. x <- check_project()
  2. write_checklist(x)