diff --git a/.github/workflows/Check-NoSugests.yaml b/.github/workflows/Check-NoSugests.yaml deleted file mode 100644 index 2dcfb6a..0000000 --- a/.github/workflows/Check-NoSugests.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples -# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -# -# NOTE: This workflow only directly installs "hard" dependencies, i.e. Depends, -# Imports, and LinkingTo dependencies. Notably, Suggests dependencies are never -# installed, with the exception of testthat, knitr, and rmarkdown. The cache is -# never used to avoid accidentally restoring a cache containing a suggested -# dependency. -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -name: R-CMD-check(NoSuggests) - -permissions: read-all - -jobs: - check-no-suggests: - runs-on: ${{ matrix.config.os }} - - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) - - strategy: - fail-fast: false - matrix: - config: - - {os: ubuntu-latest, r: 'release'} - - env: - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - R_KEEP_PKG_SOURCE: yes - - steps: - - uses: actions/checkout@v4 - - - uses: r-lib/actions/setup-pandoc@v2 - - - uses: r-lib/actions/setup-r@v2 - with: - r-version: ${{ matrix.config.r }} - http-user-agent: ${{ matrix.config.http-user-agent }} - use-public-rspm: true - - - uses: r-lib/actions/setup-r-dependencies@v2 - with: - dependencies: '"hard"' - cache: false - extra-packages: | - any::rcmdcheck - any::testthat - any::knitr - any::rmarkdown - needs: check - - - uses: r-lib/actions/check-r-package@v2 - with: - upload-snapshots: true - build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/R/wms.R b/R/wms.R index 9722ff2..c0ade4c 100644 --- a/R/wms.R +++ b/R/wms.R @@ -19,7 +19,8 @@ wmsDependency <- function() { #' single-tile/untiled/nontiled layers, shared WMS sources, and #' \bold{GetFeatureInfo}-powered identify. #' -#' You can also use \bold{CQL-Filters} by appending a string to the \code{'baseUrl'}. +#' You can also use \bold{CQL-Filters} by appending a string +#' to the \code{'baseUrl'}. #' #' Something like \code{'http://server/wms?cql_filter=attribute=value'} #' diff --git a/README.md b/README.md index 5baeddd..8004405 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ [![](https://cranlogs.r-pkg.org/badges/grand-total/leaflet.extras2)](https://cran.rstudio.com/web/packages/leaflet.extras2/index.html) [![](https://cranlogs.r-pkg.org/badges/last-month/leaflet.extras2?color=blue)](https://cran.r-project.org/package=leaflet.extras2) [![Codecov test coverage](https://codecov.io/gh/trafficonese/leaflet.extras2/branch/master/graph/badge.svg)](https://app.codecov.io/gh/trafficonese/leaflet.extras2?branch=master) -[![R-CMD-check](https://github.com/trafficonese/leaflet.extras2/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/trafficonese/leaflet.extras2/actions/workflows/R-CMD-check.yaml) The goal of `leaflet.extras2` package is to provide extra functionality to the [leaflet](https://cran.r-project.org/package=leaflet) and [leaflet.extras](https://github.com/trafficonese/leaflet.extras) R packages using various leaflet plugins. @@ -33,7 +32,7 @@ If you need a plugin that is not already implemented create an [issue](https://g - [Ant Path](https://github.com/rubenspgcavalcante/leaflet-ant-path) - [Arrowheads](https://github.com/slutske22/leaflet-arrowheads) -- [ClusterCharts](https://gist.github.com/gisminister/10001728) +- [ClusterCharts-D3](https://gist.github.com/gisminister/10001728) - [Contextmenu](https://github.com/aratcliffe/Leaflet.contextmenu) - [DivIcon](https://leafletjs.com/reference.html#divicon) - [Easy Print](https://github.com/rowanwins/leaflet-easyPrint) diff --git a/tests/testthat/test-contextmenu.R b/tests/testthat/test-contextmenu.R index 7cde3dd..adcb4dc 100644 --- a/tests/testthat/test-contextmenu.R +++ b/tests/testthat/test-contextmenu.R @@ -4,7 +4,8 @@ test_that("contextmenu", { contextmenuWidth = 200, contextmenuItems = context_mapmenuItems( - context_menuItem("Zoom Out", "function(e) {this.zoomOut()}", disabled = FALSE), + context_menuItem("Zoom Out", "function(e) {this.zoomOut()}", + disabled = FALSE), "-", context_menuItem("Zoom In", "function(e) {this.zoomIn()}") ) @@ -42,14 +43,16 @@ test_that("contextmenu", { m$x$calls[[length(m$x$calls)]]$method, "showContextmenu" ) - expect_true(all(colnames(m$x$calls[[length(m$x$calls)]]$args[[1]]) %in% c("lng", "lat"))) + expect_true(all( + colnames(m$x$calls[[length(m$x$calls)]]$args[[1]]) %in% c("lng", "lat"))) m <- m %>% showContextmenu(lat = 49.79433, lng = 11.50941) expect_equal( m$x$calls[[length(m$x$calls)]]$method, "showContextmenu" ) - expect_true(all(colnames(m$x$calls[[length(m$x$calls)]]$args[[1]]) %in% c("lng", "lat"))) + expect_true(all( + colnames(m$x$calls[[length(m$x$calls)]]$args[[1]]) %in% c("lng", "lat"))) m <- m %>% hideContextmenu() expect_equal( diff --git a/tests/testthat/test-heightgraph.R b/tests/testthat/test-heightgraph.R index aae4ffc..e483d1b 100644 --- a/tests/testthat/test-heightgraph.R +++ b/tests/testthat/test-heightgraph.R @@ -34,7 +34,8 @@ data <- structure( ) ), row.names = 4L, class = c("sf", "data.frame"), sf_column = "geometry", - agr = structure(c(Name = NA_integer_, MaxWind = NA_integer_, MinPress = NA_integer_), + agr = structure(c(Name = NA_integer_, + MaxWind = NA_integer_, MinPress = NA_integer_), levels = c("constant", "aggregate", "identity"), class = "factor" ) ) diff --git a/tests/testthat/test-playback.R b/tests/testthat/test-playback.R index e75fc7a..f597177 100644 --- a/tests/testthat/test-playback.R +++ b/tests/testthat/test-playback.R @@ -134,10 +134,15 @@ test_that("playback", { structure(c(11.5772056036448, 49.9436206656224), class = c("XY", "POINT", "sfg")) ), precision = 0, - bbox = structure(c(xmin = 11.5772056036448, ymin = 49.9434124224934, xmax = 11.5779536762059, ymax = 49.9447628006851), + bbox = structure(c(xmin = 11.5772056036448, + ymin = 49.9434124224934, + xmax = 11.5779536762059, + ymax = 49.9447628006851), class = "bbox" ), - crs = structure(list(epsg = 4326L, proj4string = "+proj=longlat +datum=WGS84 +no_defs"), class = "crs"), + crs = structure(list( + epsg = 4326L, + proj4string = "+proj=longlat +datum=WGS84 +no_defs"), class = "crs"), n_empty = 0L, class = c("sfc_POINT", "sfc"), ids = 100L ) ), diff --git a/tests/testthat/test-sidebar.R b/tests/testthat/test-sidebar.R index f403d54..437e7fa 100644 --- a/tests/testthat/test-sidebar.R +++ b/tests/testthat/test-sidebar.R @@ -83,9 +83,12 @@ test_that("sidebar-error", { expect_error( sidebar_tabs( list(tags$i(class = "person"), tags$i(class = "person")), - sidebar_pane(id = "home_id", icon = tags$i(class = "person"), tagList()), - sidebar_pane(id = "profile_id", icon = tags$i(class = "person"), tagList()), - sidebar_pane(id = "messages_id", icon = tags$i(class = "person"), tagList()) + sidebar_pane(id = "home_id", + icon = tags$i(class = "person"), tagList()), + sidebar_pane(id = "profile_id", + icon = tags$i(class = "person"), tagList()), + sidebar_pane(id = "messages_id", + icon = tags$i(class = "person"), tagList()) ) ) }) diff --git a/tests/testthat/test-sidebyside.R b/tests/testthat/test-sidebyside.R index 226ce7d..58cd953 100644 --- a/tests/testthat/test-sidebyside.R +++ b/tests/testthat/test-sidebyside.R @@ -14,7 +14,8 @@ test_that("sidebyside", { data = breweries91[1:15, ], color = "blue", group = "blue", options = pathOptions(pane = "left") ) %>% - addCircleMarkers(data = breweries91[15:20, ], color = "yellow", group = "yellow") %>% + addCircleMarkers(data = breweries91[15:20, ], + color = "yellow", group = "yellow") %>% addCircleMarkers( data = breweries91[15:30, ], color = "red", group = "red", options = pathOptions(pane = "right") diff --git a/tests/testthat/test-spin.R b/tests/testthat/test-spin.R index 060dada..e92ce77 100644 --- a/tests/testthat/test-spin.R +++ b/tests/testthat/test-spin.R @@ -15,5 +15,6 @@ test_that("spin", { expect_false(m$x$calls[[length(m$x$calls)]]$args[[1]]) m <- m %>% startSpinner(options = list("lines" = 7, "width" = 12)) - expect_equal(m$x$calls[[length(m$x$calls)]]$args[[2]], list("lines" = 7, "width" = 12)) + expect_equal(m$x$calls[[length(m$x$calls)]]$args[[2]], + list("lines" = 7, "width" = 12)) }) diff --git a/tests/testthat/test-tangram.R b/tests/testthat/test-tangram.R index 3ee50d7..24d5660 100644 --- a/tests/testthat/test-tangram.R +++ b/tests/testthat/test-tangram.R @@ -1,5 +1,6 @@ test_that("tangram", { - scene <- system.file("examples/tangram/www/scene.yaml", package = "leaflet.extras2") + scene <- system.file("examples/tangram/www/scene.yaml", + package = "leaflet.extras2") m <- leaflet() %>% addTangram(scene = scene, group = "tangram") %>% diff --git a/tests/testthat/test-wms.R b/tests/testthat/test-wms.R index 99d8a91..4055aca 100644 --- a/tests/testthat/test-wms.R +++ b/tests/testthat/test-wms.R @@ -20,5 +20,5 @@ test_that("wms", { test_that("wms-error", { expect_error(leaflet() %>% - addWMS(baseUrl = "https://maps.dwd.de/geoserver/dwd/wms")) + addWMS(baseUrl = "https://maps.dwd.de/geoserver/dwd/wms")) })