Skip to content

Commit 7b45d16

Browse files
committed
use the term 'target definition object'
1 parent 029befe commit 7b45d16

27 files changed

+77
-67
lines changed

R/class_meta.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ meta_class <- R6::R6Class(
117117
},
118118
data_imports = function(envir, pipeline) {
119119
data <- hash_imports(envir)
120-
data[!(data$name %in% pipeline_get_names(pipeline)), , drop = FALSE] # nolint
120+
data[!(data$name %in% pipeline_get_names(pipeline)), , drop = FALSE]
121121
},
122122
record_imports = function(envir, pipeline) {
123123
data <- self$data_imports(envir, pipeline)

R/class_network.R

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ network_class <- R6::R6Class(
8989
}
9090
vertices <- self$vertices
9191
edges <- self$edges
92-
vertices <- vertices[vertices$name %in% self$names, , drop = FALSE] # nolint
93-
edges <- edges[edges$from %in% self$names, , drop = FALSE] # nolint
94-
edges <- edges[edges$to %in% self$names, , drop = FALSE] # nolint
92+
vertices <- vertices[vertices$name %in% self$names, , drop = FALSE]
93+
edges <- edges[edges$from %in% self$names, , drop = FALSE]
94+
edges <- edges[edges$to %in% self$names, , drop = FALSE]
9595
self$vertices <- vertices
9696
self$edges <- edges
9797
},
@@ -102,9 +102,9 @@ network_class <- R6::R6Class(
102102
return()
103103
}
104104
edges <- self$edges
105-
vertices <- vertices[vertices$name %in% allow, , drop = FALSE] # nolint
106-
edges <- edges[edges$from %in% allow, , drop = FALSE] # nolint
107-
edges <- edges[edges$to %in% allow, , drop = FALSE] # nolint
105+
vertices <- vertices[vertices$name %in% allow, , drop = FALSE]
106+
edges <- edges[edges$from %in% allow, , drop = FALSE]
107+
edges <- edges[edges$to %in% allow, , drop = FALSE]
108108
self$vertices <- vertices
109109
self$edges <- edges
110110
},
@@ -115,9 +115,9 @@ network_class <- R6::R6Class(
115115
return()
116116
}
117117
edges <- self$edges
118-
vertices <- vertices[!(vertices$name %in% exclude), , drop = FALSE] # nolint
119-
edges <- edges[!(edges$from %in% exclude), , drop = FALSE] # nolint
120-
edges <- edges[!(edges$to %in% exclude), , drop = FALSE] # nolint
118+
vertices <- vertices[!(vertices$name %in% exclude), , drop = FALSE]
119+
edges <- edges[!(edges$from %in% exclude), , drop = FALSE]
120+
edges <- edges[!(edges$to %in% exclude), , drop = FALSE]
121121
self$vertices <- vertices
122122
self$edges <- edges
123123
},
@@ -128,12 +128,12 @@ network_class <- R6::R6Class(
128128
}
129129
self$update_targets()
130130
vertices <- rbind(self$vertices_targets, self$vertices_imports)
131-
vertices <- vertices[!duplicated(vertices$name), , drop = FALSE] # nolint
132-
vertices <- vertices[order(vertices$name), , drop = FALSE] # nolint
131+
vertices <- vertices[!duplicated(vertices$name), , drop = FALSE]
132+
vertices <- vertices[order(vertices$name), , drop = FALSE]
133133
edges <- rbind(self$edges_imports, self$edges_targets)
134-
edges <- edges[edges$from %in% vertices$name, , drop = FALSE] # nolint
135-
edges <- edges[edges$to %in% vertices$name, , drop = FALSE] # nolint
136-
edges <- edges[order(edges$from), , drop = FALSE] # nolint
134+
edges <- edges[edges$from %in% vertices$name, , drop = FALSE]
135+
edges <- edges[edges$to %in% vertices$name, , drop = FALSE]
136+
edges <- edges[order(edges$from), , drop = FALSE]
137137
self$vertices <- vertices
138138
self$edges <- edges
139139
self$shortcut_vertices()

R/class_pipeline.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ pipeline_targets_init <- function(targets, clone_targets) {
3131
names <- map_chr(targets, ~ target_get_name(.x))
3232
tar_assert_unique_targets(names)
3333
if (clone_targets) {
34-
# If the user has target objects in the global environment,
34+
# If the user has target definition objects in the global environment,
3535
# loading data into them may cause huge data transfers to workers.
36-
# Best to not modify the user's copies of target objects.
36+
# Best to not modify the user's copies of target definition objects.
3737
targets <- map(targets, ~ target_subpipeline_copy(.x, keep_value = FALSE))
3838
}
3939
names(targets) <- names

R/class_target.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ target_run.default <- function(target, envir, path_store, on_worker = FALSE) {}
329329
#' @export
330330
#' @keywords internal
331331
#' @description For internal purposes only. Not a user-side function.
332-
#' @param target A target object.
332+
#' @param target A target definition object.
333333
#' @param envir An environment or the string `"globalenv"`.
334334
#' @param path_store Character of length 1, path to the data store.
335335
#' @param fun Character of length 1, name of the user-side function called

R/tar_bind.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#' @keywords internal
44
#' @description Functions `tar_pipeline()` and [tar_bind()] are deprecated.
55
#' Instead, simply end your target script file
6-
#' (default: `_targets.R`) file with a list of target objects.
6+
#' (default: `_targets.R`) file with a list of target definition objects.
77
#' You can nest these objects however you like.
88
#' @details Deprecated on 2021-01-03.
99
#' @param ... Pipeline objects or nested lists of pipeline objects.

R/tar_definition.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#' `tar_definition()` only exists in order to support third-party interface
1010
#' packages, and even then the returned target definition is not modified..
1111
#' @return If called from a running target, `tar_definition()` returns
12-
#' the target object of the currently running target.
13-
#' See the "Target objects" section for details.
14-
#' @inheritSection tar_target Target objects
12+
#' the target definition object of the currently running target.
13+
#' See the "Target definition objects" section for details.
14+
#' @inheritSection tar_target Target definition objects
1515
#' @param default Environment, value to return if `tar_definition()`
1616
#' is called on its own outside a `targets` pipeline.
1717
#' Having a default lets users run things without [tar_make()],

R/tar_delete.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#' from the cloud if applicable (e.g. AWS, GCP). If `FALSE`,
3131
#' files are not deleted from the cloud.
3232
#' @param batch_size Positive integer between 1 and 1000,
33-
#' number of target objects to delete
33+
#' number of target definition objects to delete
3434
#' from the cloud with each HTTP API request.
3535
#' Currently only supported for AWS.
3636
#' Cannot be more than 1000.

R/tar_destroy.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#' @param destroy Character of length 1, what to destroy. Choices:
3434
#' * `"all"`: entire data store (default: `_targets/`)
3535
#' including cloud data, as well as download/upload scratch files.
36-
#' * `"cloud"`: cloud data, including metadata, target object data
36+
#' * `"cloud"`: cloud data, including metadata, target definition object data
3737
#' from targets with `tar_target(..., repository = "aws")`,
3838
#' and workspace files saved on the cloud.
3939
#' Also deletes temporary staging files in

R/tar_option_unset.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#' [tar_option_set()]. These options are mostly configurable default
66
#' arguments to [tar_target()] and [tar_target_raw()].
77
#' @return `NULL` (invisibly).
8-
#' @param options A character vector of options to reset. Must all be elements of
9-
#' `names(formals(tar_option_set))`
8+
#' @param options A character vector of options to reset.
9+
#' Must all be elements of `names(formals(tar_option_set))`
1010
#' @examples
1111
#' tar_option_get("format") # default format before we set anything
1212
#' tar_target(x, 1)$settings$format

R/tar_pipeline.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#' @keywords internal
44
#' @description Functions `tar_pipeline()` and [tar_bind()] are deprecated.
55
#' Instead, simply end your target script file (default: `_targets.R`)
6-
#' with a list of target objects.
6+
#' with a list of target definition objects.
77
#' You can nest these objects however you like.
88
#' @details Deprecated on 2021-01-03.
99
#' @return A pipeline object.

0 commit comments

Comments
 (0)