Package 'pkgreviewr'

Title: rOpenSci package review project template
Description: Creates files and collects materials necessary to complete an rOpenSci package review. Review files are prepopulated with review package specific metadata. Review package source code is also cloned for local testing and inspection.
Authors: Anna Krystalli [aut, cre], Maëlle Salmon [aut]
Maintainer: Anna Krystalli <[email protected]>
License: GPL (>= 3)+ file LICENSE
Version: 0.3.1
Built: 2024-11-27 03:55:36 UTC
Source: https://github.com/ropensci-org/pkgreviewr

Help Index


Create a review project.

Description

Create and initialise an rOpenSci package review project

Usage

pkgreview_create(
  pkg_repo,
  review_parent = ".",
  template = c("review", "editor"),
  issue_no = NULL
)

Arguments

pkg_repo

character string of the repo owner and name in the form of "owner/repo".

review_parent

directory in which to setup review project and source package source code.

template

character string, one of review or editor.

issue_no

integer. Issue number of the pkg review in the rOpenSci software-review repository. If NULL (default), the issue number is extracted from the rOpenSci Under Review badge on the pkg repository README. Supplying an integer to issue_no overrides this behaviour and can be useful if a badge has not been added to the README yet.

Value

setup review project with templates

Examples

## Not run: 
# for a review project
pkgreview_create(pkg_repo = "ropensci/rdflib", review_parent = "~/Documents/reviews/")
# for editors checks
pkgreview_create(pkg_repo = "ropensci/rdflib", review_parent = "~/Documents/editorials/",
template = "editor")

## End(Not run)

pkgreview_getdata

Description

get package metadata from package source code.

Usage

pkgreview_getdata(
  pkg_dir = NULL,
  pkg_repo,
  template = c("review", "editor"),
  issue_no = NULL
)

Arguments

pkg_dir

path to package source directory, cloned from github. Defaults to the package source code directory in the review parent.

pkg_repo

character string of the repo owner and name in the form of "owner/repo".

template

character string, one of review or editor.

issue_no

integer. Issue number of the pkg review in the rOpenSci software-review repository. If NULL (default), the issue number is extracted from the rOpenSci Under Review badge on the pkg repository README. Supplying an integer to issue_no overrides this behaviour and can be useful if a badge has not been added to the README yet.

Value

a list of package metadata

Examples

## Not run: 
# run from within a pkgreviewr project with the package source code in a
sibling directory
pkgreview_getdata("../rdflib")

## End(Not run)

Create review templates.

Description

Creates skeleton review files:

  • index.Rmd: html_notebook to perform and record review in

  • README.md: prepopulated README for review repo.

index.Rmd will be automatically added to .Rbuildignore. The resulting templates are populated with default YAML frontmatter and R fenced code chunks (Rmd).

Usage

pkgreview_index_rmd(pkg_data, template = c("review", "editor"))

pkgreview_readme_md(pkg_data)

pkgreview_request(pkg_data)

Arguments

pkg_data

package metadata generated by pkgreview_getdata()

template

character string, one of review or editor.

Examples

## Not run: 
pkg_data <- pkgreview_getdata(pkg_dir)
pkgreview_index_rmd(pkg_data)
pkgreview_readme_md(pkg_data)

## End(Not run)

Initialise pkgreview

Description

Initialise pkgreview

Usage

pkgreview_init(
  pkg_repo,
  review_dir = ".",
  pkg_dir = NULL,
  template = c("review", "editor"),
  issue_no = NULL
)

Arguments

pkg_repo

character string of the repo owner and name in the form of "owner/repo".

review_dir

path to the review directory. Defaults to the working directory.

pkg_dir

path to package source directory, cloned from github. Defaults to the package source code directory in the review parent.

template

character string, one of review or editor.

issue_no

integer. Issue number of the pkg review in the rOpenSci software-review repository. If NULL (default), the issue number is extracted from the rOpenSci Under Review badge on the pkg repository README. Supplying an integer to issue_no overrides this behaviour and can be useful if a badge has not been added to the README yet.

Value

Initialisation creates pre-populated index.Rmd, pkgreview.md and README.md documents. To initialise correctly, the function requires that the source code for the package has been cloned. This might need to be done manually if it failed during review creation. If setup is correct.

Examples

## Not run: 
# run from within an uninitialised pkgreviewr project
pkgreview_init(pkg_repo = "ropensci/rdflib")

## End(Not run)

Print review package function source code

Description

Print review package function source code

Usage

pkgreview_print_source(pkgname)

Arguments

pkgname

character string. review package name

Value

prints out function source code for all exported functions.

Examples

## Not run: 
library("pkgreviewr")
pkgreview_print_source("pkgreviewr")

## End(Not run)

Render request email body

Description

Launches an interactive input browser tab to complete required parameters:

  • reviewer_first_name: reviewers first name

  • banter: character string of custom greeting message

  • JOSS: logical, whether review includes submission to JOSS

Usage

render_request()

Value

renders request.Rmd using parameters provided.

Examples

## Not run: 
render_request()

## End(Not run)

Try whoami

Description

Try to get whoami info from local gh token.

Usage

try_whoami()

Value

a list of whoami token metadata


Create software review/editor response template

Description

Clone an up to date copy of the specified ropensci software review/editor response template.

Usage

use_onboarding_tmpl(template = c("review", "editor"))

Arguments

template

character string, one of review or editor.

Value

writes a ⁠{template}.md⁠ checklist template file in the project root.

Examples

## Not run: 
use_onboarding_tmpl(template = "editor")

## End(Not run)