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

Add deprecation warning on get_counts #69

Merged
merged 1 commit into from May 31, 2018

Conversation

@jameslamb
Copy link
Member

@jameslamb jameslamb commented May 29, 2018

Overview

In this PR, I'd like to propose deprecating get_counts. This function is not really central to what uptasticsearch does and will require extra administrative burden to test. As a reminder, get_counts basically generates queries to check the counts of different values on a field within a period of time.

This is outside of our mission for a couple of reasons:

  • assumes that you have time-series data
  • writes query DSL inside the package
  • only useful for a very specific type of EDA

IMHO we should remove this function from the package.

Deprecation Strategy

I propose accepting this PR so this warning goes out with the next release to CRAN (which we will attempt whenever #66 is building and gets merged).

After that release gets to CRAN, I'll submit a PR straight-up removing this function from uptasticsearch.

We will wait at least one month to do the next release, giving people time to uncover this deprecation warning.

IF any interest is shown in the function (via people creating issues), we can discuss keeping it.

@codecov-io
Copy link

@codecov-io codecov-io commented May 29, 2018

Codecov Report

Merging #69 into master will decrease coverage by 0.74%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
- Coverage   68.43%   67.68%   -0.75%     
==========================================
  Files           4        4              
  Lines         548      554       +6     
==========================================
  Hits          375      375              
- Misses        173      179       +6
Impacted Files Coverage Δ
R/elasticsearch_eda_funs.R 36.03% <0%> (-2.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff68525...2873a4c. Read the comment docs.

@@ -32,6 +32,7 @@
#' , end_date = "now"
#' , time_field = "dateTime")
#' }
#' @references \href{https://github.com/UptakeOpenSource/uptasticsearch/pull/69}{get_counts will be deprecated soon}

This comment has been minimized.

@austin3dickey

austin3dickey May 29, 2018
Member

Perhaps change this to @note? That may make more sense than "References"

This comment has been minimized.

@jameslamb

jameslamb May 29, 2018
Author Member

good call

Copy link
Member

@austin3dickey austin3dickey left a comment

I agree with this deprecation strategy. This function makes too many assumptions

@jameslamb
Copy link
Member Author

@jameslamb jameslamb commented May 29, 2018

@austin3dickey should we deprecate parse_date_time too (with the same strategy)? That functionality is also not specific to Elasticsearch

@austin3dickey
Copy link
Member

@austin3dickey austin3dickey commented May 29, 2018

I don't think so. That's a utility that parses data you get from Elasticsearch (timestamps of the form "2016-06-28T08:53:07Z") that's not replicable in base R (I don't think you can parse military time zone abbreviations) so it seems to me that it belongs

@jataggart
Copy link
Member

@jataggart jataggart commented May 29, 2018

I like the deprecation strategy, but is there any way or need to make it more obvious? Maybe call out the deprecations in the README or NEWS documents...

@jameslamb
Copy link
Member Author

@jameslamb jameslamb commented May 30, 2018

@jataggart good call, will add to the NEWS.md

@austin3dickey ok sure. I think there's a difference between "this function should exist somewhere in the R ecosystem" and "this function belongs in uptasticsearch".

That date format is not ES specific...it's called ISO 8601 and it's used in other places where a mixed date + time + TZ string representation is required.

For now, I think the message is "we all feel fine about deprecating get_counts but parse_date_time is more contentious". So I won't bundle it into this PR. Also it's not exposing us to the ES query DSL so I think it's a lower priority to figure out

@jameslamb jameslamb force-pushed the jameslamb:deprecate_get_counts branch from 9cd4693 to 2873a4c May 30, 2018
@jameslamb
Copy link
Member Author

@jameslamb jameslamb commented May 31, 2018

Got it building! All of the failed builds were from transient Travis issues. I just kept clicking rebuild until they resolved themselves

@jameslamb jameslamb merged commit e9c6c2a into uptake:master May 31, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jameslamb jameslamb mentioned this pull request Jun 11, 2018
@jameslamb jameslamb deleted the jameslamb:deprecate_get_counts branch Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.