Skip to content

Commit 348a7b1

Browse files
[skip vbump] Release v0.6.0 (#448)
# Pull Request Fixes #416 Some minor adjustments to: - Version numbers used on deprecation messages. - Examples to keep examples in line with CRAN rules: (<5s) - URL updates to point to existing pages --------- Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
1 parent 835f2eb commit 348a7b1

File tree

11 files changed

+25
-116
lines changed

11 files changed

+25
-116
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ SECURITY.md
4747
^.revdeprefs\.yaml$
4848
^revdep$
4949
^\.covrignore$
50+
.lock$

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: teal.reporter
22
Title: Reporting Tools for 'shiny' Modules
3-
Version: 0.5.0.9031
3+
Version: 0.6.0
44
Date: 2025-11-14
55
Authors@R: c(
66
person("Dawid", "Kaledkowski", , "dawid.kaledkowski@roche.com", role = c("aut", "cre"),

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# teal.reporter 0.5.0.9031
1+
# teal.reporter 0.6.0
22

33
### New features
44

R/ReportCard.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ReportCard <- R6::R6Class( # nolint: object_name_linter.
2424
#'
2525
initialize = function() {
2626
lifecycle::deprecate_warn(
27-
when = "0.5.1",
27+
when = "0.6.0",
2828
what = "ReportCard$new()",
2929
with = "teal_card()",
3030
details = "Use teal_report class instead. See vignette('teal-report-class', 'teal.reporter') for more information." # nolint: line_length_linter.
@@ -201,7 +201,7 @@ ReportCard <- R6::R6Class( # nolint: object_name_linter.
201201
#'
202202
to_list = function(output_dir = lifecycle::deprecated()) {
203203
if (lifecycle::is_present(output_dir)) {
204-
lifecycle::deprecate_soft("0.5.0.9000", "ReportCard$to_list(output_dir)")
204+
lifecycle::deprecate_soft("0.6.0", "ReportCard$to_list(output_dir)")
205205
}
206206
unclass(private$content)
207207
},
@@ -222,7 +222,7 @@ ReportCard <- R6::R6Class( # nolint: object_name_linter.
222222
#'
223223
from_list = function(card, output_dir = lifecycle::deprecated()) {
224224
if (lifecycle::is_present(output_dir)) {
225-
lifecycle::deprecate_soft("0.5.0.9000", "ReportCard$to_list(output_dir)")
225+
lifecycle::deprecate_soft("0.6.0", "ReportCard$to_list(output_dir)")
226226
}
227227
self$reset()
228228
private$content <- as.teal_card(card)

R/Reporter.R

Lines changed: 6 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,9 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
6969
#' be set in this order.
7070
#' @description Reorders `teal_card` objects in `Reporter`.
7171
#' @return `self`, invisibly.
72-
#' @examplesIf require("ggplot2")
73-
#' library(ggplot2)
72+
#' @examplesIf require("ggplot2") && require("rtables")
7473
#' library(rtables)
75-
#'
76-
#' card1 <- teal_card("## Header 2 text", "A paragraph of default text")
77-
#' card1 <- c(card1, ggplot(iris, aes(x = Petal.Length)) + geom_histogram())
78-
#' metadata(card1, "title") <- "Card1"
79-
#'
74+
#' # With the card1 from above
8075
#' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
8176
#' table_res2 <- build_table(lyt, airquality)
8277
#' card2 <- teal_card(
@@ -101,24 +96,7 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
10196
#' @param card The new object (`ReportCard` or `teal_card`) to replace the existing one.
10297
#' @return `self`, invisibly.
10398
#' @examplesIf require("ggplot2")
104-
#' library(ggplot2)
105-
#' library(rtables)
106-
#'
107-
#' card1 <- teal_card("## Header 2 text", "A paragraph of default text")
108-
#' card1 <- c(card1, ggplot(iris, aes(x = Petal.Length)) + geom_histogram())
109-
#' metadata(card1, "title") <- "Card1"
110-
#'
111-
#' reporter <- Reporter$new()
112-
#' reporter$append_cards(list(card1))
113-
#'
114-
#' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
115-
#' table_res2 <- build_table(lyt, airquality)
116-
#' card2 <- teal_card(
117-
#' "## Header 2 text",
118-
#' "A paragraph of default text",
119-
#' table_res2
120-
#' )
121-
#' metadata(card2, "title") <- "Card2"
99+
#' # With card1 and card2 from above
122100
#'
123101
#' metadata(reporter$get_cards()[[1]], "title")
124102
#' reporter$replace_card(card2, names(reporter$get_cards())[[1]])
@@ -134,19 +112,7 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
134112
#' @description Retrieves all `teal_card` objects contained in `Reporter`.
135113
#' @return A (`list`) of [`teal_card`] objects.
136114
#' @examplesIf require("ggplot2")
137-
#' library(ggplot2)
138-
#' library(rtables)
139-
#'
140-
#' card1 <- teal_card("## Header 2 text", "A paragraph of default text")
141-
#' card1 <- c(card1, ggplot(iris, aes(x = Petal.Length)) + geom_histogram())
142-
#'
143-
#' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
144-
#' table_res2 <- build_table(lyt, airquality)
145-
#' card2 <- teal_card(
146-
#' "## Header 2 text",
147-
#' "A paragraph of default text",
148-
#' table_res2
149-
#' )
115+
#' # With card1 and card2 from above
150116
#'
151117
#' reporter <- Reporter$new()
152118
#' reporter$append_cards(list(card1, card2))
@@ -167,19 +133,7 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
167133
#' Default is a `\n\\newpage\n` markdown.
168134
#' @return `list()` of `teal_card`
169135
#' @examplesIf require("ggplot2")
170-
#' library(ggplot2)
171-
#' library(rtables)
172-
#'
173-
#' card1 <- teal_card("## Header 2 text", "A paragraph of default text")
174-
#' card1 <- c(card1, ggplot(iris, aes(x = Petal.Length)) + geom_histogram())
175-
#'
176-
#' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
177-
#' table_res2 <- build_table(lyt, airquality)
178-
#' card2 <- teal_card(
179-
#' "## Header 2 text",
180-
#' "A paragraph of default text",
181-
#' table_res2
182-
#' )
136+
#' # With card1 and card2 from above
183137
#'
184138
#' reporter <- Reporter$new()
185139
#' reporter$append_cards(list(card1, card2))
@@ -261,7 +215,7 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
261215
#' reporter <- Reporter$new()
262216
#' reporter$from_reporter(reporter)
263217
from_reporter = function(reporter) {
264-
lifecycle::deprecate_warn("0.5.0.9000", "Reporter$from_reporter()")
218+
lifecycle::deprecate_warn("0.6.0", "Reporter$from_reporter()")
265219
checkmate::assert_class(reporter, "Reporter")
266220
self$reset()
267221
self$append_cards(reporter$get_cards())

R/previewer_deprecated.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ NULL
3737
reporter_previewer_ui <- function(id) {
3838
ns <- shiny::NS(id)
3939
lifecycle::deprecate_soft(
40-
when = "0.5.0",
40+
when = "0.6.0",
4141
what = "reporter_previewer_ui()",
4242
details = paste(
4343
"Calling `reporter_previewer_ui()` is deprecated and will be removed in the next release.\n",
@@ -80,7 +80,7 @@ reporter_previewer_srv <- function(id,
8080
rmd_yaml_args = getOption("teal.reporter.rmd_yaml_args"),
8181
previewer_buttons = c("download", "load", "reset")) {
8282
lifecycle::deprecate_soft(
83-
when = "0.5.0",
83+
when = "0.6.0",
8484
what = "reporter_previewer_srv()",
8585
details = paste(
8686
"Calling `reporter_previewer_srv()` is deprecated and will be removed in the next release.\n",

R/to_rmd.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
#' @examples
7171
#' to_rmd(c("## This is a simple text block.", "", "With a paragraph break."))
7272
#' to_rmd(code_chunk("summary(cars)"))
73-
#' to_rmd(data.frame(x = 1:10, y = 21:30))
73+
#' to_rmd(data.frame(x = 1:10, y = 21:30), folder_path = tempdir())
7474
#' @examplesIf requireNamespace("ggplot2", quietly = TRUE)
7575
#'
7676
#' # Example with ggplot2 will create a temporary RDS file in the tempdir()

man/Reporter.Rd

Lines changed: 5 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/to_rmd.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-render.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
with_temp_wd <- function() {
2-
new_dir <- tempfile()
2+
new_dir <- normalizePath(tempfile(), winslash = "/", mustWork = FALSE)
33
dir.create(new_dir, recursive = TRUE)
44
old_dir <- setwd(new_dir)
55
withr::defer(setwd(old_dir), envir = parent.frame(2))
@@ -59,7 +59,7 @@ testthat::describe("render() outputs report.Rmd with", {
5959
withr::local_options(teal.reporter.global_knitr = list())
6060
it("output_dir set to other location then working directory", {
6161
tr <- teal_report()
62-
temp_dir <- tempfile()
62+
temp_dir <- normalizePath(tempfile(), winslash = "/", mustWork = FALSE)
6363
teal.reporter::render(tr, output_dir = temp_dir, quiet = TRUE)
6464
testthat::expect_true(file.exists(file.path(temp_dir, "report.Rmd")))
6565
})
@@ -207,7 +207,7 @@ testthat::describe("render() renders output based on metadata$output field:", {
207207
})
208208

209209
it("- md_document containing relative path to a plot even if output_dir is set to absolute path", {
210-
temp_dir <- tempfile()
210+
temp_dir <- normalizePath(tempfile(), winslash = "/", mustWork = FALSE)
211211
tr <- teal_report()
212212
tr <- within(tr, plot(1:10))
213213
metadata(teal_card(tr)) <- list(output = "md_document")

0 commit comments

Comments
 (0)