Skip to content

Commit

Permalink
Merge pull request #69 from jameslamb/deprecate_get_counts
Browse files Browse the repository at this point in the history
Add deprecation warning on get_counts
  • Loading branch information
jameslamb committed May 31, 2018
2 parents ff68525 + 2873a4c commit e9c6c2a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# uptasticsearch 0.3.0

## Deprecations and Removals
- [#69](https://github.com/UptakeOpenSource/uptasticsearch/pull/69) added a deprecation warning on `get_counts`. This function was outside the core mission of the package and exposed us unnecessarily to changes in the Elasticsearch DSL

# uptasticsearch 0.2.0

## Features
Expand Down
8 changes: 8 additions & 0 deletions R/elasticsearch_eda_funs.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#' , end_date = "now"
#' , time_field = "dateTime")
#' }
#' @note \href{https://github.com/UptakeOpenSource/uptasticsearch/pull/69}{get_counts will be deprecated soon}
get_counts <- function(field
, es_host
, es_index
Expand All @@ -42,6 +43,13 @@ get_counts <- function(field
, max_terms = 1000
){

msg <- paste0(
"get_counts is deprecated as of https://github.com/UptakeOpenSource/uptasticsearch/pull/69. It will be ",
"dropped in the next release of uptasticsearch. If you use this function, please open an issue at ",
"https://github.com/UptakeOpenSource/uptasticsearch/issues and let the maintainers know."
)
log_warn(msg)

# Input checking
es_host <- .ValidateAndFormatHost(es_host)

Expand Down
3 changes: 3 additions & 0 deletions man/get_counts.Rd

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

0 comments on commit e9c6c2a

Please sign in to comment.