Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tar_progress_branches() #277

Merged
merged 8 commits into from
Jan 21, 2021
Merged

tar_progress_branches() #277

merged 8 commits into from
Jan 21, 2021

Conversation

wlandau
Copy link
Collaborator

@wlandau wlandau commented Jan 21, 2021

Prework

Related GitHub issues and pull requests

Summary

The new tar_progress_branches() function tabulates progress information for patterns. Useful for #273.

library(targets)

tar_script({
  options(crayon.enabled = FALSE)
  list(
    tar_target(x, seq_len(2)),
    tar_target(y, x, pattern = map(x)),
    tar_target(z, stopifnot(y < 1.5), pattern = map(y))
  )
})

tar_make()
#> ● run target x
#> ● run branch y_29239c8a
#> ● run branch y_7cc32924
#> ● run branch z_d0697b30
#> ● run branch z_959da4d3
#> x error branch z_959da4d3
#> Error : y < 1.5 is not TRUE
#> Error: callr subprocess failed: y < 1.5 is not TRUE

tar_progress_branches()
#> # A tibble: 2 x 6
#>   name  branches running built canceled errored
#>   <chr>    <int>   <int> <int>    <int>   <int>
#> 1 y            2       0     2        0       0
#> 2 z            2       0     1        0       1

Created on 2021-01-21 by the reprex package (v0.3.0)

@wlandau wlandau self-assigned this Jan 21, 2021
@wlandau wlandau merged commit 659c63e into main Jan 21, 2021
@wlandau wlandau deleted the tar_progress_branches branch January 21, 2021 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants