/
infrastructure.Rd
139 lines (100 loc) · 3.25 KB
/
infrastructure.Rd
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
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/infrastructure.R
\name{infrastructure}
\alias{add_rstudio_project}
\alias{add_test_infrastructure}
\alias{add_travis}
\alias{infrastructure}
\alias{use_appveyor}
\alias{use_code_of_conduct}
\alias{use_coverage}
\alias{use_cran_badge}
\alias{use_cran_comments}
\alias{use_package_doc}
\alias{use_rcpp}
\alias{use_revdep}
\alias{use_rstudio}
\alias{use_test}
\alias{use_testthat}
\alias{use_travis}
\alias{use_vignette}
\title{Add useful infrastructure to a package.}
\usage{
use_testthat(pkg = ".")
use_test(name, pkg = ".")
use_rstudio(pkg = ".")
use_vignette(name, pkg = ".")
use_rcpp(pkg = ".")
use_travis(pkg = ".")
use_coverage(pkg = ".", type = c("codecov", "coveralls"))
use_appveyor(pkg = ".")
use_package_doc(pkg = ".")
use_revdep(pkg = ".")
use_cran_comments(pkg = ".")
use_code_of_conduct(pkg = ".")
use_cran_badge(pkg = ".")
}
\arguments{
\item{pkg}{package description, can be path or package name. See
\code{\link{as.package}} for more information.}
\item{name}{File name to use for new vignette. Should consist only of
numbers, letters, _ and -. I recommend using lower case.}
}
\description{
Add useful infrastructure to a package.
}
\section{\code{use_testthat}}{
Add testing infrastructure to a package that does not already have it.
This will create \file{tests/testthat.R}, \file{tests/testthat/} and
add \pkg{testthat} to the suggested packages. This is called
automatically from \code{\link{test}} if needed.
}
\section{\code{use_test}}{
Add a test file, also add testing infrastructure if necessary.
This will create \file{tests/testthat/test-<name>.R} with a user-specified
name for the test. Will fail if the file exists.
}
\section{\code{use_rstudio}}{
Does not modify \code{.Rbuildignore} as RStudio will do that when
opened for the first time.
}
\section{\code{use_vignette}}{
Adds needed packages to \code{DESCRIPTION}, and creates draft vignette
in \code{vignettes/}. It adds \code{inst/doc} to \code{.gitignore}
so you don't accidentally check in the built vignettes.
}
\section{\code{use_rcpp}}{
Creates \code{src/} and adds needed packages to \code{DESCRIPTION}.
}
\section{\code{use_travis}}{
Add basic travis template to a package. Also adds \code{.travis.yml} to
\code{.Rbuildignore} so it isn't included in the built package.
}
\section{\code{use_coverage}}{
Add test code coverage to basic travis template to a package.
}
\section{\code{use_appveyor}}{
Add basic AppVeyor template to a package. Also adds \code{appveyor.yml} to
\code{.Rbuildignore} so it isn't included in the built package.
}
\section{\code{use_package_doc}}{
Adds a roxygen template for package documentation
}
\section{\code{use_revdep}}{
Add \code{revdep} directory and basic check template.
}
\section{\code{use_cran_comments}}{
Add \code{cran-comments.md} template.
}
\section{\code{use_code_of_conduct}}{
Add a code of conduct to from \url{http://contributor-covenant.org}.
}
\section{\code{use_cran_badge}}{
Add a badge to show CRAN status and version number on the README
}
\seealso{
Other infrastructure: \code{\link{add_build_ignore}},
\code{\link{use_build_ignore}};
\code{\link{use_data_raw}}; \code{\link{use_data}};
\code{\link{use_package}}; \code{\link{use_readme_rmd}}
}