1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/github-actions.R, R/tidyverse.R, R/upkeep.R
\name{use_tidy_github_actions}
\alias{use_tidy_github_actions}
\alias{tidyverse}
\alias{create_tidy_package}
\alias{use_tidy_description}
\alias{use_tidy_dependencies}
\alias{use_tidy_contributing}
\alias{use_tidy_support}
\alias{use_tidy_issue_template}
\alias{use_tidy_coc}
\alias{use_tidy_github}
\alias{use_tidy_style}
\alias{use_tidy_logo}
\alias{use_tidy_upkeep_issue}
\title{Helpers for tidyverse development}
\usage{
use_tidy_github_actions(ref = NULL)
create_tidy_package(path, copyright_holder = NULL)
use_tidy_description()
use_tidy_dependencies()
use_tidy_contributing()
use_tidy_support()
use_tidy_issue_template()
use_tidy_coc()
use_tidy_github()
use_tidy_style(strict = TRUE)
use_tidy_logo(geometry = "240x278", retina = TRUE)
use_tidy_upkeep_issue(last_upkeep = last_upkeep_year())
}
\arguments{
\item{ref}{Desired Git reference, usually the name of a tag (\code{"v2"}) or
branch (\code{"main"}). Other possibilities include a commit SHA (\code{"d1c516d"})
or \code{"HEAD"} (meaning "tip of remote's default branch"). If not specified,
defaults to the latest published release of \code{r-lib/actions}
(\url{https://github.com/r-lib/actions/releases}).}
\item{path}{A path. If it exists, it is used. If it does not exist, it is
created, provided that the parent path exists.}
\item{copyright_holder}{Name of the copyright holder or holders. This
defaults to \code{"{package name} authors"}; you should only change this if you
use a CLA to assign copyright to a single entity.}
\item{strict}{Boolean indicating whether or not a strict version of styling
should be applied. See \code{\link[styler:tidyverse_style]{styler::tidyverse_style()}} for details.}
\item{geometry}{a \link[magick:geometry]{magick::geometry} string specifying size. The default
assumes that you have a hex logo using spec from
\url{http://hexb.in/sticker.html}.}
\item{retina}{\code{TRUE}, the default, scales the image on the README,
assuming that geometry is double the desired size.}
\item{last_upkeep}{Year of last upkeep. By default, the
\code{Config/usethis/last-upkeep} field in \code{DESCRIPTION} is consulted for this, if
it's defined. If there's no information on the last upkeep, the issue will
contain the full checklist.}
}
\description{
These helpers follow tidyverse conventions which are generally a little
stricter than the defaults, reflecting the need for greater rigor in
commonly used packages.
}
\details{
\itemize{
\item \code{use_tidy_github_actions()}: Sets up the following workflows using \href{https://github.com/features/actions}{GitHub Actions}:
\itemize{
\item Run \verb{R CMD check} on the current release, devel, and four previous
versions of R. The build matrix also ensures \verb{R CMD check} is run at
least once on each of the three major operating systems (Linux, macOS,
and Windows).
\item Report test coverage.
\item Build and deploy a pkgdown site.
\item Provide two commands to be used in pull requests: \verb{/document} to run
\code{roxygen2::roxygenise()} and update the PR, and \verb{/style} to run
\code{styler::style_pkg()} and update the PR.
This is how the tidyverse team checks its packages, but it is overkill
for less widely used packages. Consider using the more streamlined
workflows set up by \code{\link[=use_github_actions]{use_github_actions()}} or
\code{\link[=use_github_action_check_standard]{use_github_action_check_standard()}}.
}
}
\itemize{
\item \code{create_tidy_package()}: creates a new package, immediately applies as many
of the tidyverse conventions as possible, issues a few reminders, and
activates the new package.
\item \code{use_tidy_dependencies()}: sets up standard dependencies used by all
tidyverse packages (except packages that are designed to be dependency free).
\item \code{use_tidy_description()}: puts fields in standard order and alphabetises
dependencies.
\item \code{use_tidy_eval()}: imports a standard set of helpers to facilitate
programming with the tidy eval toolkit.
\item \code{use_tidy_style()}: styles source code according to the \href{https://style.tidyverse.org}{tidyverse style guide}. This function will overwrite files! See
below for usage advice.
\item \code{use_tidy_contributing()}: adds standard tidyverse contributing guidelines.
\item \code{use_tidy_issue_template()}: adds a standard tidyverse issue template.
\item \code{use_tidy_release_test_env()}: updates the test environment section in
\code{cran-comments.md}.
\item \code{use_tidy_support()}: adds a standard description of support resources for
the tidyverse.
\item \code{use_tidy_coc()}: equivalent to \code{use_code_of_conduct()}, but puts the
document in a \verb{.github/} subdirectory.
\item \code{use_tidy_github()}: convenience wrapper that calls
\code{use_tidy_contributing()}, \code{use_tidy_issue_template()}, \code{use_tidy_support()},
\code{use_tidy_coc()}.
\item \code{\link[=use_tidy_github_labels]{use_tidy_github_labels()}} calls \code{use_github_labels()} to implement
tidyverse conventions around GitHub issue label names and colours.
\item \code{use_tidy_upkeep_issue()} creates an issue containing a checklist of
actions to bring your package up to current tidyverse standards. Also
records the current date in the \code{Config/usethis/last-upkeep} field in
\code{DESCRIPTION}.
\item \code{use_tidy_logo()} calls \code{use_logo()} on the appropriate hex sticker PNG
file at \url{https://github.com/rstudio/hex-stickers}.
}
}
\section{\code{use_tidy_style()}}{
Uses the \href{https://styler.r-lib.org}{styler package} package to style all code
in a package, project, or directory, according to the \href{https://style.tidyverse.org}{tidyverse style guide}.
\strong{Warning:} This function will overwrite files! It is strongly suggested to
only style files that are under version control or to first create a backup
copy.
Invisibly returns a data frame with one row per file, that indicates whether
styling caused a change.
}
|