Skip to content

Commit

Permalink
Add section on literate programming limitations
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Dec 4, 2023
1 parent 9f3e9ee commit 3f69800
Show file tree
Hide file tree
Showing 17 changed files with 140 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# tarchetypes 0.7.10.9000 (development)

* Use `tar_seed_create()` and `tar_seed_set()` from `targets`.
* Document limitations of literate programming target factories like `tar_render()` (#158).

# tarchetypes 0.7.10

Expand Down
1 change: 1 addition & 0 deletions R/tar_quarto.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#' instead of the working directory of the report.
#' 5. Sets convenient default options such as `deployment = "main"`
#' in the target and `quiet = TRUE` in `quarto::quarto_render()`.
#' @inheritSection tar_render Literate programming limitations
#' @section Quarto troubleshooting:
#' If you encounter difficult errors, please read
#' <https://github.com/quarto-dev/quarto-r/issues/16>.
Expand Down
1 change: 1 addition & 0 deletions R/tar_quarto_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#' without invalidating the target).
#' See the "Target objects" section for background.
#' @inheritSection tar_map Target objects
#' @inheritSection tar_render Literate programming limitations
#' @inheritSection tar_quarto Quarto troubleshooting
#' @inheritParams targets::tar_target_raw
#' @inheritParams quarto::quarto_render
Expand Down
1 change: 1 addition & 0 deletions R/tar_quarto_rep.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#' See the "Target objects" section for background.
#' @inheritSection tar_map Target objects
#' @inheritSection tar_rep Replicate-specific seeds
#' @inheritSection tar_render Literate programming limitations
#' @inheritSection tar_quarto Quarto troubleshooting
#' @inheritParams tar_rep
#' @inheritParams targets::tar_target
Expand Down
1 change: 1 addition & 0 deletions R/tar_quarto_rep_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#' See the "Target objects" section for background.
#' @inheritSection tar_map Target objects
#' @inheritSection tar_rep Replicate-specific seeds
#' @inheritSection tar_render Literate programming limitations
#' @inheritSection tar_quarto Quarto troubleshooting
#' @inheritParams tar_rep
#' @inheritParams quarto::quarto_render
Expand Down
12 changes: 12 additions & 0 deletions R/tar_render.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@
#' instead of the working directory of the report.
#' 5. Sets convenient default options such as `deployment = "main"`
#' in the target and `quiet = TRUE` in `rmarkdown::render()`.
#' @section Literate programming limitations:
#' Literate programming files are messy and variable,
#' so functions like [tar_render()] have limitations:
#' * Child documents are not tracked for changes.
#' * Upstream target dependencies are not detected if [tar_read()]
#' and/or [tar_load()] are called from a user-defined function.
#' In addition, single target names must be mentioned and they must
#' be symbols. `tar_load("x")` and `tar_load(contains("x"))` may not
#' detect target `x`.
#' * Special/optional input/output files may not be detected in all cases.
#' * [tar_render()] and friends are for local files only. They do not
#' integrate with the cloud storage capabilities of `targets`.
#' @return A target object with `format = "file"`.
#' When this target runs, it returns a character vector
#' of file paths: the rendered document, the source file,
Expand Down
1 change: 1 addition & 0 deletions R/tar_render_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#' without invalidating the target).
#' See the "Target objects" section for background.
#' @inheritSection tar_map Target objects
#' @inheritSection tar_render Literate programming limitations
#' @inheritParams tar_render
#' @param name Character of length 1, name of the target.
#' @param render_arguments Optional language object with a list
Expand Down
1 change: 1 addition & 0 deletions R/tar_render_rep.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#' See the "Target objects" section for background.
#' @inheritSection tar_map Target objects
#' @inheritSection tar_rep Replicate-specific seeds
#' @inheritSection tar_render Literate programming limitations
#' @inheritParams tar_rep
#' @inheritParams targets::tar_target
#' @inheritParams rmarkdown::render
Expand Down
1 change: 1 addition & 0 deletions R/tar_render_rep_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#' See the "Target objects" section for background.
#' @inheritSection tar_map Target objects
#' @inheritSection tar_rep Replicate-specific seeds
#' @inheritSection tar_render Literate programming limitations
#' @inheritParams targets::tar_target
#' @inheritParams rmarkdown::render
#' @inheritParams tar_rep
Expand Down
15 changes: 15 additions & 0 deletions man/tar_quarto.Rd

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

15 changes: 15 additions & 0 deletions man/tar_quarto_raw.Rd

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

15 changes: 15 additions & 0 deletions man/tar_quarto_rep.Rd

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

15 changes: 15 additions & 0 deletions man/tar_quarto_rep_raw.Rd

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

15 changes: 15 additions & 0 deletions man/tar_render.Rd

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

15 changes: 15 additions & 0 deletions man/tar_render_raw.Rd

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

15 changes: 15 additions & 0 deletions man/tar_render_rep.Rd

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

15 changes: 15 additions & 0 deletions man/tar_render_rep_raw.Rd

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

0 comments on commit 3f69800

Please sign in to comment.