Create one or more badges showing the status of your R package. Uses the package badger.
use_badges(
ref = NULL,
add_hex = TRUE,
add_actions = "rworkflows",
add_doi = NULL,
add_lifecycle = FALSE,
add_github_version = TRUE,
add_commit = TRUE,
add_code_size = TRUE,
add_license = TRUE,
add_authors = TRUE,
add_codecov = TRUE,
add_codecov_graphs = "icicle",
add_bioc_release = FALSE,
add_bioc_download_month = FALSE,
add_bioc_download_total = FALSE,
add_bioc_download_rank = FALSE,
add_cran_release = FALSE,
add_cran_checks = FALSE,
add_cran_download_month = FALSE,
add_cran_download_total = FALSE,
branch = "master",
as_list = FALSE,
sep = "\n",
hex_height = 300,
codecov_graph_width = 200,
colors = list(github = "black", bioc = "green", cran = "black", default = "blue",
lifecycle = NULL),
verbose = TRUE
)
Reference for a GitHub repository. If NULL
(the default), the reference is determined by the URL
field in the DESCRIPTION file.
Add a hex sticker.
If add_hex=TRUE
, will assume the sticker is located at the following
relative path: "inst/hex/hex.png".
If add_hex
is a character string, this will instead
be used as the relative hex path (e.g. "/images/mysticker.png"
).
The name of one or more GitHub Actions to show the status for with badge_github_actions (e.g. c("rworkflows","rworkflows_static")).
Add the DOI of a given package or publication
associated with the package using badge_doi.
Must be provided as a character string, e.g.:
"10.1111/2041-210X.12628"
Add package lifecycle stage.
If not FALSE
, must be a character string indicating
one of the following valid lifecycle stage:
"stable"
"deprecated"
"superseded"
"experimental"
See lifecycle.r-lib.org for further details.
Add package version with badge_github_version.
Add the last GitHub repo commit date with badge_last_commit.
Add code size with badge_code_size.
Add license info with badge_license.
Add author names inferred from
the DESCRIPTION
file.
Add Codecov status with badge_codecov. See the Codecov site for more information about these badges.
Add Codecov graphs visualising results of code coverage tests. Options include:
"sunburst"
"tree"
"icicle"
See the Codecov site for more information about each plot type.
Add Bioc release version with badge_bioc_release.
Add the number of Bioc downloads last month badge_bioc_download.
Add the number of Bioc downloads total badge_bioc_download.
Add the download rank of the package on Bioc badge_bioc_download_rank.
Add Bioc release version with badge_cran_release.
Add whether package is passing all checks on CRAN with badge_cran_checks.
Add the number of CRAN downloads last month badge_cran_download.
Add the number of CRAN downloads total badge_cran_download.
Name of the GitHub repository branch to use.
Return the header as a named list (TRUE
),
or a collapsed text string (default: FALSE
).
Character to separate each item in the list with using paste.
Height of the hex sticker in pixels
(when add_hex=TRUE
).
Width of each Codecov graph in pixels
(when add_codecov_graph!=FALSE
).
Colors to assign to each group of badges (when possible).
Print messages.
A named list of selected badges in markdown format.
badges <- rworkflows::use_badges(ref = "neurogenomics/rworkflows")
#> Finding hex sticker(s) for 1 package(s).
#> Adding license.
#> Adding version.
#> Adding code size
#> Adding commit.
#> Adding actions.
#> Adding codecov.
#> Adding authors.
#> When refs is provided, paths must have the same length (or be set to NULL). Setting paths=NULL.
#> <img src='https://github.com/neurogenomics/rworkflows/raw/master/inst/hex/hex.png' title='Hex sticker for rworkflows' height='300'><br>
#> [![License: GPL-3](https://img.shields.io/badge/license-GPL--3-blue.svg)](https://cran.r-project.org/web/licenses/GPL-3)
#> [![](https://img.shields.io/badge/devel%20version-1.0.5-black.svg)](https://github.com/neurogenomics/rworkflows)
#> [![](https://img.shields.io/github/languages/code-size/neurogenomics/rworkflows.svg)](https://github.com/neurogenomics/rworkflows)
#> [![](https://img.shields.io/github/last-commit/neurogenomics/rworkflows.svg)](https://github.com/neurogenomics/rworkflows/commits/master)
#> <br>
#> [![R build status](https://github.com/neurogenomics/rworkflows/workflows/rworkflows/badge.svg)](https://github.com/neurogenomics/rworkflows/actions)
#> [![](https://codecov.io/gh/neurogenomics/rworkflows/branch/master/graph/badge.svg)](https://app.codecov.io/gh/neurogenomics/rworkflows)
#> <br>
#> <a href='https://app.codecov.io/gh/neurogenomics/rworkflows/tree/master' target='_blank'><img src='https://codecov.io/gh/neurogenomics/rworkflows/branch/master/graphs/icicle.svg' title='Codecov icicle graph' width='200' height='50' style='vertical-align: top;'></a>
#> <h4>Authors: <i>Brian Schilder, Alan Murphy, Nathan Skene</i></h4>