Skip to content

Commit

Permalink
Reverse the decision to deprecate ods_sheets ref #133 [no ci] (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot authored Aug 23, 2023
1 parent 38cefb8 commit 967e10a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# readODS 2.05

## Reverse the decision to deprecate `ods_sheets`

See discussion #133

# readODS 2.04

## `col_types` can be character ("shorthand") or list
Expand Down
10 changes: 4 additions & 6 deletions R/list_ods_sheets.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#' Get information in an (F)ODS File
#'
#' `list_(f)ods_sheets` lists all sheets in an (f)ods file.
#'
#'
#' `list_(f)ods_sheets` lists all sheets in an (f)ods file.
#'
#' @param path Path to the (f)ods file
#' @param include_external_data A boolean value to show or hide sheets containing archived linked data (default false)
#' @return For `list_(f)ods_sheets`, a character vector of sheet names; for `get_num_sheets_in_(f)ods`, the total number of sheets
#' @details `ods_sheets` will be removed in the next major version. It was kept for backward compatibility. Please use `list_ods_sheet`
#' instead. The default "include_external_data" for `ods_sheets` is TRUE to maintain compatibility with version 1 of readODS.
#' @details The default "include_external_data" for `ods_sheets` is TRUE to maintain compatibility with version 1 of readODS. It will change to `TRUE` in version 3.
#' @author Peter Brohan <peter.brohan+cran@@gmail.com>, Chung-hong Chan <chainsawtiney@@gmail.com>, Gerrit-Jan Schutten <phonixor@@gmail.com>
#' @examples
#' \dontrun{
Expand All @@ -31,6 +30,5 @@ list_fods_sheets <- function(path, include_external_data = FALSE) {
#' @rdname list_ods_sheets
#' @export
ods_sheets <- function(path) {
warning("ods_sheets will be deprecated in the next major version. Use `list_ods_sheets` instead.")
list_ods_sheets(path, include_external_data = TRUE)
}
4 changes: 2 additions & 2 deletions tests/testthat/test_list_sheets.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ test_that("fods works as well", {
c("Sheet1", "Sheet2"))
})

test_that("keep `ods_sheets` #131", {
expect_warning(y <- ods_sheets("../testdata/linkeddata.ods"))
test_that("keep `ods_sheets` #131 #133", {
expect_silent(y <- ods_sheets("../testdata/linkeddata.ods"))
expect_equal(y,
c("Own",
"contains_linked_data",
Expand Down

0 comments on commit 967e10a

Please sign in to comment.