From 445ab34b7506a60a46ce22a103977796bfd88a24 Mon Sep 17 00:00:00 2001 From: olivroy Date: Thu, 21 Nov 2024 15:36:05 -0500 Subject: [PATCH 1/2] Revert "move readme imges out of man folder" This reverts commit babdae2bcd901a6ca0c12d310f24b246572d8f89. --- .Rbuildignore | 3 +-- README.Rmd | 13 +++++++------ README.md | 13 +++++++------ {figures => man/figures}/README-features.png | Bin {figures => man/figures}/README-garnish.png | Bin {figures => man/figures}/README-home.png | Bin {figures => man/figures}/README-logo.png | Bin {figures => man/figures}/README-query.png | Bin 8 files changed, 15 insertions(+), 14 deletions(-) rename {figures => man/figures}/README-features.png (100%) rename {figures => man/figures}/README-garnish.png (100%) rename {figures => man/figures}/README-home.png (100%) rename {figures => man/figures}/README-logo.png (100%) rename {figures => man/figures}/README-query.png (100%) diff --git a/.Rbuildignore b/.Rbuildignore index 2abcd6d..debbe42 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,5 +7,4 @@ ^_pkgdown\.yml$ ^docs$ ^pkgdown$ -^private$ -^figures$ +^private$ \ No newline at end of file diff --git a/README.Rmd b/README.Rmd index d801a33..bc9050f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -22,6 +22,7 @@ knitr::opts_chunk$set( ![monthly](http://cranlogs.r-pkg.org/badges/leafem) ![total](http://cranlogs.r-pkg.org/badges/grand-total/leafem) [![CRAN](http://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem) +[![status](https://tinyverse.netlify.com/badge/leafem)](https://CRAN.R-project.org/package=leafem) `leafem` provides extensions for package `leaflet` many of which are used by package `mapview`. The intention of this package is to enhance `leaflet` functionality to provide a more GIS-like feeling when plotting spatial data interactively. @@ -44,7 +45,7 @@ library(leaflet) leaflet() %>% addProviderTiles("OpenStreetMap") %>% addFeatures(data = breweries91) ``` -![](figures/README-features.png) +![](man/figures/README-features.png) #### addMouseCoordinates @@ -54,7 +55,7 @@ leaflet() %>% addMouseCoordinates() ``` -![](figures/README-garnish.png) +![](man/figures/README-garnish.png) #### garnishMap @@ -65,7 +66,7 @@ m <- leaflet() %>% addProviderTiles("OpenStreetMap") garnishMap(m, addMouseCoordinates) ``` -![](figures/README-garnish.png) +![](man/figures/README-garnish.png) #### addHomeButton @@ -80,7 +81,7 @@ m <- leaflet() %>% m ``` -![](figures/README-home.png) +![](man/figures/README-home.png) #### addImageQuery @@ -97,7 +98,7 @@ leaflet() %>% addLayersControl(overlayGroups = "poppendorf") ``` -![](figures/README-query.png) +![](man/figures/README-query.png) #### addLogo @@ -107,7 +108,7 @@ img <- "https://www.r-project.org/logo/Rlogo.svg" leaflet() %>% addTiles() %>% addLogo(img, url = "https://www.r-project.org/logo/") ``` -![](figures/README-logo.png) +![](man/figures/README-logo.png) ### Code of Conduct diff --git a/README.md b/README.md index 92a6a58..bbce0f2 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ checks](https://badges.cranchecks.info/worst/leafem.svg)](https://cran.r-project ![monthly](http://cranlogs.r-pkg.org/badges/leafem) ![total](http://cranlogs.r-pkg.org/badges/grand-total/leafem) [![CRAN](http://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem) +[![status](https://tinyverse.netlify.com/badge/leafem)](https://CRAN.R-project.org/package=leafem) `leafem` provides extensions for package `leaflet` many of which are @@ -37,7 +38,7 @@ library(leaflet) leaflet() %>% addProviderTiles("OpenStreetMap") %>% addFeatures(data = breweries91) ``` -![](figures/README-features.png) +![](man/figures/README-features.png) #### addMouseCoordinates @@ -47,7 +48,7 @@ leaflet() %>% addMouseCoordinates() ``` -![](figures/README-garnish.png) +![](man/figures/README-garnish.png) #### garnishMap @@ -58,7 +59,7 @@ m <- leaflet() %>% addProviderTiles("OpenStreetMap") garnishMap(m, addMouseCoordinates) ``` -![](figures/README-garnish.png) +![](man/figures/README-garnish.png) #### addHomeButton @@ -73,7 +74,7 @@ m <- leaflet() %>% m ``` -![](figures/README-home.png) +![](man/figures/README-home.png) #### addImageQuery @@ -90,7 +91,7 @@ leaflet() %>% addLayersControl(overlayGroups = "poppendorf") ``` -![](figures/README-query.png) +![](man/figures/README-query.png) #### addLogo @@ -100,7 +101,7 @@ img <- "https://www.r-project.org/logo/Rlogo.svg" leaflet() %>% addTiles() %>% addLogo(img, url = "https://www.r-project.org/logo/") ``` -![](figures/README-logo.png) +![](man/figures/README-logo.png) ### Code of Conduct diff --git a/figures/README-features.png b/man/figures/README-features.png similarity index 100% rename from figures/README-features.png rename to man/figures/README-features.png diff --git a/figures/README-garnish.png b/man/figures/README-garnish.png similarity index 100% rename from figures/README-garnish.png rename to man/figures/README-garnish.png diff --git a/figures/README-home.png b/man/figures/README-home.png similarity index 100% rename from figures/README-home.png rename to man/figures/README-home.png diff --git a/figures/README-logo.png b/man/figures/README-logo.png similarity index 100% rename from figures/README-logo.png rename to man/figures/README-logo.png diff --git a/figures/README-query.png b/man/figures/README-query.png similarity index 100% rename from figures/README-query.png rename to man/figures/README-query.png From e4c49c6d39f22263e82b34593713058c935ccadb Mon Sep 17 00:00:00 2001 From: olivroy Date: Thu, 21 Nov 2024 15:56:30 -0500 Subject: [PATCH 2/2] Random updates gh action, doc, add readme to rbuildignore + man/figures as pkgdown needs this. update badge + remove travis --- .Rbuildignore | 5 +++-- .github/workflows/R-CMD-check.yaml | 17 +++++++++++------ .travis.yml | 23 ----------------------- DESCRIPTION | 1 - R/homebutton.R | 2 ++ R/keys.R | 2 +- README.Rmd | 9 ++++----- README.md | 9 ++++----- man/addCopyExtent.Rd | 2 +- man/addHomeButton.Rd | 3 +++ 10 files changed, 29 insertions(+), 44 deletions(-) delete mode 100644 .travis.yml diff --git a/.Rbuildignore b/.Rbuildignore index debbe42..91ef7e3 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,4 +1,3 @@ -^\.travis\.yml$ ^CODE_OF_CONDUCT\.md$ ^README\.Rmd$ ^.*\.Rproj$ @@ -7,4 +6,6 @@ ^_pkgdown\.yml$ ^docs$ ^pkgdown$ -^private$ \ No newline at end of file +^private$ +^man/figures$ +^README\.md$ diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index e23739c..562fe0f 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,12 +1,13 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# 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 on: push: branches: [main, master] pull_request: - branches: [main, master] -name: R-CMD-check +name: R-CMD-check.yaml + +permissions: read-all jobs: R-CMD-check: @@ -18,7 +19,7 @@ jobs: fail-fast: false matrix: config: - - {os: macOS-latest, r: 'release'} + - {os: macos-latest, r: 'release'} - {os: windows-latest, r: 'release'} - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - {os: ubuntu-latest, r: 'release'} @@ -29,7 +30,7 @@ jobs: R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -41,6 +42,10 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: rcmdcheck + extra-packages: any::rcmdcheck + 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/.travis.yml b/.travis.yml deleted file mode 100644 index 3ee7fdf..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r -language: r -sudo: required -dist: xenial -cache: packages -latex: true - -addons: - apt: - sources: - - sourceline: 'ppa:ubuntugis/ubuntugis-unstable' - packages: - - gdal-bin - - libproj-dev - - libgeos-dev - - libgdal-dev - - libudunits2-dev - - netcdf-bin # for stars netcdf dep - -r: - - release - - devel - - oldrel diff --git a/DESCRIPTION b/DESCRIPTION index b635e6f..56db987 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -91,5 +91,4 @@ Suggests: terra, tools Encoding: UTF-8 -LazyData: false RoxygenNote: 7.3.2 diff --git a/R/homebutton.R b/R/homebutton.R index 744b105..6c3ac32 100644 --- a/R/homebutton.R +++ b/R/homebutton.R @@ -40,6 +40,8 @@ #' @export addHomeButton #' @name addHomeButton #' @rdname addHomeButton +#' @param css,hover_css list of valid CSS key-value pairs. See e.g. +#' \url{https://www.w3schools.com/cssref/index.php} for possible values. #' @aliases addHomeButton addHomeButton <- function(map, ext, group = "layer", position = 'bottomright', add = TRUE, diff --git a/R/keys.R b/R/keys.R index 868a6e0..ad4df06 100644 --- a/R/keys.R +++ b/R/keys.R @@ -4,7 +4,7 @@ #' Add JavaScript functioality to enable copying of the current view bouding box #' to the clipboard. The \code{copy.btn} argument expects a valid keycode #' \code{event.code} such as "KeyE" (the default). -#' Use \url{https://www.toptal.com/developers/keycode/} to find the +#' Use \url{https://www.toptal.com/developers/keycode} to find the #' approprate codes for your keyboard. #' #' @param map a mapview or leaflet object. diff --git a/README.Rmd b/README.Rmd index bc9050f..23b5ee7 100644 --- a/README.Rmd +++ b/README.Rmd @@ -17,12 +17,11 @@ knitr::opts_chunk$set( # leafem - leaflet extensions for mapview -[![R-CMD-check](https://github.com/r-spatial/leafem/workflows/R-CMD-check/badge.svg)](https://github.com/r-spatial/leafem/actions) +[![R-CMD-check](https://github.com/r-spatial/leafem/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-spatial/leafem/actions/workflows/R-CMD-check.yaml) [![cran checks](https://badges.cranchecks.info/worst/leafem.svg)](https://cran.r-project.org/web/checks/check_results_leafem.html) -![monthly](http://cranlogs.r-pkg.org/badges/leafem) -![total](http://cranlogs.r-pkg.org/badges/grand-total/leafem) -[![CRAN](http://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem) -[![status](https://tinyverse.netlify.com/badge/leafem)](https://CRAN.R-project.org/package=leafem) +![monthly](https://cranlogs.r-pkg.org/badges/leafem) +![total](https://cranlogs.r-pkg.org/badges/grand-total/leafem) +[![CRAN](https://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem) `leafem` provides extensions for package `leaflet` many of which are used by package `mapview`. The intention of this package is to enhance `leaflet` functionality to provide a more GIS-like feeling when plotting spatial data interactively. diff --git a/README.md b/README.md index bbce0f2..2e114ee 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,12 @@ -[![R-CMD-check](https://github.com/r-spatial/leafem/workflows/R-CMD-check/badge.svg)](https://github.com/r-spatial/leafem/actions) +[![R-CMD-check](https://github.com/r-spatial/leafem/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-spatial/leafem/actions/workflows/R-CMD-check.yaml) [![cran checks](https://badges.cranchecks.info/worst/leafem.svg)](https://cran.r-project.org/web/checks/check_results_leafem.html) -![monthly](http://cranlogs.r-pkg.org/badges/leafem) -![total](http://cranlogs.r-pkg.org/badges/grand-total/leafem) -[![CRAN](http://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem) -[![status](https://tinyverse.netlify.com/badge/leafem)](https://CRAN.R-project.org/package=leafem) +![monthly](https://cranlogs.r-pkg.org/badges/leafem) +![total](https://cranlogs.r-pkg.org/badges/grand-total/leafem) +[![CRAN](https://www.r-pkg.org/badges/version/leafem?color=009999)](https://cran.r-project.org/package=leafem) `leafem` provides extensions for package `leaflet` many of which are diff --git a/man/addCopyExtent.Rd b/man/addCopyExtent.Rd index 4000465..f200e9c 100644 --- a/man/addCopyExtent.Rd +++ b/man/addCopyExtent.Rd @@ -15,7 +15,7 @@ addCopyExtent(map, event.code = "KeyE") Add JavaScript functioality to enable copying of the current view bouding box to the clipboard. The \code{copy.btn} argument expects a valid keycode \code{event.code} such as "KeyE" (the default). -Use \url{https://www.toptal.com/developers/keycode/} to find the +Use \url{https://www.toptal.com/developers/keycode} to find the approprate codes for your keyboard. } \examples{ diff --git a/man/addHomeButton.Rd b/man/addHomeButton.Rd index 5647063..5cb4ed3 100644 --- a/man/addHomeButton.Rd +++ b/man/addHomeButton.Rd @@ -29,6 +29,9 @@ string)} 'bottomleft', 'bottomright'). Defaults to 'bottomright'.} \item{add}{logical. Whether to add the button to the map (mainly for internal use).} + +\item{css, hover_css}{list of valid CSS key-value pairs. See e.g. +\url{https://www.w3schools.com/cssref/index.php} for possible values.} } \description{ This function adds a button to the map that enables zooming to a