No known key found for this signature in database
GPG Key ID: 1D7529BE14E2BBA9
12 changed files with
68 additions and
28 deletions
-
DESCRIPTION
-
NAMESPACE
-
NEWS.md
-
R/aaa.R
-
R/check-package-urls.R
-
R/hrbraddins-package.R
-
R/refresh-renviron.R
-
R/run-tiny-test.R
-
README.md
-
man/check_package_urls.Rd
-
man/hrbraddins.Rd
-
man/run_tiny_test.Rd
|
|
@ -1,8 +1,8 @@ |
|
|
|
Package: hrbraddins |
|
|
|
Type: Package |
|
|
|
Title: Additional Addins for RStudio |
|
|
|
Version: 0.2.0 |
|
|
|
Date: 2018-07-25 |
|
|
|
Title: Moar Addins for RStudio |
|
|
|
Version: 0.3.0 |
|
|
|
Date: 2019-07-25 |
|
|
|
Author: Bob Rudis (bob@rud.is) |
|
|
|
Maintainer: Bob Rudis <bob@rud.is> |
|
|
|
Description: Provides additional addins for RStudio. |
|
|
@ -33,5 +33,9 @@ Imports: |
|
|
|
tinytest, |
|
|
|
rprojroot, |
|
|
|
memoise, |
|
|
|
tools |
|
|
|
tools, |
|
|
|
httr, |
|
|
|
janitor, |
|
|
|
purrr, |
|
|
|
tibble |
|
|
|
RoxygenNote: 6.1.1 |
|
|
|
|
|
@ -20,13 +20,21 @@ import(rstudioapi) |
|
|
|
import(shiny) |
|
|
|
import(stringi) |
|
|
|
import(tinytest) |
|
|
|
importFrom(dplyr,as_data_frame) |
|
|
|
import(utils) |
|
|
|
importFrom(dplyr,bind_cols) |
|
|
|
importFrom(dplyr,bind_rows) |
|
|
|
importFrom(dplyr,distinct) |
|
|
|
importFrom(dplyr,filter) |
|
|
|
importFrom(dplyr,full_join) |
|
|
|
importFrom(dplyr,left_join) |
|
|
|
importFrom(dplyr,mutate) |
|
|
|
importFrom(dplyr,progress_estimated) |
|
|
|
importFrom(gistr,gist_create) |
|
|
|
importFrom(httr,GET) |
|
|
|
importFrom(httr,status_code) |
|
|
|
importFrom(memoise,memoise) |
|
|
|
importFrom(purrr,map_dbl) |
|
|
|
importFrom(tibble,as_tibble) |
|
|
|
importFrom(tidyr,gather) |
|
|
|
importFrom(twitteR,tweet) |
|
|
|
importFrom(utils,read.csv) |
|
|
|
|
|
@ -1,3 +1,6 @@ |
|
|
|
0.3.0 |
|
|
|
- Check package URLs |
|
|
|
|
|
|
|
0.2.0 |
|
|
|
* Refresh Renviron |
|
|
|
|
|
|
|
|
|
@ -0,0 +1,4 @@ |
|
|
|
.pb <- NULL |
|
|
|
utils::globalVariables(c( |
|
|
|
".", "URL", "env_var", "value", "new_value", ".rs.api.runScriptJob" |
|
|
|
)) |
|
|
@ -1,9 +1,7 @@ |
|
|
|
#' Check package URLs |
|
|
|
#' |
|
|
|
#' @param just_pass_or_fail if `TRUE` (default is `FALSE`) just return `TRUE` if |
|
|
|
#' all the URL checks result in HTTP `200` status codes. |
|
|
|
#' @export |
|
|
|
check_package_urls <- function(just_pass_or_fail = FALSE) { |
|
|
|
check_package_urls <- function() { |
|
|
|
|
|
|
|
m_GET <- memoise::memoise(httr::GET) # avoid checking URL more than once |
|
|
|
|
|
|
@ -37,8 +35,7 @@ check_package_urls <- function(just_pass_or_fail = FALSE) { |
|
|
|
tryCatch(httr::status_code(m_GET(url = .x)), error = 599) |
|
|
|
})) %>% |
|
|
|
janitor::clean_names() %>% |
|
|
|
tibble::as_tibble() -> out |
|
|
|
|
|
|
|
if (just_pass_or_fail) all(out$status == 200) else print(out, nrow(out)) |
|
|
|
tibble::as_tibble() %>% |
|
|
|
print(nrow(.)) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
@ -1,15 +1,20 @@ |
|
|
|
#' Additional Addins for RStudio |
|
|
|
#' Moar Addins for RStudio |
|
|
|
#' |
|
|
|
#' @name hrbraddins |
|
|
|
#' @docType package |
|
|
|
#' @author Bob Rudis (bob@@rud.is) |
|
|
|
#' @import rstudioapi magick pdftools rmarkdown knitr |
|
|
|
#' @import rstudioapi magick pdftools rmarkdown knitr utils |
|
|
|
#' @importFrom httr GET status_code |
|
|
|
#' @importFrom memoise memoise |
|
|
|
#' @importFrom gistr gist_create |
|
|
|
#' @importFrom twitteR tweet |
|
|
|
#' @importFrom utils read.csv |
|
|
|
#' @import shiny miniUI stringi |
|
|
|
#' @importFrom dplyr as_data_frame bind_cols bind_rows left_join filter full_join |
|
|
|
#' @importFrom dplyr bind_cols bind_rows left_join filter full_join progress_estimated |
|
|
|
#' @importFrom dplyr distinct mutate |
|
|
|
#' @importFrom tibble as_tibble |
|
|
|
#' @importFrom purrr map_dbl |
|
|
|
#' @importFrom tidyr gather |
|
|
|
#' @importFrom uuid UUIDgenerate |
|
|
|
#' @import tinytest rprojroot |
|
|
|
NULL |
|
|
|
"_PACKAGE" |
|
|
|
|
|
@ -7,11 +7,11 @@ refresh_renviron <- function() { |
|
|
|
|
|
|
|
renv <- path.expand("~/.Renviron") |
|
|
|
|
|
|
|
curr_env <- gather(as_tibble(as.list(Sys.getenv())), env_var, value) |
|
|
|
curr_env <- tidyr::gather(tibble::as_tibble(as.list(Sys.getenv())), env_var, value) |
|
|
|
|
|
|
|
if (file.exists(renv)) readRenviron(renv) |
|
|
|
|
|
|
|
new_env <- gather(as_data_frame(as.list(Sys.getenv())), env_var, new_value) |
|
|
|
new_env <- tidyr::gather(tibble::as_tibble(as.list(Sys.getenv())), env_var, new_value) |
|
|
|
|
|
|
|
both_env <- full_join(curr_env, new_env, by="env_var") |
|
|
|
|
|
|
|
|
|
@ -1,3 +1,7 @@ |
|
|
|
#' Run {tinytest} on a package |
|
|
|
#' |
|
|
|
#' You should really bind this to something like cmd-opt-shift-t. |
|
|
|
#' |
|
|
|
#' @export |
|
|
|
run_tiny_test <- function() { |
|
|
|
try(tinytest::test_all(rprojroot::find_package_root_file()), silent = TRUE) |
|
|
|
|
|
@ -5,7 +5,7 @@ developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.re |
|
|
|
[](https://keybase.io/hrbrmstr) |
|
|
|
 |
|
|
|
%](https://img.shields.io/badge/Signed_Commits-100%25-lightgrey.svg) |
|
|
|
[](https://travis-ci.org/hrbrmstr/hrbraddins) |
|
|
|
[ installed. |
|
|
|
|
|
|
|
## tdigest Metrics |
|
|
|
## hrbraddins Metrics |
|
|
|
|
|
|
|
| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | |
|
|
|
| :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: | |
|
|
|
| R | 13 | 0.93 | 180 | 0.97 | 84 | 0.84 | 72 | 0.75 | |
|
|
|
| Rmd | 1 | 0.07 | 5 | 0.03 | 16 | 0.16 | 24 | 0.25 | |
|
|
|
| R | 13 | 0.93 | 180 | 0.97 | 84 | 0.85 | 72 | 0.75 | |
|
|
|
| Rmd | 1 | 0.07 | 5 | 0.03 | 15 | 0.15 | 24 | 0.25 | |
|
|
|
|
|
|
|
## Code of Conduct |
|
|
|
|
|
|
|
|
|
@ -4,11 +4,7 @@ |
|
|
|
\alias{check_package_urls} |
|
|
|
\title{Check package URLs} |
|
|
|
\usage{ |
|
|
|
check_package_urls(just_pass_or_fail = FALSE) |
|
|
|
} |
|
|
|
\arguments{ |
|
|
|
\item{just_pass_or_fail}{if `TRUE` (default is `FALSE`) just return `TRUE` if |
|
|
|
all the URL checks result in HTTP `200` status codes.} |
|
|
|
check_package_urls() |
|
|
|
} |
|
|
|
\description{ |
|
|
|
Check package URLs |
|
|
|
|
|
@ -4,9 +4,17 @@ |
|
|
|
\name{hrbraddins} |
|
|
|
\alias{hrbraddins} |
|
|
|
\alias{hrbraddins-package} |
|
|
|
\title{Additional Addins for RStudio} |
|
|
|
\title{Moar Addins for RStudio} |
|
|
|
\description{ |
|
|
|
Additional Addins for RStudio |
|
|
|
Provides additional addins for RStudio. |
|
|
|
} |
|
|
|
\seealso{ |
|
|
|
Useful links: |
|
|
|
\itemize{ |
|
|
|
\item \url{https://gitlab.com/hrbrmstr/hrbraddins} |
|
|
|
\item Report bugs at \url{https://gitlab.com/hrbrmstr/hrbraddins/issues} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
\author{ |
|
|
|
Bob Rudis (bob@rud.is) |
|
|
|
|
|
@ -0,0 +1,11 @@ |
|
|
|
% Generated by roxygen2: do not edit by hand |
|
|
|
% Please edit documentation in R/run-tiny-test.R |
|
|
|
\name{run_tiny_test} |
|
|
|
\alias{run_tiny_test} |
|
|
|
\title{Run {tinytest} on a package} |
|
|
|
\usage{ |
|
|
|
run_tiny_test() |
|
|
|
} |
|
|
|
\description{ |
|
|
|
You should really bind this to something like cmd-opt-shift-t. |
|
|
|
} |