Skip to content

Commit

Permalink
Clean up deprecated documentation and links for pkgdown
Browse files Browse the repository at this point in the history
  • Loading branch information
stufield committed Mar 22, 2024
1 parent 18620a1 commit 88abfd5
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 48 deletions.
2 changes: 1 addition & 1 deletion R/read-adat.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ read_adat <- function(file, debug = FALSE, verbose = getOption("verbose"), ...)
#' Alias to `read.adat`
#'
#' [read.adat()] is `r lifecycle::badge("superseded")`.
#' For backward compatibility will likely never go away completely,
#' For backward compatibility it will likely never go away completely,
#' but you are strongly encouraged to shift your code to use [read_adat()].
#'
#' @rdname read_adat
Expand Down
50 changes: 26 additions & 24 deletions R/z-deprecated.R
Original file line number Diff line number Diff line change
@@ -1,67 +1,69 @@
#' Deprecated function(s) of the \pkg{SomaDataIO} package
#'
#' @description
#' `r lifecycle::badge("superseded")`
#'
#' These functions have either been
#' `r lifecycle::badge("superseded")` or
#' `r lifecycle::badge("deprecated")`
#'
#' `r lifecycle::badge("soft-deprecated")`
#'
#' These functions are provided for compatibility with
#' older versions of the \pkg{SomaDataIO} package.
#' in the current version of \pkg{SomaDataIO} package.
#' They may eventually be completely removed, so
#' please re-code your scripts accordingly based on the
#' suggestions below:
#'
#' \tabular{lcr}{
#' `meltExpressionSet()` \tab now use \tab [pivotExpressionSet()] \cr
#' `getSomamers()` \tab now use \tab [getAnalytes()] \cr
#' `getFeatures()` \tab now use \tab [getAnalytes()] \cr
#' `getSomamerData()` \tab now use \tab [getAnalyteInfo()] \cr
#' `getFeatureData()` \tab now use \tab [getAnalyteInfo()]
#' **Function** \tab \tab **Now Use** \cr
#' [getSomamers()] \tab `r lifecycle::badge("superseded")` \tab [getAnalytes()] \cr
#' [getSomamerData()] \tab `r lifecycle::badge("superseded")` \tab [getAnalyteInfo()] \cr
#' }
#'
#' @rdname SomaDataIO-deprecated
#' @details
#' Some badges you may see in \pkg{SomaDataIO}:
#'
#' `r lifecycle::badge("superseded")`
#'
#' `r lifecycle::badge("deprecated")`
#'
#' `r lifecycle::badge("soft-deprecated")`
#'
#' `r lifecycle::badge("stable")`
#'
#' @name SomaDataIO-deprecated
#' @author Stu Field
#' @param ... A pass-through to allow the function to
#' trigger the `lifecycle` message.
#' @aliases meltExpressionSet getSomamers getSomamerData
# @inheritParams params
#' @aliases getSomamers getSomamerData
#' @importFrom lifecycle deprecate_warn deprecate_stop
NULL



#' @describeIn getAnalyteInfo
#' `r lifecycle::badge("superseded")`. Please adjust your code accordingly.
#' `r lifecycle::badge("superseded")`. Please now use [getAnalyteInfo()].
#' @export
getFeatureData <- function(adat) {
deprecate_warn("5.1.0", "SomaDataIO::getFeatureData()", "getAnalyteInfo()")
getAnalyteInfo(adat)
}

#' @describeIn getAnalytes
#' `r lifecycle::badge("superseded")`. Please adjust your code accordingly.
#' `r lifecycle::badge("superseded")`. Please now use [getAnalytes()].
#' @export
getFeatures <- function(x, n = FALSE, rm.controls = FALSE) {
deprecate_warn("5.1.0", "SomaDataIO::getFeatures()", "getAnalytes()")
getAnalytes(x = x, n = n, rm.controls = rm.controls)
}

#' @noRd
#' @describeIn pivotExpressionSet
#' `r lifecycle::badge("superseded")`. Please now use [pivotExpressionSet()].
#' @export
meltExpressionSet <- function(...) {
meltExpressionSet <- function(eSet) {
deprecate_stop("5.0.0", "SomaDataIO::meltExpressionSet()", "pivotExpressionSet()")
}

#' @noRd
#' @export
getSomamers <- function(...) {
getSomamers <- function(x) {
deprecate_stop("5.0.0", "SomaDataIO::getSomamers()", "getAnalytes()")
}

#' @noRd
#' @export
getSomamerData <- function(...) {
getSomamerData <- function(x) {
deprecate_stop("5.0.0", "SomaDataIO::getSomamerData()", "getAnalyteInfo()")
}
35 changes: 16 additions & 19 deletions man/SomaDataIO-deprecated.Rd

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

2 changes: 1 addition & 1 deletion man/getAnalyteInfo.Rd

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

2 changes: 1 addition & 1 deletion man/getAnalytes.Rd

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

10 changes: 9 additions & 1 deletion man/pivotExpressionSet.Rd

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

2 changes: 1 addition & 1 deletion man/read_adat.Rd

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

0 comments on commit 88abfd5

Please sign in to comment.