From 743e6a84a7290d22362ded3b371ff4a92439bf41 Mon Sep 17 00:00:00 2001 From: Javier Luraschi Date: Tue, 29 May 2018 08:48:51 -0700 Subject: [PATCH] skip tests that require pandoc to pass under solaris --- DESCRIPTION | 2 +- NEWS.md | 5 +++++ R/publish.R | 5 +++++ man/save_d3_html.Rd | 4 ++++ tests/testthat/test-knit.R | 3 +++ tests/testthat/test-save.R | 3 +++ 6 files changed, 21 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6f2ff3b..cc9ac03 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: r2d3 Type: Package Title: Interface to 'D3' Visualizations -Version: 0.2.0 +Version: 0.2.1 Authors@R: c( person("Javier", "Luraschi", email = "javier@rstudio.com", role = c("aut", "cre")), person("JJ", "Allaire", role = c("aut")), diff --git a/NEWS.md b/NEWS.md index 6a6b040..4f5bcb7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# r2d3 0.2.1 + +- Skip tests that require pandoc to support CRAN's solaris environment. +- Fix diagnostics message for dependencies with incorrect paths. + # r2d3 0.2.0 - Translate R objects into D3 friendly data structures diff --git a/R/publish.R b/R/publish.R index 4643332..3ae9f19 100644 --- a/R/publish.R +++ b/R/publish.R @@ -23,6 +23,11 @@ #' viz <- r2d3(data=c(0.3, 0.6, 0.8, 0.95, 0.40, 0.20), script = "barchart.js") #' save_d3_html(viz, file = tempfile(fileext = ".html")) #' +#' @details +#' +#' Using \code{selfcontained} set to \code{TRUE} requires \href{http://pandoc.org}{pandoc} +#' to be installed. +#' #' @seealso [save_d3_png()] #' #' @export diff --git a/man/save_d3_html.Rd b/man/save_d3_html.Rd index 1a76e58..8c938ae 100644 --- a/man/save_d3_html.Rd +++ b/man/save_d3_html.Rd @@ -29,6 +29,10 @@ Defaults to white.} \description{ Save a D3 visualization to an HTML file (e.g. for sharing with others). } +\details{ +Using \code{selfcontained} set to \code{TRUE} requires \href{http://pandoc.org}{pandoc} +to be installed. +} \examples{ library(r2d3) viz <- r2d3(data=c(0.3, 0.6, 0.8, 0.95, 0.40, 0.20), script = "barchart.js") diff --git a/tests/testthat/test-knit.R b/tests/testthat/test-knit.R index 32ee2cd..12bad26 100644 --- a/tests/testthat/test-knit.R +++ b/tests/testthat/test-knit.R @@ -3,6 +3,9 @@ context("knit") source("utils.R") test_succeeds("r2d3 can knit visualizations", { + if (!rmarkdown::pandoc_available()) + skip("rmarkdown requires pandoc") + output <- tempfile(fileext = ".html") rmarkdown::render("barchart.Rmd", output_file = output) }) \ No newline at end of file diff --git a/tests/testthat/test-save.R b/tests/testthat/test-save.R index 55bbb07..2b53da9 100644 --- a/tests/testthat/test-save.R +++ b/tests/testthat/test-save.R @@ -3,6 +3,9 @@ context("save") source("utils.R") test_that("d3 visualizations can be saved as html", { + if (!rmarkdown::pandoc_available()) + skip("selfcontained htmlwidgets require pandoc") + d3 <- r2d3(data=c(0.3, 0.6, 0.8, 0.95, 0.40, 0.20), script = "barchart.js") tmp <- tempfile(fileext = ".html") save_d3_html(d3, tmp)