create_NVIpkg_skeleton: Create the package skeleton for NVIverse packages

View source: R/create_NVIpkg_skeleton.R

create_NVIpkg_skeletonR Documentation

Create the package skeleton for NVIverse packages

Description

Creates the package skeleton in agreement with the conventions developed for NVIverse packages. create_NVIpkg_skeleton should be run once after a GitHub repository has been synchronized with the the package directory.

Usage

create_NVIpkg_skeleton(
  pkg = stringi::stri_extract_last_words(usethis::proj_path()),
  pkg_path = usethis::proj_path(),
  license_keyword = "BSD_3_clause"
)

Arguments

pkg

[character(1)]
The package name. Defaults to stringi::stri_extract_last_words(usethis::proj_path()).

pkg_path

[character(1)]
The path to the package directory. Defaults to usethis::proj_path().

license_keyword

[character(1)]
The keyword for the package's license in accord with list of license keywords. Defaults to "BSD_3_clause".

Details

create_NVIpkg_skeleton is a wrapper for several usethis -functions. It sets up the package directory with standard files and standard sub-directories. Modifies the DESCRIPTION, .gitignore, and .Rbuildignore in agreement with standard dependencies for NVIverse.

Standard values are input to DESCRIPTION. For modifying these values, you need to modify set_description_default.

In addition README.Rmd-template, CONTRIBUTING, CODE_OF_CONDUCT, and the vignette Contribute_to_NVIpkg are copied to the package directory and develop.R is copied to "./notes/".

The function accepts a short list of the listed license keywords accepted at Cran in "./share/license/license.db" in R home. If you need any other license than in the short list, submit an issue.

Value

None. Sets up the package directories and writes and modifies several files, see details.

Author(s)

Petter Hopp Petter.Hopp@vetinst.no

Examples

## Not run: 
# Attach packages and set up with temporary directory
library(NVIpackager)
td <- tempdir()
if (!dir.exists(file.path(td, "NVItest"))) {
  dir.create(file.path(td, "NVItest"))
}
# Create package skeleton in temporary directory
create_NVIpkg_skeleton(pkg = "NVItest", pkg_path = file.path(td, "NVItest"))

## End(Not run)


PetterHopp/NVIpackager documentation built on Sept. 14, 2024, 1:24 a.m.