vt_scrape_requirement_editors | R Documentation |
These functions provide utitilies to scrape the editor and editDate roxygen tags and put them into a nice data.frame for use in the validation reports. In addition, opinionated kable formatting functions are provided as well to facilitate nice printing in the reports.
vt_scrape_requirement_editors(
tags = c("editor", "editDate"),
src = ".",
ref = vt_path(),
dynamic_ref = NULL
)
vt_scrape_test_case_editors(
tags = c("editor", "editDate"),
src = ".",
ref = vt_path(),
dynamic_ref = NULL
)
vt_scrape_test_code_editors(
tags = c("editor", "editDate", "deprecate"),
src = ".",
ref = vt_path(),
dynamic_ref = NULL
)
vt_scrape_function_editors(
tags = c("editor", "editDate", "export"),
src = ".",
ref = vt_path()
)
vt_kable_requirement_editors(x, format = vt_render_to())
vt_kable_function_editors(x, format = vt_render_to())
vt_kable_test_case_editors(x, format = vt_render_to())
vt_kable_test_code_editors(x, format = vt_render_to())
tags |
which tags to keep. defaults to editor and editDate |
src |
path to package sources. defaults to current directory and passed to |
ref |
reference path to whre validation documentation lives. defaults
to |
dynamic_ref |
dynamic referencer object |
x |
data.frame as exported from vt_scrape_* |
format |
passed to |
data.frame containing the results of the scraped roxygen tags for each section
knitr_kable object
vt_scrape_functions Requires access to raw R/ or function documentation parsed via valtools into validation/ folder. Cannot pull information from installed R/ location.
withr::with_tempdir({
captured_output <- capture.output({vt_create_package(open = FALSE)})
vt_use_req(
name = "req1",
username = "B user",
title = "Requirement 1",
open = FALSE)
writeLines(c(
"#' @title Say Hello",
"#' @editor B User",
"#' @editDate 2021-04-27",
"#' @export",
"hello <- function(){print(\"Hello\")}"
), con = "R/hello.R")
vt_use_test_case(
name = "testcase1",
username = "B user",
title = "TesT Case 1",
open = FALSE)
vt_use_test_code(
name = "testcode1",
username = "C user",
open = FALSE)
req_editors <- vt_scrape_requirement_editors()
vt_kable_requirement_editors(req_editors)
fun_editors <- vt_scrape_function_editors()
vt_kable_function_editors(fun_editors)
t_case_editors <- vt_scrape_test_case_editors()
vt_kable_test_case_editors(t_case_editors)
t_code_editors <- vt_scrape_test_code_editors()
vt_kable_test_code_editors(t_code_editors)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.