[mirror] Opinionated R package quickstart
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fixed imports, removed author param

VisruthSK 5aaa97f5 5e34180d

+39 -18
+2 -1
DESCRIPTION
··· 10 10 URL: https://visruthsk.github.io/bootstrapper/ 11 11 Imports: 12 12 fs, 13 - usethis 13 + usethis, 14 + utils 14 15 Suggests: 15 16 spelling, 16 17 testthat (>= 3.0.0)
+1
NAMESPACE
··· 4 4 export(create_package) 5 5 export(pkg_setup) 6 6 export(use_license) 7 + importFrom(utils,person)
+10
R/bootstrapper-package.R
··· 1 + #' @keywords internal 2 + "_PACKAGE" 3 + 4 + ## usethis namespace: start 5 + #' @importFrom utils person 6 + ## usethis namespace: end 7 + 8 + ## mockable bindings: start 9 + ## mockable bindings: end 10 + NULL
+4 -12
R/bootstrapper.R
··· 64 64 readLines(".Rbuildignore", warn = FALSE) |> 65 65 Filter(nzchar, x = _) |> 66 66 writeLines(".Rbuildignore") 67 - use_license(author) 67 + use_license() 68 68 usethis::use_github(private = private) 69 69 invisible(NULL) 70 70 } ··· 142 142 #' Prompts for a license choice in interactive sessions and applies the selected 143 143 #' `usethis` license helper. 144 144 #' 145 - #' @param author A [utils::person()] object used when the selected license 146 - #' requires a copyright holder. 147 - #' 148 145 #' @return Invisibly returns `NULL`. 149 146 #' @export 150 - use_license <- function(author) { 147 + use_license <- function() { 151 148 license_choices <- c( 152 149 "MIT" = "use_mit_license", 153 150 "GPL" = "use_gpl_license", ··· 174 171 FALSE 175 172 } 176 173 if (selected_fn) { 177 - copyright_holder <- format(author, include = c("given", "family")) 178 174 switch( 179 175 selected_fn, 180 - use_mit_license = usethis::use_mit_license( 181 - copyright_holder = copyright_holder 182 - ), 176 + use_mit_license = usethis::use_mit_license(), 183 177 use_gpl_license = usethis::use_gpl_license(), 184 178 use_gpl3_license = usethis::use_gpl3_license(), 185 179 use_lgpl_license = usethis::use_lgpl_license(), ··· 189 183 use_apache_license = usethis::use_apache_license(), 190 184 use_ccby_license = usethis::use_ccby_license(), 191 185 use_cc0_license = usethis::use_cc0_license(), 192 - use_proprietary_license = usethis::use_proprietary_license( 193 - copyright_holder = copyright_holder 194 - ) 186 + use_proprietary_license = usethis::use_proprietary_license() 195 187 ) 196 188 } else { 197 189 usethis::ui_warn("No license selected; leaving current license unchanged.")
+21
man/bootstrapper-package.Rd
··· 1 + % Generated by roxygen2: do not edit by hand 2 + % Please edit documentation in R/bootstrapper-package.R 3 + \docType{package} 4 + \name{bootstrapper-package} 5 + \alias{bootstrapper-package} 6 + \title{bootstrapper: Opinionated R Package Quickstart} 7 + \description{ 8 + Quickly start new R packages, adding some opinionated default GHA, suggested extensions, etc. 9 + } 10 + \seealso{ 11 + Useful links: 12 + \itemize{ 13 + \item \url{https://visruthsk.github.io/bootstrapper/} 14 + } 15 + 16 + } 17 + \author{ 18 + \strong{Maintainer}: Visruth Srimath Kandali \email{public@visruth.com} (\href{https://orcid.org/0009-0005-9097-0688}{ORCID}) [copyright holder] 19 + 20 + } 21 + \keyword{internal}
+1 -5
man/use_license.Rd
··· 4 4 \alias{use_license} 5 5 \title{Choose and Apply a License} 6 6 \usage{ 7 - use_license(author) 8 - } 9 - \arguments{ 10 - \item{author}{A \code{\link[utils:person]{utils::person()}} object used when the selected license 11 - requires a copyright holder.} 7 + use_license() 12 8 } 13 9 \value{ 14 10 Invisibly returns \code{NULL}.