diff --git a/DESCRIPTION b/DESCRIPTION index 58a7da4..4344113 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: svglite -Version: 1.2.0.9001 +Version: 1.2.1.9000 Title: An 'SVG' Graphics Device Description: A graphics device for R that produces 'Scalable Vector Graphics'. 'svglite' is a fork of the older 'RSvgDevice' package. @@ -20,7 +20,7 @@ Depends: R (>= 3.0.0) Imports: Rcpp, - gdtools (>= 0.1.2) + gdtools (>= 0.1.6) LinkingTo: Rcpp, gdtools, @@ -36,5 +36,5 @@ Suggests: License: GPL (>= 2) URL: https://github.com/r-lib/svglite BugReports: https://github.com/r-lib/svglite/issues -RoxygenNote: 5.0.1 +RoxygenNote: 6.0.1 VignetteBuilder: knitr diff --git a/NEWS.md b/NEWS.md index 13cc24a..a7f29eb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,5 @@ -# svglite 1.2.0.9000 + +# svglite 1.2.1.9000 * Improvements to reproducibility of generated SVGs: Negative zeros are now treated as positive, and the clip ID are now generated from @@ -11,6 +12,11 @@ plotmath expressions (#81). +# svglite 1.2.1 + +This release makes svglite compatible with gdtools 0.1.6 + + # svglite 1.2.0 ## New features diff --git a/R/RcppExports.R b/R/RcppExports.R index e421aeb..db508dc 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -2,14 +2,14 @@ # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 svglite_ <- function(file, bg, width, height, pointsize, standalone, aliases) { - .Call('svglite_svglite_', PACKAGE = 'svglite', file, bg, width, height, pointsize, standalone, aliases) + .Call('_svglite_svglite_', PACKAGE = 'svglite', file, bg, width, height, pointsize, standalone, aliases) } svgstring_ <- function(env, bg, width, height, pointsize, standalone, aliases) { - .Call('svglite_svgstring_', PACKAGE = 'svglite', env, bg, width, height, pointsize, standalone, aliases) + .Call('_svglite_svgstring_', PACKAGE = 'svglite', env, bg, width, height, pointsize, standalone, aliases) } get_svg_content <- function(p) { - .Call('svglite_get_svg_content', PACKAGE = 'svglite', p) + .Call('_svglite_get_svg_content', PACKAGE = 'svglite', p) } diff --git a/README.md b/README.md index 654da0c..201a558 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # svglite -[![Travis-CI Build Status](https://travis-ci.org/r-lib/svglite.svg?branch=master)](https://travis-ci.org/r-lib/svglite) [![Coverage Status](https://img.shields.io/codecov/c/github/r-lib/svglite/master.svg)](https://codecov.io/github/r-lib/svglite?branch=master) -[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/svglite)](https://cran.r-project.org/package=svglite) +[![Build Status](https://travis-ci.org/r-lib/svglite.svg?branch=master)](https://travis-ci.org/r-lib/svglite) +[![Coverage Status](https://codecov.io/gh/r-lib/svglite/branch/master/graph/badge.svg)](https://codecov.io/github/r-lib/svglite?branch=master) +[![CRAN Status Badge](http://www.r-pkg.org/badges/version/svglite)](https://cran.r-project.org/package=svglite) svglite is a graphics device that produces clean svg output, suitable for use on the web, or hand editing. Compared to the built-in `svg()`, svglite is considerably faster, produces smaller files, and leaves text as is. diff --git a/cran-comments.md b/cran-comments.md index c066875..fac0944 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,16 +1,18 @@ + ## Test environments -* local OS X install, R 3.3.1 -* ubuntu 12.04 (on travis-ci), R 3.3.1 + +* local OS X install, R 3.4.1 +* ubuntu 12.04 (on travis-ci), R 3.4.1 * win-builder (devel and release) + ## R CMD check results -0 errors | 0 warnings | 1 note. +0 errors | 0 warnings | 0 note -Lionel Henry is taking over as maintainer ## Downstream dependencies -* I ran R CMD check on all 5 downstream dependencies - (https://github.com/hadley/svglite/blob/master/revdep/readme.md). +* I ran R CMD check on all 8 downstream dependencies (summary at + https://github.com/r-lib/svglite/blob/master/revdep/readme.md). No problems were found. diff --git a/man/editSVG.Rd b/man/editSVG.Rd index 5ddf4b5..f53de70 100644 --- a/man/editSVG.Rd +++ b/man/editSVG.Rd @@ -24,4 +24,3 @@ if (interactive()) { editSVG(contour(volcano)) } } - diff --git a/man/htmlSVG.Rd b/man/htmlSVG.Rd index 6f2ce70..5375c50 100644 --- a/man/htmlSVG.Rd +++ b/man/htmlSVG.Rd @@ -21,4 +21,3 @@ if (require("htmltools")) { htmlSVG(hist(rnorm(100))) } } - diff --git a/man/stringSVG.Rd b/man/stringSVG.Rd index 1e72f02..3a9448c 100644 --- a/man/stringSVG.Rd +++ b/man/stringSVG.Rd @@ -18,4 +18,3 @@ alternative to \code{\link{svgstring}()}. \examples{ stringSVG(plot(1:10)) } - diff --git a/man/svglite.Rd b/man/svglite.Rd index efef35e..5e8c141 100644 --- a/man/svglite.Rd +++ b/man/svglite.Rd @@ -67,11 +67,6 @@ dev.off() # See the fonts vignettes for more options to deal with fonts -} -\author{ -This driver was written by T Jake Luciani - \email{jakeluciani@yahoo.com} 2012: updated by Matthieu Decorde - \email{matthieu.decorde@ens-lyon.fr} } \references{ \emph{W3C Scalable Vector Graphics (SVG)}: @@ -80,5 +75,9 @@ This driver was written by T Jake Luciani \seealso{ \code{\link{pictex}}, \code{\link{postscript}}, \code{\link{Devices}} } +\author{ +This driver was written by T Jake Luciani + \email{jakeluciani@yahoo.com} 2012: updated by Matthieu Decorde + \email{matthieu.decorde@ens-lyon.fr} +} \keyword{device} - diff --git a/man/svgstring.Rd b/man/svgstring.Rd index cc086d7..ce26213 100644 --- a/man/svgstring.Rd +++ b/man/svgstring.Rd @@ -59,4 +59,3 @@ plot(rnorm(5), rnorm(5)) s() dev.off() } - diff --git a/man/xmlSVG.Rd b/man/xmlSVG.Rd index 739e08e..52bcb09 100644 --- a/man/xmlSVG.Rd +++ b/man/xmlSVG.Rd @@ -31,4 +31,3 @@ if (require("xml2")) { xml_find_all(x, ".//text") } } - diff --git a/revdep/README.md b/revdep/README.md index d2132b0..0d9b85d 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -1,75 +1,38 @@ -# Setup - -## Platform - -|setting |value | -|:--------|:--------------------------------------------------| -|version |R Under development (unstable) (2016-10-26 r71594) | -|system |x86_64, darwin13.4.0 | -|ui |X11 | -|language |(EN) | -|collate |en_US.UTF-8 | -|tz |Europe/Brussels | -|date |2016-11-03 | - -## Packages - -|package |* |version |date |source | -|:---------|:--|:--------|:----------|:---------------| -|BH | |1.60.0-2 |2016-05-07 |cran (@1.60.0-) | -|covr | |2.2.1 |2016-08-10 |cran (@2.2.1) | -|gdtools | |0.1.1 |2016-11-01 |CRAN (R 3.4.0) | -|htmltools | |0.3.5 |2016-03-21 |cran (@0.3.5) | -|knitr | |1.14 |2016-08-13 |cran (@1.14) | -|Rcpp | |0.12.7 |2016-09-05 |cran (@0.12.7) | -|rmarkdown | |1.1 |2016-10-16 |cran (@1.1) | -|svglite | |1.1.0 |2016-02-09 |CRAN (R 3.2.3) | -|testthat | |0.11.0 |2015-10-14 |CRAN (R 3.2.0) | -|xml2 | |0.1.2 |2015-09-01 |CRAN (R 3.2.0) | - -# Check results - -5 packages - -|package |version | errors| warnings| notes| -|:----------|:-------|------:|--------:|-----:| -|DeLorean |1.2.4 | 0| 0| 0| -|ggplot2 |2.1.0 | 0| 0| 0| -|mlr |2.9 | 0| 0| 1| -|rsvg |1.0 | 0| 0| 0| -|svgPanZoom |0.3.3 | 0| 0| 0| - -## DeLorean (1.2.4) -Maintainer: John Reid - -0 errors | 0 warnings | 0 notes - -## ggplot2 (2.1.0) -Maintainer: Hadley Wickham -Bug reports: https://github.com/hadley/ggplot2/issues - -0 errors | 0 warnings | 0 notes - -## mlr (2.9) -Maintainer: Bernd Bischl -Bug reports: https://github.com/mlr-org/mlr/issues - -0 errors | 0 warnings | 1 note - -``` -checking package dependencies ... NOTE -Package suggested but not available for checking: ‘RRF’ -``` - -## rsvg (1.0) -Maintainer: Jeroen Ooms -Bug reports: https://github.com/jeroenooms/rsvg/issues - -0 errors | 0 warnings | 0 notes - -## svgPanZoom (0.3.3) -Maintainer: Kent Russell -Bug reports: https://github.com/timelyportfolio/svgPanZoom/issues - -0 errors | 0 warnings | 0 notes +# Platform + +|field |value | +|:--------|:----------------------------| +|version |R version 3.4.1 (2017-06-30) | +|os |macOS Sierra 10.12.6 | +|system |x86_64, darwin15.6.0 | +|ui |X11 | +|language |(EN) | +|collate |en_US.UTF-8 | +|tz |Europe/Brussels | +|date |2017-09-11 | + +# Dependencies + +|package |old |new |Δ | +|:-------|:--------|:--------|:--| +|svglite |1.2.0 |1.2.1 |* | +|BH |1.65.0-1 |1.65.0-1 | | +|gdtools |0.1.6 |0.1.6 | | +|Rcpp |0.12.12 |0.12.12 | | +|withr |NA |2.0.0 |* | + +# Revdeps + +## All (8) + +|package |version |error |warning |note | +|:------------------------------------|:-------|:------|:-------|:----| +|[DeLorean](problems.md#delorean) |1.2.5 | |1 | | +|[ggExtra](problems.md#ggextra) |0.7 | | |1 | +|[ggplot2](problems.md#ggplot2) |2.2.1 | | |1 | +|[mlr](problems.md#mlr) |2.11 |1 | |1 | +|rsvg |1.1 |-1 | | | +|[svgPanZoom](problems.md#svgpanzoom) |0.3.3 | | |1 | +|vdiffr |0.2.0 |-1 | | | +|[viridis](problems.md#viridis) |0.4.0 |-1 |1 |1 | diff --git a/revdep/data.sqlite b/revdep/data.sqlite new file mode 100644 index 0000000..707de55 Binary files /dev/null and b/revdep/data.sqlite differ diff --git a/revdep/problems.md b/revdep/problems.md index 5fd8fff..33fb642 100644 --- a/revdep/problems.md +++ b/revdep/problems.md @@ -1,36 +1,159 @@ -# Setup +# DeLorean -## Platform +Version: 1.2.5 -|setting |value | -|:--------|:--------------------------------------------------| -|version |R Under development (unstable) (2016-10-26 r71594) | -|system |x86_64, darwin13.4.0 | -|ui |X11 | -|language |(EN) | -|collate |en_US.UTF-8 | -|tz |Europe/Brussels | -|date |2016-11-03 | +## In both -## Packages +* checking S3 generic/method consistency ... WARNING + ``` + filter: + function(x, filter, method, sides, circular, init) + filter.cells: + function(dl, .filter, number, cells) + + filter: + function(x, filter, method, sides, circular, init) + filter.genes: + function(dl, .filter, number, genes) + + See section ‘Generic functions and methods’ in the ‘Writing R + Extensions’ manual. + ``` -|package |* |version |date |source | -|:---------|:--|:--------|:----------|:---------------| -|BH | |1.60.0-2 |2016-05-07 |cran (@1.60.0-) | -|covr | |2.2.1 |2016-08-10 |cran (@2.2.1) | -|gdtools | |0.1.1 |2016-11-01 |CRAN (R 3.4.0) | -|htmltools | |0.3.5 |2016-03-21 |cran (@0.3.5) | -|knitr | |1.14 |2016-08-13 |cran (@1.14) | -|Rcpp | |0.12.7 |2016-09-05 |cran (@0.12.7) | -|rmarkdown | |1.1 |2016-10-16 |cran (@1.1) | -|svglite | |1.1.0 |2016-02-09 |CRAN (R 3.2.3) | -|testthat | |0.11.0 |2015-10-14 |CRAN (R 3.2.0) | -|xml2 | |0.1.2 |2015-09-01 |CRAN (R 3.2.0) | +# ggExtra -# Check results +Version: 0.7 -0 packages with problems +## In both +* checking dependencies in R code ... NOTE + ``` + Namespace in Imports field not imported from: ‘grDevices’ + All declared Imports should be used. + ``` +# ggplot2 +Version: 2.2.1 + +## In both + +* checking dependencies in R code ... NOTE + ``` + Namespace in Imports field not imported from: ‘reshape2’ + All declared Imports should be used. + ``` + +# mlr + +Version: 2.11 + +## In both + +* checking tests ... + ``` + ERROR + Running the tests in ‘tests/run-base.R’ failed. + Last 13 lines of output: + 7: requirePackages(package, why = stri_paste("learner", id, sep = " "), default.method = "load") + 8: stopf("For %s please install the following packages: %s", why, ps) + + testthat results ================================================================ + OK: 2477 SKIPPED: 1 FAILED: 7 + 1. Error: clustering performance (@test_base_clustering.R#15) + 2. Error: clustering performance with missing clusters (@test_base_clustering.R#27) + 3. Error: clustering resample (@test_base_clustering.R#41) + 4. Error: clustering benchmark (@test_base_clustering.R#52) + 5. Error: clustering tune (@test_base_clustering.R#65) + 6. Error: hyperpars (@test_base_hyperpars.R#12) + 7. Error: check measure calculations (@test_base_measures.R#186) + + Error: testthat unit tests failed + Execution halted + ``` + +* checking dependencies in R code ... NOTE + ``` + Unable to find any JVMs matching version "(null)". + No Java runtime present, try --request to install. + Unable to find any JVMs matching version "(null)". + No Java runtime present, try --request to install. + Unable to find any JVMs matching version "(null)". + No Java runtime present, try --request to install. + Missing or unexported object: ‘kohonen::bdk’ + ``` + +# svgPanZoom + +Version: 0.3.3 + +## In both + +* checking package dependencies ... NOTE + ``` + Packages which this enhances but not available for checking: + ‘gridSVG’ ‘XML’ ‘xml2’ + ``` + +# viridis + +Version: 0.4.0 + +## Newly fixed + +* checking tests ... + ``` + ERROR + Running the tests in ‘tests/testthat.R’ failed. + Last 13 lines of output: + > + > test_check("viridis") + 1. Error: visual elements are correct (@test-viridis.R#44) --------------------- + function 'gdtools_RcppExport_validate' not provided by package 'gdtools' + 1: vdiffr::expect_doppelganger("a", A) at testthat/test-viridis.R:44 + 2: write_svg(fig, testcase, title, user_fonts) + 3: svglite::svglite(file, user_fonts = user_fonts) + 4: svglite_(file, bg, width, height, pointsize, standalone, aliases) + + testthat results ================================================================ + OK: 5 SKIPPED: 0 FAILED: 1 + 1. Error: visual elements are correct (@test-viridis.R#44) + + Error: testthat unit tests failed + Execution halted + ``` + +## In both + +* checking re-building of vignette outputs ... WARNING + ``` + ... + + Attaching package: 'raster' + + The following object is masked from 'package:colorspace': + + RGB + + Loading required package: lattice + Loading required package: latticeExtra + Loading required package: RColorBrewer + + Attaching package: 'latticeExtra' + + The following object is masked from 'package:ggplot2': + + layer + + Quitting from lines 204-213 (intro-to-viridis.Rmd) + Error: processing vignette 'intro-to-viridis.Rmd' failed with diagnostics: + Cannot create RasterLayer object from this file; perhaps you need to install rgdal first + Execution halted + ``` + +* checking dependencies in R code ... NOTE + ``` + Namespace in Imports field not imported from: ‘stats’ + All declared Imports should be used. + ``` diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index 1d7fb32..925bfd7 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -7,7 +7,7 @@ using namespace Rcpp; // svglite_ bool svglite_(std::string file, std::string bg, double width, double height, double pointsize, bool standalone, Rcpp::List aliases); -RcppExport SEXP svglite_svglite_(SEXP fileSEXP, SEXP bgSEXP, SEXP widthSEXP, SEXP heightSEXP, SEXP pointsizeSEXP, SEXP standaloneSEXP, SEXP aliasesSEXP) { +RcppExport SEXP _svglite_svglite_(SEXP fileSEXP, SEXP bgSEXP, SEXP widthSEXP, SEXP heightSEXP, SEXP pointsizeSEXP, SEXP standaloneSEXP, SEXP aliasesSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; @@ -24,7 +24,7 @@ END_RCPP } // svgstring_ Rcpp::XPtr svgstring_(Rcpp::Environment env, std::string bg, double width, double height, double pointsize, bool standalone, Rcpp::List aliases); -RcppExport SEXP svglite_svgstring_(SEXP envSEXP, SEXP bgSEXP, SEXP widthSEXP, SEXP heightSEXP, SEXP pointsizeSEXP, SEXP standaloneSEXP, SEXP aliasesSEXP) { +RcppExport SEXP _svglite_svgstring_(SEXP envSEXP, SEXP bgSEXP, SEXP widthSEXP, SEXP heightSEXP, SEXP pointsizeSEXP, SEXP standaloneSEXP, SEXP aliasesSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; @@ -41,7 +41,7 @@ END_RCPP } // get_svg_content std::string get_svg_content(Rcpp::XPtr p); -RcppExport SEXP svglite_get_svg_content(SEXP pSEXP) { +RcppExport SEXP _svglite_get_svg_content(SEXP pSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGScope rcpp_rngScope_gen; @@ -52,9 +52,9 @@ END_RCPP } static const R_CallMethodDef CallEntries[] = { - {"svglite_svglite_", (DL_FUNC) &svglite_svglite_, 7}, - {"svglite_svgstring_", (DL_FUNC) &svglite_svgstring_, 7}, - {"svglite_get_svg_content", (DL_FUNC) &svglite_get_svg_content, 1}, + {"_svglite_svglite_", (DL_FUNC) &_svglite_svglite_, 7}, + {"_svglite_svgstring_", (DL_FUNC) &_svglite_svgstring_, 7}, + {"_svglite_get_svg_content", (DL_FUNC) &_svglite_get_svg_content, 1}, {NULL, NULL, 0} }; diff --git a/tests/testthat/test-text-fonts.R b/tests/testthat/test-text-fonts.R index a1a6c0a..407196b 100644 --- a/tests/testthat/test-text-fonts.R +++ b/tests/testthat/test-text-fonts.R @@ -74,9 +74,12 @@ test_that("metrics are computed for different fonts", { }) test_that("unicode characters in plotmath are handled", { + rho <- as.name("\u03c1") + expr <- call("*", rho, rho) + x <- xmlSVG({ plot.new() - text(0.5, 0.5, expression(ρ * ρ)) + text(0.5, 0.5, as.expression(expr)) }) text <- xml_find_all(x, ".//text") x_attr <- as.double(xml_attr(text, "x"))