From 2873a4c63c04a261ccea40832470e083641da32b Mon Sep 17 00:00:00 2001 From: James Lamb Date: Mon, 28 May 2018 22:16:53 -0500 Subject: [PATCH] Added deprecation warning on get_counts --- NEWS.md | 5 +++++ R/elasticsearch_eda_funs.R | 8 ++++++++ man/get_counts.Rd | 3 +++ 3 files changed, 16 insertions(+) diff --git a/NEWS.md b/NEWS.md index d0a8295..31359f1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 diff --git a/R/elasticsearch_eda_funs.R b/R/elasticsearch_eda_funs.R index 9c32146..4af3ce7 100644 --- a/R/elasticsearch_eda_funs.R +++ b/R/elasticsearch_eda_funs.R @@ -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 @@ -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) diff --git a/man/get_counts.Rd b/man/get_counts.Rd index 76748c2..272b9d0 100644 --- a/man/get_counts.Rd +++ b/man/get_counts.Rd @@ -52,3 +52,6 @@ recoDT <- get_counts(field = "pmt_method" , time_field = "dateTime") } } +\references{ +\href{https://github.com/UptakeOpenSource/uptasticsearch/pull/69}{get_counts will be deprecated soon} +}