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] (<https://orcid.org/0000-0002-2378-4915>, Created the package), Maëlle Salmon [aut, cre]
Maintainer: Maëlle Salmon <maelle@ropensci.org>
License: GPL (>= 3)+ file LICENSE
Version: 0.3.9999
Built: 2025-03-20 06:17:33 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. # nolint: line_length_linter 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_repo,
  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".

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. # nolint: line_length_linter 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("ropensci/rdflib", "../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"), destdir)

pkgreview_readme_md(pkg_data, destdir)

pkgreview_request(pkg_data, destdir)

Arguments

pkg_data

package metadata generated by pkgreview_getdata()

template

character string, one of review or editor.

destdir

where to save the template


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. # nolint: line_length_linter

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. # nolint: line_length_linter 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. # nolint: line_length_linter 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)

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"), destdir)

Arguments

template

character string, one of review or editor.

destdir

where to save the template

Value

writes a ⁠{template}.md⁠ checklist template file in destdir.

Examples

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

## End(Not run)