Skip to content

Commit

Permalink
Change internal env var name
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Jan 18, 2021
1 parent 5f63f9a commit 7d8c7b8
Show file tree
Hide file tree
Showing 35 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion R/tar_branches.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' (including the branched-over targets and the target with the pattern.)
#' @inheritParams tar_target
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(
#' list(
Expand Down
2 changes: 1 addition & 1 deletion R/tar_cancel.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' cannot interrupt a target from another process.
#' @param condition Logical of length 1, whether to cancel the target.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(tar_target(x, tar_cancel(1 > 0)))
#' tar_make() # Should cancel target x.
Expand Down
2 changes: 1 addition & 1 deletion R/tar_deduplicate.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @param progress Logical, whether to deduplicate the progress database file
#' at `_targets/meta/progress`.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(list(tar_target(x, 1 + 1)))
#' tar_make()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_delete.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' You can supply symbols, a character vector,
#' or `tidyselect` helpers like [starts_with()].
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(
#' list(
Expand Down
2 changes: 1 addition & 1 deletion R/tar_destroy.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' if `error = "workspace"` in [tar_option_set()] or [tar_target()].
#' Load a workspace with [tar_workspace()].
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(list(tar_target(x, 1 + 1)))
#' tar_make() # Creates the _targets/ data store.
Expand Down
2 changes: 1 addition & 1 deletion R/tar_envir.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' @examples
#' tar_envir()
#' tar_envir(default = new.env(parent = emptyenv()))
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(tar_target(x, tar_envir(default = parent.frame())))
#' tar_make(x)
Expand Down
2 changes: 1 addition & 1 deletion R/tar_glimpse.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#' the `levelSeparation` argument of `visHierarchicalLayout()`
#' defaults to `150`.
#' @examples
#' if (identical(Sys.getenv("TARGETS_INTERACTIVE_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_INTERACTIVE_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' tar_option_set()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_group.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' `targets` will use to find subsets of your data frame.
#' @param x Grouped data frame from `dplyr::group_by()`
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' # The tar_group() function simply creates
#' # a tar_group column to partition the rows
#' # of a data frame.
Expand Down
2 changes: 1 addition & 1 deletion R/tar_invalidate.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' You can supply symbols, a character vector,
#' or `tidyselect` helpers like [starts_with()].
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(
#' list(
Expand Down
4 changes: 2 additions & 2 deletions R/tar_load.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' check/build all the targets (default). Otherwise, you can supply
#' symbols, a character vector, or `tidyselect` helpers like [starts_with()].
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(
#' list(
Expand Down Expand Up @@ -46,7 +46,7 @@ tar_load <- function(
#' for any targets that are patterns.
#' @param envir Environment to put the loaded targets.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(
#' list(
Expand Down
2 changes: 1 addition & 1 deletion R/tar_make_clustermq.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#' and `clustermq::workers()`.
#' @examples
#' if (!identical(tolower(Sys.info()[["sysname"]]), "windows")) {
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' options(clustermq.scheduler = "multicore") # Does not work on Windows.
Expand Down
2 changes: 1 addition & 1 deletion R/tar_make_future.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' @param workers Positive integer, maximum number of transient
#' `future` workers allowed to run at any given time.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' future::plan(future::multisession)
Expand Down
2 changes: 1 addition & 1 deletion R/tar_manifest.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#' * `packages`: List columns of packages loaded before building the target.
#' * `library`: List column of library paths to load the packages.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' tar_option_set()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_meta.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#' from the last run of the target.
#' * `error`: character string of the error message if the target errored.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(
#' list(
Expand Down
2 changes: 1 addition & 1 deletion R/tar_name.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' @examples
#' tar_name()
#' tar_name(default = "custom_target_name")
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(tar_target(x, tar_name()))
#' tar_make()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_network.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' @param targets_only Logical, whether to restrict the output to just targets
#' (`FALSE`) or to also include imported global functions and objects.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' tar_option_set()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_objects.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @description List targets currently saved to `_targets/objects/`.
#' Does not include dynamic files or cloud storage.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' tar_option_set(workspace = "x")
Expand Down
2 changes: 1 addition & 1 deletion R/tar_option_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#' tar_target(x, 1)$settings$format
#' tar_option_reset() # reset the format
#' tar_target(x, 1)$settings$format
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' tar_option_set(cue = tar_cue(mode = "always")) # All targets always run.
Expand Down
2 changes: 1 addition & 1 deletion R/tar_option_reset.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' tar_target(x, 1)$settings$format
#' tar_option_reset() # reset all options
#' tar_target(x, 1)$settings$format
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' tar_option_set(cue = tar_cue(mode = "always"))
Expand Down
2 changes: 1 addition & 1 deletion R/tar_option_set.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#' tar_target(x, 1)$settings$format
#' tar_option_reset() # reset the format
#' tar_target(x, 1)$settings$format
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' tar_option_set(cue = tar_cue(mode = "always")) # All targets always run.
Expand Down
2 changes: 1 addition & 1 deletion R/tar_outdated.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' targets found so far.
#' @inheritParams tar_validate
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(list(tar_target(x, 1 + 1)))
#' tar_outdated()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' @examples
#' tar_path()
#' tar_path(your_target)
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(tar_target(returns_path, tar_path()))
#' tar_make()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_progress.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' You can supply symbols, a character vector,
#' or `tidyselect` helpers like [starts_with()].
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(
#' list(
Expand Down
2 changes: 1 addition & 1 deletion R/tar_prune.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' the value is invisibly returned.
#' @inheritParams tar_validate
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(
#' list(
Expand Down
2 changes: 1 addition & 1 deletion R/tar_read.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ tar_read <- function(name, branches = NULL, meta = tar_meta()) {
#' However, if you call [tar_meta()] beforehand and supply it to the `meta`
#' argument, then successive calls to `tar_read()` may run much faster.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(list(tar_target(x, 1 + 1)))
#' tar_make()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_seed.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' @examples
#' tar_seed()
#' tar_seed(default = 123L)
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(tar_target(returns_seed, tar_seed()))
#' tar_make()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_sitrep.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#' Always `NA` if the `record` cue is activated.
#' Otherwise, always `FALSE` if the `file` cue is suppressed.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(
#' list(
Expand Down
2 changes: 1 addition & 1 deletion R/tar_target.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
#' print(data)
#' tar_option_reset()
#' # In a pipeline:
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(tar_target(x, 1 + 1))
#' tar_make()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_target_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#' })
#' print(target_list[[1]])
#' print(target_list[[2]])
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(tar_target_raw("x", quote(1 + 1)))
#' tar_make()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_traceback.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' should either be the global environment or inherit from the
#' global environment.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tmp <- sample(1)
#' tar_script({
Expand Down
2 changes: 1 addition & 1 deletion R/tar_validate.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' reproducible work.
#' @param callr_arguments A list of arguments to `callr_function`.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script(list(tar_target(x, 1 + 1)))
#' tar_validate()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_visnetwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' at once, e.g. `label = c("time", "branches")`. All are disabled
#' by default because they clutter the graph.
#' @examples
#' if (identical(Sys.getenv("TARGETS_INTERACTIVE_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_INTERACTIVE_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' tar_option_set()
Expand Down
2 changes: 1 addition & 1 deletion R/tar_watch.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#' @param verbose whether to print a spinner and informative messages.
#' Only relevant if `background` is `TRUE`.
#' @examples
#' if (identical(Sys.getenv("TARGETS_INTERACTIVE_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_INTERACTIVE_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' sleep_run <- function(...) {
Expand Down
2 changes: 1 addition & 1 deletion R/tar_workspace.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' should either be the global environment or inherit from the
#' global environment.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tmp <- sample(1)
#' tar_script({
Expand Down
2 changes: 1 addition & 1 deletion R/tar_workspaces.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @description List target workspaces currently saved to
#' `_targets/workspaces/`. See [tar_workspace()] for more information.
#' @examples
#' if (identical(Sys.getenv("TARGETS_LONG_EXAMPLES"), "true")) {
#' if (identical(Sys.getenv("TAR_LONG_EXAMPLES"), "true")) {
#' tar_dir({ # Write all files to a temporary directory.
#' tar_script({
#' tar_option_set(error = "workspace")
Expand Down

0 comments on commit 7d8c7b8

Please sign in to comment.