Riksrevisjonen / pioneeR

R package for running a Shiny app for DEA analysis
https://riksrevisjonen.github.io/pioneeR/
GNU General Public License v3.0
6 stars 2 forks source link

Add deprecation warning to `runPioneer()` #85

Closed Aeilert closed 2 weeks ago

Aeilert commented 5 months ago

runPioneeR() was renamed to run_pioneer() in v. 0.3.0. I think it is a good idea to add a warning for users about this in the forthcoming release (i.e deprecating it in version v. 0.4.0, and then removing it at later stage).

E.g. using {lifecycle}.

runPioneeR <- function(x = NULL, port = NULL, ...) {
  lifecycle::deprecate_warn('0.4.0', 'runPioneeR()', 'run_pioneer()')
  run_pioneer(x = x, port = port, ...)
}

cc: @ohjakobsen

ohjakobsen commented 3 weeks ago

Since all we are doing for the moment, is warning users of deprecation of functions, I'm against adding a new dependency to the app (the {lifecycle} package) for this purpose only. This goes against CRAN best practices of reducing the number of imports in a package. I suggest that we for the moment simply add our own function to the utils file. If we see a need in the future to use more of the features in the {lifecycle} package, such as documenting the state of our functions within the documentation files, we can reconsider adding the package to our dependencies. This comment is also relevant for #86.