Skip to content

Commit

Permalink
[skip vbump] upversion to 0.4.0 (#300)
Browse files Browse the repository at this point in the history
Related to #296 

* Update NEWS 
* Update DESCRIPTION and upversion rtables.office and rtables to
released version
  • Loading branch information
donyunardi authored Jan 24, 2025
1 parent c678ca2 commit 4930f11
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 48 deletions.
4 changes: 1 addition & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: teal.reporter
Title: Reporting Tools for 'shiny' Modules
Version: 0.3.1.9024
Version: 0.4.0
Date: 2025-01-22
Authors@R: c(
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre"),
Expand Down Expand Up @@ -54,8 +54,6 @@ VignetteBuilder:
rmarkdown
RdMacros:
lifecycle
Remotes:
insightsengineering/rtables.officer
Config/Needs/verdepcheck: rstudio/bslib, mllg/checkmate,
davidgohel/flextable, rstudio/htmltools, yihui/knitr, r-lib/lifecycle,
r-lib/R6, insightsengineering/rlistings, rstudio/rmarkdown,
Expand Down
7 changes: 4 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# teal.reporter 0.3.1.9024
# teal.reporter 0.4.0

### Enhancements

* Report cards are now included in bookmarks. When using the `shiny` bookmarking mechanism, present report cards will be available in the restored application.
* Report can be loaded back now. The zip file with the report can be loaded back which will restore Previewer state.
* Reports can now be reloaded. A zip file containing the report can be uploaded to restore the state of the Previewer.
* Report cards are now included in bookmarks. When using the `shiny` bookmarking mechanism, existing report cards will be available in the restored application.
* HTML content can now be added to the report.

# teal.reporter 0.3.1

Expand Down
33 changes: 15 additions & 18 deletions R/Renderer.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,40 +44,38 @@ Renderer <- R6::R6Class( # nolint: object_name_linter.
#' library(ggplot2)
#'
#' ReportCard <- getFromNamespace("ReportCard", "teal.reporter")
#' card1 <- ReportCard$new()
#' Reporter <- getFromNamespace("Reporter", "teal.reporter")
#' yaml_quoted <- getFromNamespace("yaml_quoted", "teal.reporter")
#' md_header <- getFromNamespace("md_header", "teal.reporter")
#' Renderer <- getFromNamespace("Renderer", "teal.reporter")
#'
#' card1 <- ReportCard$new()
#' card1$append_text("Header 2 text", "header2")
#' card1$append_text("A paragraph of default text")
#' card1$append_plot(
#' ggplot(iris, aes(x = Petal.Length)) + geom_histogram()
#' )
#'
#' ReportCard <- getFromNamespace("ReportCard", "teal.reporter")
#' card2 <- ReportCard$new()
#'
#' card2$append_text("Header 2 text", "header2")
#' card2$append_text("A paragraph of default text")
#' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
#' table_res2 <- build_table(lyt, airquality)
#' card2$append_table(table_res2)
#' card2$append_table(iris)
#' card2$append_rcode("2+2", echo = FALSE)
#'
#' Reporter <- getFromNamespace("Reporter", "teal.reporter")
#' reporter <- Reporter$new()
#' reporter$append_cards(list(card1, card2))
#'
#' yaml_quoted <- getFromNamespace("yaml_quoted", "teal.reporter")
#' yaml_l <- list(
#' author = yaml_quoted("NEST"),
#' title = yaml_quoted("Report"),
#' date = yaml_quoted("07/04/2019"),
#' output = list(html_document = list(toc = FALSE))
#' )
#'
#' md_header <- getFromNamespace("md_header", "teal.reporter")
#' yaml_header <- md_header(as.yaml(yaml_l))
#' Renderer <- getFromNamespace("Renderer", "teal.reporter")
#'
#' result_path <- Renderer$new()$renderRmd(reporter$get_blocks(), yaml_header)
#'
renderRmd = function(blocks, yaml_header, global_knitr = getOption("teal.reporter.global_knitr")) {
Expand Down Expand Up @@ -148,39 +146,38 @@ Renderer <- R6::R6Class( # nolint: object_name_linter.
#' library(ggplot2)
#'
#' ReportCard <- getFromNamespace("ReportCard", "teal.reporter")
#' card1 <- ReportCard$new()
#' Reporter <- getFromNamespace("Reporter", "teal.reporter")
#' yaml_quoted <- getFromNamespace("yaml_quoted", "teal.reporter")
#' md_header <- getFromNamespace("md_header", "teal.reporter")
#' Renderer <- getFromNamespace("Renderer", "teal.reporter")
#'
#' card1 <- ReportCard$new()
#' card1$append_text("Header 2 text", "header2")
#' card1$append_text("A paragraph of default text")
#' card1$append_plot(
#' ggplot(iris, aes(x = Petal.Length)) + geom_histogram()
#' )
#'
#' ReportCard <- getFromNamespace("ReportCard", "teal.reporter")
#' card2 <- ReportCard$new()
#'
#' card2$append_text("Header 2 text", "header2")
#' card2$append_text("A paragraph of default text")
#' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
#' table_res2 <- build_table(lyt, airquality)
#' card2$append_table(table_res2)
#' card2$append_table(iris)
#' card2$append_rcode("2+2", echo = FALSE)
#' Reporter <- getFromNamespace("Reporter", "teal.reporter")$new()
#' Reporter$append_cards(list(card1, card2))
#'
#' yaml_quoted <- getFromNamespace("yaml_quoted", "teal.reporter")
#' reporter <- Reporter$new()
#' reporter$append_cards(list(card1, card2))
#'
#' yaml_l <- list(
#' author = yaml_quoted("NEST"),
#' title = yaml_quoted("Report"),
#' date = yaml_quoted("07/04/2019"),
#' output = list(html_document = list(toc = FALSE))
#' )
#'
#' md_header <- getFromNamespace("md_header", "teal.reporter")
#' yaml_header <- md_header(as.yaml(yaml_l))
#' Renderer <- getFromNamespace("Renderer", "teal.reporter")
#' result_path <- Renderer$new()$render(Reporter$get_blocks(), yaml_header)
#' result_path <- Renderer$new()$render(reporter$get_blocks(), yaml_header)
#'
render = function(blocks, yaml_header, global_knitr = getOption("teal.reporter.global_knitr"), ...) {
args <- list(...)
Expand Down
3 changes: 0 additions & 3 deletions R/Reporter.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
#' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
#' table_res2 <- build_table(lyt, airquality)
#' card2$append_table(table_res2)
#' card2$append_table(iris)
#'
#' reporter <- Reporter$new()
#' reporter$append_cards(list(card1, card2))
Expand Down Expand Up @@ -76,7 +75,6 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
#' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
#' table_res2 <- build_table(lyt, airquality)
#' card2$append_table(table_res2)
#' card2$append_table(iris)
#'
#' reporter <- Reporter$new()
#' reporter$append_cards(list(card1, card2))
Expand Down Expand Up @@ -108,7 +106,6 @@ Reporter <- R6::R6Class( # nolint: object_name_linter.
#' lyt <- analyze(split_rows_by(basic_table(), "Day"), "Ozone", afun = mean)
#' table_res2 <- build_table(lyt, airquality)
#' card2$append_table(table_res2)
#' card2$append_table(iris)
#'
#' reporter <- Reporter$new()
#' reporter$append_cards(list(card1, card2))
Expand Down
33 changes: 15 additions & 18 deletions man/Renderer.Rd

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

3 changes: 0 additions & 3 deletions man/Reporter.Rd

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

0 comments on commit 4930f11

Please sign in to comment.