Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Dec 30, 2024
1 parent 578873f commit 8acec83
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 11 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ Imports:
googlesheets4,
spelling,
tidyr,
quarto
quarto,
R.utils,
withr
Suggests:
testthat,
tibble
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export(pptx_slide_note_df)
export(pptx_slide_text_df)
export(qrmd_files)
export(render_without_toc)
export(set_knitr_image_path)
export(setup_ottr_template)
export(test_url)
export(unzip_pptx)
Expand All @@ -73,11 +74,13 @@ importFrom(rvest,html_attr)
importFrom(rvest,html_nodes)
importFrom(rvest,read_html)
importFrom(spelling,spell_check_files)
importFrom(stats,na.omit)
importFrom(stringr,str_to_title)
importFrom(tidyr,separate)
importFrom(tidyr,unnest)
importFrom(utils,browseURL)
importFrom(utils,download.file)
importFrom(utils,head)
importFrom(utils,installed.packages)
importFrom(utils,menu)
importFrom(utils,unzip)
Expand Down
3 changes: 3 additions & 0 deletions R/url_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ test_url <- function(url, ignore_urls = "") {
#' @importFrom magrittr %>%
#' @importFrom rvest html_nodes read_html html_attr
#' @import stringr
#' @importFrom stats na.omit
#' @importFrom utils head
#'
#'
#' @examples
#'
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set_knitr_image_path <- function() {
utils::globalVariables(c(
"num", "quiz_dir", "type_url", "file_name", "trimmed", "quiz",
"quiz_path", "type", "q_num", "verbose", "chapt_title", "data_path", "image_dir",
"convert_footnotes", "rmd_files", "root_dir"
"convert_footnotes", "rmd_files", "root_dir", "found", "urls_status"
))

#' Find root of OTTR course provided
Expand Down
14 changes: 14 additions & 0 deletions man/set_knitr_image_path.Rd

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

18 changes: 9 additions & 9 deletions tests/testthat/test-rendering.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ test_that("Rmd Rendering", {
testthat::expect_true(!dir.exists(rmd_dir))
})

test_that("Quarto Rendering", {
quarto_dir <- setup_ottr_template(dir = ".", type = "quarto")
test_that("Rmd Website Rendering", {
rmd_web_dir <- setup_ottr_template(dir = ".", type = "rmd_website")

testthat::expect_true(dir.exists(quarto_dir))
testthat::expect_true(dir.exists(rmd_web_dir))

clean_up()

testthat::expect_true(!dir.exists(quarto_dir))
testthat::expect_true(!dir.exists(rmd_web_dir))
})

test_that("Rmd Website Rendering", {
rmd_web_dir <- setup_ottr_template(dir = ".", type = "rmd_website")

testthat::expect_true(dir.exists(rmd_web_dir))
test_that("Quarto Rendering", {
quarto_dir <- setup_ottr_template(dir = ".", type = "quarto")

testthat::expect_true(dir.exists(quarto_dir))

clean_up()

testthat::expect_true(!dir.exists(rmd_web_dir))
testthat::expect_true(!dir.exists(quarto_dir))
})


test_that("Quarto Website Rendering", {
quarto_web_dir <- setup_ottr_template(dir = ".", type = "quarto_website")

Expand Down

0 comments on commit 8acec83

Please sign in to comment.