Skip to content

Commit

Permalink
v2.0.0 release tweaks (#531)
Browse files Browse the repository at this point in the history
* add donttest around longer leaflet example

* colors example should be donttest

* reduce even more examples with \donttest

* update comments with latest builds
  • Loading branch information
schloerke authored Apr 22, 2018
1 parent 85479ea commit eaee4d5
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 33 deletions.
2 changes: 1 addition & 1 deletion R/colors.R
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ colorFactor <- function(palette, domain, levels = NULL, ordered = FALSE,
#' pal <- colorBin("Greens", domain = 0:100)
#' pal(runif(10, 60, 100))
#'
#' if (interactive()) {
#' \donttest{
#' # Exponential distribution, mapped continuously
#' previewColors(colorNumeric("Blues", domain = NULL), sort(rexp(16)))
#' # Exponential distribution, mapped by interval
Expand Down
4 changes: 2 additions & 2 deletions R/layers.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ epsg3857 <- "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y
#' @template data-getMapData
#'
#' @examples
#' library(raster)
#' \donttest{library(raster)
#'
#' r <- raster(xmn = -2.8, xmx = -2.79, ymn = 54.04, ymx = 54.05, nrows = 30, ncols = 30)
#' values(r) <- matrix(1:900, nrow(r), ncol(r), byrow = TRUE)
Expand All @@ -230,7 +230,7 @@ epsg3857 <- "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y
#' if (requireNamespace("rgdal")) {
#' leaflet() %>% addTiles() %>%
#' addRasterImage(r, colors = "Spectral", opacity = 0.8)
#' }
#' }}
#' @export
addRasterImage <- function(
map,
Expand Down
3 changes: 2 additions & 1 deletion R/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
#' @describeIn map-methods Set the view of the map (center and zoom level)
#' @export
#' @examples
#' m <- leaflet() %>% addTiles() %>% setView(-71.0382679, 42.3489054, zoom = 18)
#' \donttest{m <- leaflet() %>% addTiles() %>% setView(-71.0382679, 42.3489054, zoom = 18)
#' m # the RStudio 'headquarter'
#' m %>% fitBounds(-72, 40, -70, 43)
#' m %>% clearBounds() # world view
#' }
setView <- function(map, lng, lat, zoom, options = list()) {
view <- evalFormula(list(c(lat, lng), zoom, options))

Expand Down
4 changes: 2 additions & 2 deletions R/plugin-simplegraticule.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ leafletSimpleGraticuleDependencies <- function() {
#' @param layerId the layer id
#' @param group the name of the group this layer belongs to.
#' @examples
#' leaflet() %>%
#' \donttest{leaflet() %>%
#' addTiles() %>%
#' addSimpleGraticule()
#' addSimpleGraticule()}
#'
#' @export
addSimpleGraticule <- function(
Expand Down
38 changes: 17 additions & 21 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Comments

## 2018-4-20
Resubmitting to avoid example execution time NOTE. Test environment outputs updated below.

- Barret

## 2018-4-19
This submission is done by Barret Schloerke <barret@rstudio.com> on behalf of Joe Cheng <joe@rstudio.com>. Please submit any changes to be made to <barret@rstudio.com>.

Expand All @@ -8,61 +13,52 @@ This submission is done by Barret Schloerke <barret@rstudio.com> on behalf of Jo

## Test environments
* local OS X install, R 3.4.4, --run-dontcheck
* 0 errors | 0 warnings | 0 note
* 0 errors | 0 warnings | 0 notes
* ubuntu 12.04 (on travis-ci), R version 3.4.4 (2017-01-27)
* 0 errors | 0 warnings | 0 note
* 0 errors | 0 warnings | 0 notes
* devtools::build_win() x86_64-w64-mingw32, R version 3.4.4 (2018-03-15)
* 0 errors | 0 warnings | 0 notes

I believe the warning and note below are transient within r-hub.
* WARNING: Conversion of "README.md" failed:
* the svg at https://travis-ci.org/rstudio/leaflet.svg?branch=master exists
* NOTE: checking examples:
* The examples are taking a longer time only on windows and hardly any time is user or system.
* NOTE: checking package dependencies
* On linux... Packages suggested but not available for checking: ‘sf’ ‘rgdal’ ‘rgeos’

* r-hub
* Platform: Windows Server 2008 R2 SP1, R-release, 32/64 bit
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-530b3d51e28d4a0dae75211474df73e6
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-3915b63fe8c34d99b3ad7aa4b6e94640
❯ checking top-level files ... WARNING
Conversion of 'README.md' failed:
pandoc.exe: Could not fetch https://travis-ci.org/rstudio/leaflet.svg?branch=master
no store
CallStack (from HasCallStack):
error, called at .\System\X509\Win32.hs:56:31 in x509-system-1.6.4-E9zvdZ6nI282vjtOPFYSd1:System.X509.Win32
❯ checking examples ... NOTE
Examples with CPU or elapsed time > 5s
leaflet 1.26 1.7 5.33
user system elapsed
** found \donttest examples: check also with --run-donttest

0 errors ✔ | 1 warning ✖ | 1 note ✖
0 errors ✔ | 1 warning ✖ | 0 notes ✔

* Platform: Windows Server 2008 R2 SP1, R-devel, 32/64 bit
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-399d221fdf1648d5a6eb615f68abc1fa
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-fb1316cbeb5f48eba08e959769a990d4
❯ checking top-level files ... WARNING
Conversion of 'README.md' failed:
pandoc.exe: Could not fetch https://travis-ci.org/rstudio/leaflet.svg?branch=master
no store
CallStack (from HasCallStack):
error, called at .\System\X509\Win32.hs:56:31 in x509-system-1.6.4-E9zvdZ6nI282vjtOPFYSd1:System.X509.Win32

❯ checking examples ... NOTE
Examples with CPU or elapsed time > 5s
user system elapsed
leaflet 1.61 1.35 5.75
** found \donttest examples: check also with --run-donttest

0 errors ✔ | 1 warning ✖ | 1 note ✖
0 errors ✔ | 1 warning ✖ | 0 notes ✔

* Platform: Ubuntu Linux 16.04 LTS, R-release, GCC
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-bba7e3975ec949f8ba24843bf68be6eb
* checked with `_R_CHECK_FORCE_SUGGESTS_=0`
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-cec4735e750d4f1ea05dca55c153a847
❯ checking package dependencies ... NOTE
Packages suggested but not available for checking: ‘sf’ ‘rgdal’ ‘rgeos’

0 errors ✔ | 0 warnings ✔ | 1 note ✖

* Platform: Fedora Linux, R-devel, clang, gfortran
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-9178afdcb7594c9da0550ca2846bda0e
* checked with `_R_CHECK_FORCE_SUGGESTS_=0`
https://builder.r-hub.io/status/leaflet_2.0.0.tar.gz-09d8a5861fb74ed3baa34d727f1df82b
❯ checking package dependencies ... NOTE
Packages suggested but not available for checking: ‘sf’ ‘rgdal’ ‘rgeos’

Expand Down
3 changes: 3 additions & 0 deletions inst/examples/leaflet.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ library(leaflet)
m <- leaflet() %>% addTiles()
m # a map with the default OSM tile layer

\donttest{
# set bounds
m %>% fitBounds(0, 40, 10, 50)

Expand Down Expand Up @@ -156,3 +157,5 @@ m %>% addCircleMarkers(~lng, ~lat, radius = ~size,
greens <- colorNumeric("Greens", domain = NULL)
m %>% addCircleMarkers(~lng, ~lat, radius = ~size,
color = ~greens(value), fillOpacity = 0.5)

}
3 changes: 3 additions & 0 deletions inst/examples/legend.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ leaflet() %>% addTiles() %>% addLegend(
title = "An Obvious Legend"
)

\donttest{

# an automatic legend derived from the color palette
df <- local({
n <- 300; x <- rnorm(n); y <- rnorm(n)
Expand Down Expand Up @@ -38,3 +40,4 @@ leaflet(df) %>%
transform = function(x) 100 * x
), group = "circles", position = "bottomleft" ) %>%
addLayersControl(overlayGroups = c("circles"))
}
3 changes: 3 additions & 0 deletions man/addLegend.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/addRasterImage.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/addSimpleGraticule.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/colorNumeric.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/leaflet.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/map-methods.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit eaee4d5

Please sign in to comment.