Skip to content

Commit 1df7e98

Browse files
authored
Merge pull request #641 from ropensci/cran_release
rgbif 3.7.6 cran release
2 parents d32516a + cf0ad27 commit 1df7e98

File tree

202 files changed

+325596
-99145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+325596
-99145
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
config:
15-
- { os: windows-latest, r: 'release'}
16-
- { os: macOS-latest, r: 'release'}
17-
- { os: ubuntu-20.04, r: 'release'}
15+
- { os: windows-latest, r: 'release', rtools: '42'}
16+
- { os: macOS-latest, r: 'release', rtools: ''}
17+
- { os: ubuntu-20.04, r: 'release', rtools: ''}
1818

1919
env:
2020
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
@@ -31,6 +31,7 @@ jobs:
3131
- uses: r-lib/actions/setup-r@v2
3232
with:
3333
r-version: ${{ matrix.config.r }}
34+
rtools-version: ${{ matrix.config.rtools }}
3435

3536
- uses: r-lib/actions/setup-pandoc@v2
3637

@@ -47,7 +48,7 @@ jobs:
4748
path: ${{ env.R_LIBS_USER }}
4849
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-2-${{ hashFiles('.github/depends.Rds') }}
4950
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-2-
50-
51+
5152
- name: Install pak
5253
run: |
5354
install.packages("pak", repos = "https://r-lib.github.io/p/pak/devel/")
@@ -70,18 +71,14 @@ jobs:
7071
if: runner.os == 'Linux'
7172
run: |
7273
pak::local_install_dev_deps()
73-
install.packages("stringi")
74-
install.packages("sf")
75-
install.packages("protolite")
76-
pak::pkg_install(c("rcmdcheck", "maps", "scales", "colorspace", "raster"))
74+
pak::pkg_install(c("sf","rcmdcheck", "maps", "scales", "colorspace", "raster", "protolite"))
7775
shell: Rscript {0}
7876

7977
- name: Install dependencies macOS and Windows
8078
if: runner.os == 'macOS' || runner.os == 'Windows'
8179
run: |
82-
install.packages('terra', repos='https://rspatial.r-universe.dev') # issue #597
8380
pak::local_install_dev_deps()
84-
pak::pkg_install(c("stringi","rcmdcheck", "sf", "maps", "scales", "colorspace", "raster", "protolite"))
81+
pak::pkg_install(c("sf","rcmdcheck", "maps", "scales", "colorspace", "raster", "protolite"))
8582
shell: Rscript {0}
8683

8784
- name: Session info

.github/workflows/check-cron.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
branches:
44
- master
55
- actions
6+
- cran_release
67
schedule:
78
- cron: '0 0 */3 * *' # every 3 days
89

@@ -62,10 +63,7 @@ jobs:
6263
- name: Install dependencies
6364
run: |
6465
pak::local_install_dev_deps()
65-
install.packages("stringi")
66-
install.packages("sf")
67-
install.packages("protolite")
68-
pak::pkg_install(c("rcmdcheck", "maps", "scales", "colorspace", "raster"))
66+
pak::pkg_install(c("rcmdcheck", "maps", "scales", "colorspace", "raster", "protolite"))
6967
shell: Rscript {0}
7068

7169
- name: Session info

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Description: A programmatic interface to the Web Service methods
88
retrieving information on data providers, getting species occurrence
99
records, getting counts of occurrence records, and using the GBIF
1010
tile map service to make rasters summarizing huge amounts of data.
11-
Version: 3.7.5.5
11+
Version: 3.7.6
1212
License: MIT + file LICENSE
1313
Authors@R: c(
1414
person("Scott", "Chamberlain", role = "aut", comment = c(ORCID="0000-0003-1444-9135")),

NEWS.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
rgbif 3.7.6
2+
===========
3+
4+
### BREAKING CHANGE
5+
6+
* `occ_count()` parameter `type` is now deprecated and will no longer work correctly. Please see `occ_count_country()`, `occ_count_pub_country()`, `occ_count_year()`, `occ_count_basis_of_record()` for replacements. (#622)
7+
8+
### DEPRECATED
9+
10+
* `occ_count()` parameters `georeferenced`, `type`, `date`, `to`, `from` are no longer supported and not guaranteed to work correctly. (#622)
11+
* `occ_facet()` and `count_facet()` are now deprecated use `occ_count(facet="x")` instead.
12+
13+
### NEW FEATURES
14+
15+
* `lit_search()` now supports searching the GBIF literature API. (#591)
16+
* `occ_count()` now supports almost all `occ_search()` queries. (#622)
17+
* `occ_count()` now supports the facets interface through `occ_count(facet="x")`. (#622)
18+
* `organizations()` (aka publishers) now supports the use of getting lists of publishers by `country`. (#606)
19+
* `occ_download()` and `occ_search()` now support downloading and getting occurrences a certain distance from known country/area centroids via the parameter `distanceFromCentroidInMeters`. (#594)
20+
21+
### MINOR IMPROVEMENTS
22+
23+
* `occ_search()` now supports more multi-valued parameters. (#617)
24+
* Removed dependencies on `randgeo` and `conditionz`. (#624) (#625)
25+
26+
### Documentation
27+
28+
New article explaining `occ_count()` changes and new features [Getting Occurrence Counts From GBIF](https://docs.ropensci.org/rgbif/articles/occ_counts.html).
29+
30+
131
rgbif 3.7.5
232
===========
333

@@ -49,8 +79,7 @@ rgbif 3.7.3
4979
### DEPRECATED
5080

5181
* `networks()` is deprecated and called `network()` instead. (#527)
52-
* `parsenames()` is deprecated and called `name_parse()` for better alignment
53-
with other `name_*` functions. (#504)
82+
* `parsenames()` is deprecated and called `name_parse()` for better alignment with other `name_*` functions. (#504)
5483

5584
### BUG FIXES
5685

R/lit_search.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,14 @@ lit_search <- function(
221221
"&offset=",offset_seq,
222222
"&limit=",limit_seq)
223223
}
224+
# clean urls
225+
urls <- sapply(urls,function(x) utils::URLencode(x))
226+
urls <- sapply(urls,function(x) gsub("\\[|\\]","",x)) # remove any square brackets
227+
# make request
224228
ll <- gbif_async_get(urls,parse=TRUE)
225229
data <- process_lit_async_results(ll,flatten=flatten)
226230
meta <- rgbif_compact(ll[[length(urls)]])
231+
# clean results
227232
meta$results <- NULL
228233
meta$offset <- NULL
229234
meta$limit <- NULL

R/occ_count.r

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,21 @@
100100
#'
101101
#' }
102102
occ_count <- function(...,occurrenceStatus="PRESENT", curlopts = list()) {
103-
104103
args <- list(...)
105104
args <- rgbif_compact(c(args,occurrenceStatus=occurrenceStatus))
106105
arg_names <- names(args)
107106

107+
# check if arg is acceptable
108+
formal_args <- names(formals(occ_search))
109+
facet_args <- c("facetLimit","facet","facetMincount","facetMultiselect")
110+
legacy_args <- c("georeferenced","date","to","from","type")
111+
# acceptable arguments or ignored arguments
112+
ign_args <- c("limit","start","fields","return","skip_validate","geom_big","geom_size","geom_n","...")
113+
acc_args <- c(formal_args,facet_args,legacy_args)
114+
115+
bad_args <- (arg_names[(!arg_names %in% acc_args) | (arg_names %in% ign_args)])
116+
if(length(bad_args) > 0) warning(paste(bad_args,collapse=",")," not acceptable args for occ_count() and will be ignored.")
117+
108118
# check for multiple values
109119
if(any(!sapply(args,length) == 1)) stop("Multiple values of the form c('a','b') are not supported. Use 'a;b' instead.")
110120

@@ -214,6 +224,12 @@ occ_count <- function(...,occurrenceStatus="PRESENT", curlopts = list()) {
214224
facetLimit = args$facetLimit)
215225

216226
if("facet" %in% arg_names) {
227+
not_facet_arg <- c("skip_validate","...","curlopts","facetMultiselect",
228+
"facetMincount", "facet","return","fields","start",
229+
"limit","verbatimTaxonId","geometry", "geom_big",
230+
"geom_size","geom_n","search")
231+
acc_facet_arg <- formal_args[!formal_args %in% not_facet_arg]
232+
if(!args$facet %in% acc_facet_arg) stop("Bad facet arg.")
217233
count <- stats::setNames(res$facet[[1]],c(args$facet,"count"))
218234
} else {
219235
count <- as.numeric(res$meta$count)

codemeta.json

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"codeRepository": "https://github.com/ropensci/rgbif",
99
"issueTracker": "https://github.com/ropensci/rgbif/issues",
1010
"license": "https://spdx.org/licenses/MIT",
11-
"version": "3.7.5",
11+
"version": "3.7.6",
1212
"programmingLanguage": {
1313
"@type": "ComputerLanguage",
1414
"name": "R",
@@ -150,18 +150,6 @@
150150
},
151151
"sameAs": "https://CRAN.R-project.org/package=sf"
152152
},
153-
{
154-
"@type": "SoftwareApplication",
155-
"identifier": "randgeo",
156-
"name": "randgeo",
157-
"provider": {
158-
"@id": "https://cran.r-project.org",
159-
"@type": "Organization",
160-
"name": "Comprehensive R Archive Network (CRAN)",
161-
"url": "https://cran.r-project.org"
162-
},
163-
"sameAs": "https://CRAN.R-project.org/package=randgeo"
164-
},
165153
{
166154
"@type": "SoftwareApplication",
167155
"identifier": "vcr",
@@ -337,23 +325,11 @@
337325
"sameAs": "https://CRAN.R-project.org/package=R6"
338326
},
339327
"12": {
340-
"@type": "SoftwareApplication",
341-
"identifier": "conditionz",
342-
"name": "conditionz",
343-
"provider": {
344-
"@id": "https://cran.r-project.org",
345-
"@type": "Organization",
346-
"name": "Comprehensive R Archive Network (CRAN)",
347-
"url": "https://cran.r-project.org"
348-
},
349-
"sameAs": "https://CRAN.R-project.org/package=conditionz"
350-
},
351-
"13": {
352328
"@type": "SoftwareApplication",
353329
"identifier": "stats",
354330
"name": "stats"
355331
},
356-
"14": {
332+
"13": {
357333
"@type": "SoftwareApplication",
358334
"identifier": "wk",
359335
"name": "wk",
@@ -370,11 +346,11 @@
370346
"applicationCategory": "Biodiversity",
371347
"isPartOf": "https://ropensci.org",
372348
"keywords": ["GBIF", "specimens", "API", "web-services", "occurrences", "species", "taxonomy", "gbif", "api", "data", "biodiversity", "rstats", "r", "spocc", "r-package", "lifewatch", "oscibio"],
373-
"fileSize": "10891.58KB",
349+
"fileSize": "12364.127KB",
374350
"citation": [
375351
{
376352
"@type": "SoftwareSourceCode",
377-
"datePublished": "2022",
353+
"datePublished": "2023",
378354
"author": [
379355
{
380356
"@type": "Person",
@@ -414,7 +390,7 @@
414390
],
415391
"name": "rgbif: Interface to the Global Biodiversity Information Facility API",
416392
"url": "https://CRAN.R-project.org/package=rgbif",
417-
"description": "R package version 3.7.5"
393+
"description": "R package version 3.7.6"
418394
},
419395
{
420396
"@type": "ScholarlyArticle",

cran-comments.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## Test environments
22

33
* local windows, R 4.2.2
4-
* ubuntu 18.04, R 4.2.2 (GitHub Actions)
4+
* windows latest R 4.2.2 (GitHub Actions)
5+
* ubuntu 20.04, R 4.2.2 (GitHub Actions)
56
* macOS latest, R 4.2.2 (GitHub Actions)
67

78
## R CMD check results
@@ -10,7 +11,7 @@
1011

1112
## Reverse dependencies
1213

13-
* I have run R CMD check on the 16 reverse dependencies. Reverse dependency checks at <https://github.com/ropensci/rgbif/actions?query=workflow%3Arevdep>. No problems were found related to this package.
14+
* I have run R CMD check on the 15 reverse dependencies. Reverse dependency checks at <https://github.com/ropensci/rgbif/actions?query=workflow%3Arevdep>. No problems were found related to this package.
1415

1516
--------
1617

revdep/README.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

revdep/email.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)