Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare cran release #84

Merged
merged 5 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/R-CMD-check-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
fail-fast: false
matrix:
config:
- {os: ubuntu-20.04, r: 'release'}
- {os: ubuntu-20.04, r: 'devel'}
- {os: ubuntu-20.04, r: 'devel', pkgs: 'depends only'}
- {os: ubuntu-22.04, r: 'release'}
- {os: ubuntu-22.04, r: 'devel'}
- {os: ubuntu-22.04, r: 'devel', pkgs: 'depends only'}

env:
_R_REMOTES_NO_ERRORS_FROM_WARNINGS_: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
config:
- {os: ubuntu-20.04, r: 'release', pkgs: 'all'}
- {os: ubuntu-22.04, r: 'release', pkgs: 'all'}

env:
_R_REMOTES_NO_ERRORS_FROM_WARNINGS_: true
Expand Down Expand Up @@ -83,9 +83,9 @@ jobs:
- name: Check URLs
if: runner.os == 'Linux' && matrix.config.r == 'release'
run: |
d <- suppressWarnings(readLines("inst/URLLIST"))
result <- urlchecker::url_check()
result <- result[!startsWith(result$URL, "https://doi.org/"), , drop = FALSE]
result <- result[!startsWith(result$URL, "http://geo.abds.is"), , drop = FALSE]
result <- result[!result$URL %in% d, , drop = FALSE]
if (nrow(result) > 0) {
print(result)
stop("Invalid URLs detected")
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: wdpar
Type: Package
Version: 1.3.7.4
Version: 1.3.8
Title: Interface to the World Database on Protected Areas
Description: Fetch and clean data from the World Database on Protected
Areas (WDPA) and the World Database on Other Effective Area-Based
Expand Down Expand Up @@ -45,7 +45,7 @@ Language: en-US
URL: https://prioritizr.github.io/wdpar/, https://github.com/prioritizr/wdpar
BugReports: https://github.com/prioritizr/wdpar/issues
VignetteBuilder: knitr
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Collate:
'internal.R'
'package.R'
Expand Down
10 changes: 7 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# wdpar 1.3.8

- CRAN release.
- Minor improvements to documentation.

# wdpar 1.3.7.4

- Fix typo in text formatting for `wdpa_clean()` documentation.

# wdpar 1.3.7.3

- Fix issues with `wdpa_fetch()` and `wdpa_read()` on MacOS.
- Fix bugs in `wdpa_fetch()` and `wdpa_read()` on MacOS.
Thanks to Jason Everett (@jaseeverett) for code contribution.
- Update DESCRIPTION with _prepr_ package information.
- Update README with Chromium dependencies.
- Update global example global processing script with increased precision.
- Update vignette to be compatible with changes to GADM website.
- Fix issue with tests leaving left-over junk in temporary directories.
- Fix issue with tests leaving left-over files in temporary directories.

# wdpar 1.3.7.2

Expand All @@ -26,7 +31,6 @@
characters from the `"MANG_PLAN"` field.
- Fix bug in `wdpa_read()` that causes output objects to contain no columns.
- Update README and vignette to be compatible with updates to _ggmap_ package.
- Remove _withr_ package from DESCRIPTION because it is not used.

# wdpar 1.3.7.1

Expand Down
2 changes: 1 addition & 1 deletion R/read_sf_n.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' @param n `integer` number of records to import.
#' Defaults to `NULL` such that all data are imported.
#'
#' @return [sf::sf()] object.
#' @return A [sf::sf()] object.
#'
#' @noRd
read_sf_n <- function(dsn, layer = NULL, n = NULL) {
Expand Down
2 changes: 1 addition & 1 deletion R/st_erase_overlaps.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NULL
#' @details This is a more robust -- albeit slower -- implementation for
#' [sf::st_difference()] when `y` is missing.
#'
#' @return [sf::sf()] object.
#' @return A [sf::sf()] object.
#'
#' @seealso [sf::st_difference()], [wdpa_dissolve()].
#'
Expand Down
3 changes: 3 additions & 0 deletions R/st_repair_geometry.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#' installed before the package itself can be installed
#' (see package README file for platform-specific instructions).
#'
#' @return A [sf::sf()] object.
#'
#' @examples
#' # create sf object
#' p1 <- st_sf(
Expand All @@ -42,6 +44,7 @@
#'
#' # print object
#' print(p2)
#"
#' @export
st_repair_geometry <- function(x, geometry_precision = 1500) {
# assert arguments are valid
Expand Down
2 changes: 1 addition & 1 deletion R/wdpa_clean.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ NULL
#' For an example of processing a large protected area dataset,
#' please see the vignette.
#'
#' @return [sf::sf()] object.
#' @return A [sf::sf()] object.
#'
#' @seealso [wdpa_fetch()], [wdpa_dissolve()].
#'
Expand Down
4 changes: 2 additions & 2 deletions R/wdpa_fetch.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ NULL
#' you can assume that the function still worked correctly.
#' For reference, the misleading message will look something like this:
#' ```
#' [2024-04-23 12:06:36] [error] handle_read_frame error: websocketpp.transport:7 (End of File)
#' [error] handle_read_frame error: websocketpp.transport:7 (End of File)
#' ```
#'
#' For further help with troubleshooting, please refer to the documentation
#' for the \pkg{chromote} package (https://rstudio.github.io/chromote/).
#'
#' @return [sf::sf()] object.
#' @return A [sf::sf()] object.
#'
#' @seealso [wdpa_clean()], [wdpa_read()],
#' [wdpa_url()], [countrycode::countrycode()].
Expand Down
2 changes: 1 addition & 1 deletion R/wdpa_latest_version.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ NULL
#' global dataset is available. For specific details, please refer to
#' the source code for this function.
#'
#' @return `character` version of the dataset.
#' @return A `character` value with the dataset version.
#'
#' @examples
#' \dontrun{
Expand Down
2 changes: 1 addition & 1 deletion R/wdpa_read.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ NULL
#'
#' @inheritSection wdpa_fetch Data source
#'
#' @return [sf::sf()] object.
#' @return A [sf::sf()] object.
#'
#' @seealso [wdpa_fetch()], [wdpa_clean()].
#'
Expand Down
2 changes: 1 addition & 1 deletion R/wdpa_url.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ NULL
#' and (`"gdb"`) file geodatabase format. Defaults to `"gdb".
#' Note that global data are only available in file geodatabase format.
#'
#' @return `character` URL to download the data.
#' @return A `character` value with the URL to download the data.
#'
#' @seealso [wdpa_fetch()], [countrycode::countrycode()].
#'
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Print preview of the data associated with each protected area.
head(mlt_pa_data)
```

Finally, after cleaning the data, let's plot a map showing Malta's protected areas and color each area according to its management category ([as defined by the The International Union for Conservation of Nature](https://www.iucn.org/)).
Finally, after cleaning the data, let's plot a map showing Malta's protected areas and color each area according to its management category ([as defined by the The International Union for Conservation of Nature](https://iucn.org/)).

```{r "readme-map", message = FALSE, warning = FALSE, out.width = ifelse(isTRUE(knitr:::is_html_output(excludes = c("markdown"))), "60%", "50%")}
# reproject data to longitude/latitude for plotting
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![Documentation](https://img.shields.io/github/actions/workflow/status/prioritizr/wdpar/documentation.yaml?branch=master&label=Documentation)](https://github.com/prioritizr/wdpar/actions)
[![Coverage
Status](https://img.shields.io/codecov/c/github/prioritizr/wdpar?label=Coverage)](https://app.codecov.io/gh/prioritizr/wdpar/branch/master)
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/wdpar)](https://CRAN.R-project.org/package=wdpar)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/wdpar)](https://CRAN.R-project.org/package=wdpar)

### Overview

Expand Down Expand Up @@ -114,8 +114,8 @@ installed using the following system commands:
##### *Linux*

For Unix-alikes, a Chromium-based web browser (e.g., Google Chrome,
Chromium, Brave), `gmp` (&gt;= 4.2.3), `mpfr` (&gt;= 3.0.0), and `gdal`
(&gt;= 3.2.2) are required.
Chromium, Brave), `gmp` (\>= 4.2.3), `mpfr` (\>= 3.0.0), and `gdal` (\>=
3.2.2) are required.

##### *macOS*

Expand Down Expand Up @@ -184,18 +184,18 @@ head(mlt_pa_data)
## Simple feature collection with 6 features and 32 fields
## Geometry type: MULTIPOLYGON
## Dimension: XY
## Bounding box: xmin: 1382584 ymin: 4280853 xmax: 1390560 ymax: 4299615
## Bounding box: xmin: 1382584 ymin: 4280853 xmax: 1394227 ymax: 4299615
## Projected CRS: +proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +datum=WGS84 +ellps=WGS84 +units=m +no_defs
## Precision: 1500
## # A tibble: 6 × 33
## WDPAID WDPA_PID PA_DEF NAME ORIG_NAME DESIG DESIG_ENG DESIG_TYPE IUCN_CAT
## <dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 194425 194425 PA 'Il-… 'Il-Gżej… Rise… Nature R… National Ia
## 1 194425 194425 PA Il-G… Il-Gżejj… Rise… Nature R… National Ia
## 2 194420 194420 PA Filf… Filfla Rise… Nature R… National Ia
## 3 555588631 555588631 PA Il-M… Il-Majji… Park… National… National II
## 4 174758 174758 PA Bidn… Bidnija,… List… List of … National III
## 3 555700375 555700375 PA Il-P… Il-Ponta… Rise… Nature R… National Ia
## 4 555588631 555588631 PA Il-M… Il-Majji… Park… National… National II
## 5 194418 194418 PA Il-B… Il-Ballu… List… List of … National III
## 6 194417 194417 PA 'Il-… 'Il-Wied… List… List of … National III
## 6 194415 194415 PA Il-Ġ… Il-Ġonna… List… List of … National III
## # ℹ 24 more variables: INT_CRIT <chr>, MARINE <chr>, REP_M_AREA <dbl>,
## # GIS_M_AREA <dbl>, REP_AREA <dbl>, GIS_AREA <dbl>, NO_TAKE <chr>,
## # NO_TK_AREA <dbl>, STATUS <chr>, STATUS_YR <dbl>, GOV_TYPE <chr>,
Expand All @@ -207,7 +207,7 @@ head(mlt_pa_data)
Finally, after cleaning the data, let’s plot a map showing Malta’s
protected areas and color each area according to its management category
([as defined by the The International Union for Conservation of
Nature](https://www.iucn.org/)).
Nature](https://iucn.org/)).

``` r
# reproject data to longitude/latitude for plotting
Expand Down
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ authors:
href: http://jeffrey-hanson.com

template:
bootstrap: 5
params:
bootswatch: flatly

Expand Down
8 changes: 4 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Dear CRAN volunteers,

Thank you for reviewing this submission. The main updates in this version include (i) a bug fix for the data cleaning procedures and (ii) fixing the alias for package-level documentation.
Thank you for reviewing this submission. It contains an update to the _wdpar_ package that has been on CRAN since 2019. The main changes in this new version include (i) updates to maintain compatibility with the Protected Planet website and the World Database on Protected Areas, (ii) functionality to download data in different file formats, (iii) bug fixes to address issues on MacOS systems, and (iv) assorted improvements to the documentation.

Cheers,

Jeff

# Test environments

* [Ubuntu 20.04, R-release](https://github.com/prioritizr/wdpar/actions?query=workflow%3AUbuntu)
* [Ubuntu 20.04, R-devel](https://github.com/prioritizr/wdpar/actions?query=workflow%3AUbuntu)
* [Ubuntu 22.04, R-release](https://github.com/prioritizr/wdpar/actions?query=workflow%3AUbuntu)
* [Ubuntu 22.04, R-devel](https://github.com/prioritizr/wdpar/actions?query=workflow%3AUbuntu)
* [Mac OSX 10.15, R-release](https://github.com/prioritizr/wdpar/actions?query=workflow%3A%22Mac+OSX%22)
* [macOS 11.5.2 (arm64), R-release (macOS builder)](https://mac.r-project.org/macbuilder/submit.html)
* [Windows Server 2019, R-release](https://github.com/prioritizr/wdpar/actions?query=workflow%3AWindows)
Expand All @@ -29,7 +29,7 @@ Jeff
* Suggests or Enhances not in mainstream repositories:
prepr

**The prepr R package is an optional dependency that is available on GitHub (<https://github.com/dickoa/prepr>). Instructions for installing the prepr R package are provided in the DESCRIPTION file and the package README file.**
**The prepr R package is an optional dependency that is available on GitHub (<https://github.com/prioritizr/prepr>). Instructions for installing the prepr R package are provided in the DESCRIPTION file and the package README file.**

* Found the following (possibly) invalid URLs:
URL: https://doi.org/10.1111/conl.12158
Expand Down
Loading
Loading