Skip to content

Commit

Permalink
Add NEWS
Browse files Browse the repository at this point in the history
* Improve DESCRIPTION: add R dependency (prepare to use native pipe over magrittr pipe), pin crul version
* Improve ckanr-package author email
* Fix dbplyr_edition generics
* Suggest new package version 0.8.0
  • Loading branch information
florianm committed May 26, 2024
1 parent c4e35e6 commit e1aac3f
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 15 deletions.
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ BugReports: https://github.com/ropensci/ckanr/issues
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
Depends: DBI (>= 0.3.1)
Depends:
DBI (>= 1.2.2),
R (>= 4.4.0)
Imports:
methods,
stats,
utils,
crul,
crul (>= 1.4.2),
jsonlite (>= 1.8.8),
dplyr (>= 1.1.4),
dbplyr (>= 2.5.0),
Expand Down
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ S3method(db_begin,CKANConnection)
S3method(db_has_table,CKANConnection)
S3method(db_insert_into,CKANConnection)
S3method(db_query_rows,CKANConnection)
S3method(dbplyr_edition,myConnectionClass)
S3method(dbplyr_edition,CKANConnection)
S3method(dbplyr_edition,src_ckan)
S3method(format,src_ckan)
S3method(print,ckan_group)
S3method(print,ckan_organization)
Expand Down
25 changes: 24 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# ckanr (development version)

ckanr 0.8.0
===========

### NEW FEATURES

* upgrades deprecated `dbplyr` generics (#187, @florianm)

Following [dbplyr's 2.0.0 backend API](https://dbplyr.tidyverse.org/articles/backend-2.html),
scripts using `ckanr`'s SQL `CKANConnection` must implement the following
changes:

* change `dplyr::sql_translate_env` to `dbplyr::sql_translation`
* change `dplyr::db_explain` to `dbplyr::sql_query_explain`
* change `dplyr::db_query_fields` to `dbplyr::sql_query_fields`
* change `dplyr::sql_subquery` to `dbplyr::sql_query_wrap`
* change `dplyr::sql_select` to `dbplyr::sql_query_select`
* all other generics are unchanged.
* updates dependencies (R, DBI, jsonlite, dplyr, dbplyr, RoxygenNote)

### MINOR IMPROVEMENTS

* update manpage author list (add SG, FA), author email (FM)

ckanr 0.7.0
===========

Expand Down Expand Up @@ -81,7 +104,7 @@ ckanr 0.3.0
* `package_show()` gains `key` parameter to pass an API key (#97)
* `package_search()` gains new parameters: `include_drafts`, `include_private`, `use_default_schema`, and `facet.mincount` (#107)
* function `fetch()` changed to `ckan_fetch()`
* gains function `organization_delet()` to delete an organization (#83)
* gains function `organization_delete()` to delete an organization (#83)
* gains function `ckan_version()` to get version info for a CKAN instance
* gains methods for creating a CKAN remote instance as a dplyr backend: gains `src_ckan()` and it's s3 methods `tbl` and `src_tbls`, `sql_translate_env`. in addition gains the S3 methods `db_begin`, `db_explain`, `db_has_table`, `db_insert_into`, `db_query_fields`, `db_query_rows`

Expand Down
2 changes: 1 addition & 1 deletion R/ckanr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#' @aliases ckanr
#' @docType package
#' @author Scott Chamberlain \email{myrmecocystus@@gmail.com}
#' @author Florian Mayer \email{florian.wendelin.mayer@@gmail.com}
#' @author Florian Mayer \email{florian.wendelin.mayer+ckanr@@gmail.com}
#' @author Wush Wu
#' @author Imanuel Costigan \email{i.costigan@@me.com}
#' @author Sharla Gelfand
Expand Down
14 changes: 10 additions & 4 deletions R/dplyr.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,20 @@ db_query_rows.CKANConnection <- function(con, sql, ...) {

#' Use dbplyr 2.0.0 generics
#' See https://dbplyr.tidyverse.org/articles/backend-2.html#nd-edition
#' New in 0.7.0.9001
#' Introduced in 0.8.0
#' @importFrom dbplyr dbplyr_edition
#' @export
dbplyr_edition.myConnectionClass <- function(con) 2L
dbplyr_edition.CKANConnection <- function(con) 2L

#' Use dbplyr 2.0.0 generics
#' See https://dbplyr.tidyverse.org/articles/backend-2.html#nd-edition
#' Introduced in 0.8.0
#' @importFrom dbplyr dbplyr_edition
#' @export
dbplyr_edition.src_ckan <- function(con) 2L

#' @importFrom dplyr db_list_tables sql
#' @importFrom dbplyr base_agg base_scalar base_win build_sql sql_prefix
#' sql_translator sql_variant src_sql tbl_sql
#' sql_query_fields
#' sql_query_select sql_query_wrap sql_query_explain sql_translation
#' sql_query_fields sql_query_select sql_query_wrap sql_query_explain sql_translation
NULL
2 changes: 1 addition & 1 deletion man/ckanr-package.Rd

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

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

15 changes: 15 additions & 0 deletions man/dbplyr_edition.src_ckan.Rd

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

0 comments on commit e1aac3f

Please sign in to comment.