-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
697 additions
and
604 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ rworkflows-merged | |
^reports | ||
^inst/hex$ | ||
^hex$ | ||
.*\.pdf$ | ||
^CITATION$ | ||
|
||
.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#' Latex dependencies | ||
#' | ||
#' Install extra latex package dependencies. | ||
#' @param install Install the packages with \link[tinytex]{tlmgr_install} | ||
#' (\code{TRUE}). Otherwise, return a character vector of the packages to | ||
#' install. | ||
#' @inheritParams dependencies_linux | ||
#' @inheritDotParams tinytex::tlmgr_install | ||
#' @returns A character vector of extra latex packages. | ||
#' | ||
#' @export | ||
#' @examples | ||
#' dependencies_latex(install=FALSE) | ||
dependencies_latex <- function(extra=c("bera", | ||
"nowidow", | ||
"parnotes", | ||
"marginfix", | ||
"etoolbox", | ||
"titlesec", | ||
"sectsty", | ||
"framed", | ||
"enumitem", | ||
"parskip", | ||
"soul", | ||
"placeins", | ||
"footmisc", | ||
"changepage", | ||
"xstring", | ||
"caption", | ||
"mathtools", | ||
"fancyhdr", | ||
"preprint", | ||
"ragged2e", | ||
"pdfcrop", | ||
"titling", | ||
"silence", | ||
"everysel"), | ||
install=TRUE, | ||
...){ | ||
requireNamespace("tinytex") | ||
|
||
if(isTRUE(install)){ | ||
tinytex::tlmgr_install(pkgs = unique(extra), | ||
...) | ||
} else { | ||
extra | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#' Linux dependencies | ||
#' | ||
#' Construct a command to install system dependencies for the | ||
#' Linux OS environment. | ||
#' Includes all dependencies listed by \link[remotes]{system_requirements}, | ||
#' in addition to user-specified dependencies via \code{extra}. | ||
#' @param prefix Prefix to prepend to the command. | ||
#' @param extra Additional dependencies to install. | ||
#' @param verbose Print messages. | ||
#' @inheritParams remotes::system_requirements | ||
#' @inheritDotParams remotes::system_requirements | ||
#' @returns Command to install system dependencies. | ||
#' | ||
#' @export | ||
#' @examples | ||
#' dependencies_linux(package="rworkflows") | ||
dependencies_linux <- function(os = "ubuntu", | ||
os_release = "20.04", | ||
extra=c("qpdf", | ||
"rsync"), | ||
prefix=paste("apt-get update -y", | ||
"apt-get install -y", | ||
sep=" && "), | ||
verbose = TRUE, | ||
... | ||
){ | ||
# devoptera::args2vars(linux_dependencies) | ||
|
||
deps <- gsub("apt-get install -y ", "", | ||
remotes::system_requirements(os = os, | ||
os_release = os_release, | ||
...) | ||
) | ||
deps <- unique(c(deps,extra)) | ||
cmd <- paste(prefix,paste(deps,collapse = " ")) | ||
messager(cmd,v=verbose) | ||
cat(cmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#' MacOS dependencies | ||
#' | ||
#' Construct a command to install system dependencies for the | ||
#' Mac OS environment. | ||
#' | ||
#'### --- Justifications for each package --- #### | ||
#'## libxml2 ### | ||
#' Enable installing XML from source if needed | ||
#'## imagemagick@6 ### | ||
#' Required to install magick as noted at | ||
#' https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2 | ||
#'## harfbuzz fribidi ### | ||
#' For textshaping, required by ragg, and required by pkgdown | ||
#'## libgit2 ### | ||
#' For installing usethis's dependency gert | ||
#'## xquartz --cask ### | ||
#' Required for tcltk | ||
#'## libxfont ### | ||
#' Required for some ggplot2 functions | ||
#'## texlive ### | ||
#' Required for rendering Sweave files (even with r-lib/actions/setup-tinytex) | ||
#' @param cask Additional dependencies to install via cask. | ||
#' @inheritParams dependencies_linux | ||
#' @returns Command to install system dependencies. | ||
#' | ||
#' @export | ||
#' @examples | ||
#' dependencies_macos() | ||
dependencies_macos <- function(extra=c("libxml2", | ||
"harfbuzz", | ||
"fribidi", | ||
"libgit2", | ||
"texlive", | ||
"imagemagick@6", | ||
"rsync"), | ||
cask = c("xquartz"), | ||
prefix="brew install", | ||
verbose=TRUE){ | ||
# devoptera::args2vars(macos_dependencies) | ||
|
||
### Install normally ### | ||
cmd <- paste(prefix,paste(extra,collapse=" ")) | ||
### Install via cask ### | ||
if(length(cask) > 0){ | ||
cmd <- paste( | ||
cmd, | ||
paste(prefix,paste(cask,collapse=" "),"--cask"), | ||
sep=" && " | ||
) | ||
} | ||
messager(cmd,v=verbose) | ||
cat(cmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#' Windows dependencies | ||
#' | ||
#' Construct a command to install system dependencies for the | ||
#' Windows environment. | ||
#' @inheritParams dependencies_linux | ||
#' @returns Command to install system dependencies. | ||
#' | ||
#' @export | ||
#' @examples | ||
#' dependencies_windows() | ||
dependencies_windows <- function(extra=c("curl"), | ||
prefix="npm install", | ||
verbose=TRUE){ | ||
# devoptera::args2vars(windows_dependencies) | ||
|
||
cmd <- paste(prefix,paste(extra,collapse=" ")) | ||
messager(cmd,v=verbose) | ||
cat(cmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.