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
Add an option to always build some selected targets (add an "always" trigger) #166
Comments
Fixed. For a complete demo on triggers, see this section of the "debug" vignette. Here is a demo of the load_basic_example()
make(my_plan, verbose = FALSE) # Make everything up to date.
make(my_plan) # Nothing is rebuilt because everything is already up to date.
## ...
## All targets are already up to date.
# Use the "always" trigger for one of the targets
my_plan$trigger <- "any"
my_plan$trigger[2] <- "always"
make(my_plan)
## ...
## target small: trigger "always"
## ...
## Used non-default triggers. Some targets may be not be up to date.
# The "small" target is already up to date, but it is rebuilt every time.
make(my_plan)
## ...
## target small: trigger "always"
## ...
## Used non-default triggers. Some targets may be not be up to date. By the way: the |
It just occurred to me: this feature does not directly cover @RemkoDuursma's point about flexible check rules: for example, defining custom functions like drake::triggers()
## [1] "always" "any" "command" "depends" "file" "missing" However, in load_basic_example()
my_plan$trigger <- default_trigger()
if (is_it_tuesday()){
my_plan$trigger[2] <- "always"
}
# Always build the target 'my_plan$target[2]' if it is Tuesday.
# Revert to the default behavior on all other days.
make(my_plan) So |
Related: #166 0: nothing 1: targets and checks 2: +missing 3: +imports
Related: #131, richfitz/remake#95
The text was updated successfully, but these errors were encountered: