Skip to content

Commit

Permalink
desciptions for the rest of static branching factories
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Feb 20, 2024
1 parent 6aaa647 commit ae929b9
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 2 deletions.
5 changes: 3 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# tarchetypes 0.7.12.9000 (development)

# tarchetypes 0.7.12.9001 (development)

* Expose the new `description` argument of `tar_target()` in `targets` 1.5.1.9001.
* `tar_map()` and other static branching target factories now append values to the target descriptions. Use the `descriptions` argument of those functions to customize.

# tarchetypes 0.7.12

Expand Down
2 changes: 2 additions & 0 deletions R/tar_map2.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ tar_map2 <- function(
command2,
values = NULL,
names = NULL,
descriptions = tidyselect::everything(),
group = rep(1L, nrow(as.data.frame(!!.x))),
combine = TRUE,
suffix1 = "1",
Expand Down Expand Up @@ -72,6 +73,7 @@ tar_map2 <- function(
command2 = substitute(command2),
values = values,
names = substitute(names),
descriptions = substitute(descriptions),
group = substitute(group),
combine = combine,
suffix1 = suffix1,
Expand Down
2 changes: 2 additions & 0 deletions R/tar_map2_count.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ tar_map2_count <- function(
command2,
values = NULL,
names = NULL,
descriptions = tidyselect::everything(),
batches = 1L,
combine = TRUE,
suffix1 = "1",
Expand Down Expand Up @@ -77,6 +78,7 @@ tar_map2_count <- function(
command2 = substitute(command2),
values = values,
names = substitute(names),
descriptions = substitute(descriptions),
batches = batches,
combine = combine,
suffix1 = suffix1,
Expand Down
2 changes: 2 additions & 0 deletions R/tar_map2_count_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ tar_map2_count_raw <- function(
command2,
values = NULL,
names = NULL,
descriptions = quote(tidyselect::everything()),
batches = 1L,
combine = TRUE,
suffix1 = "1",
Expand Down Expand Up @@ -94,6 +95,7 @@ tar_map2_count_raw <- function(
command2 = command2,
values = values,
names = names,
descriptions = descriptions,
group = group,
combine = combine,
suffix1 = suffix1,
Expand Down
5 changes: 5 additions & 0 deletions R/tar_map2_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ tar_map2_raw <- function(
command2,
values = NULL,
names = NULL,
descriptions = quote(tidyselect::everything()),
group = quote(rep(1L, nrow(as.data.frame(!!.x)))),
combine = TRUE,
columns1 = quote(tidyselect::everything()),
Expand Down Expand Up @@ -81,6 +82,9 @@ tar_map2_raw <- function(
if (!is.null(names)) {
targets::tar_assert_lang(names)
}
if (!is.null(descriptions)) {
targets::tar_assert_lang(descriptions)
}
if (!is.null(columns1)) {
targets::tar_assert_lang(columns1)
}
Expand Down Expand Up @@ -160,6 +164,7 @@ tar_map2_raw <- function(
target_downstream,
values = values,
names = names,
descriptions = descriptions,
unlist = FALSE
)
)
Expand Down
2 changes: 2 additions & 0 deletions R/tar_map2_size.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ tar_map2_size <- function(
command2,
values = NULL,
names = NULL,
descriptions = tidyselect::everything(),
size = Inf,
combine = TRUE,
suffix1 = "1",
Expand Down Expand Up @@ -77,6 +78,7 @@ tar_map2_size <- function(
command2 = substitute(command2),
values = values,
names = substitute(names),
descriptions = substitute(descriptions),
size = size,
combine = combine,
suffix1 = suffix1,
Expand Down
2 changes: 2 additions & 0 deletions R/tar_map2_size_raw.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ tar_map2_size_raw <- function(
command2,
values = NULL,
names = NULL,
descriptions = quote(tidyselect::everything()),
size = Inf,
combine = TRUE,
suffix1 = "1",
Expand Down Expand Up @@ -94,6 +95,7 @@ tar_map2_size_raw <- function(
command2 = command2,
values = values,
names = names,
descriptions = descriptions,
group = group,
combine = combine,
suffix1 = suffix1,
Expand Down
6 changes: 6 additions & 0 deletions man/tar_map2.Rd

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

6 changes: 6 additions & 0 deletions man/tar_map2_count.Rd

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

6 changes: 6 additions & 0 deletions man/tar_map2_count_raw.Rd

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

6 changes: 6 additions & 0 deletions man/tar_map2_raw.Rd

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

6 changes: 6 additions & 0 deletions man/tar_map2_size.Rd

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

6 changes: 6 additions & 0 deletions man/tar_map2_size_raw.Rd

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

0 comments on commit ae929b9

Please sign in to comment.