-
Notifications
You must be signed in to change notification settings - Fork 128
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
Documentation of strings_in_dots warning is unclear #758
Comments
TL;DRSorry about the confusion, @MilesMcBain. Your first usage of library(drake)
packageVersion("drake")
#> [1] '6.2.1.9005'
drake_plan(
output_db = write_db(x, file_out("demand_forecast.db"))
)
#> # A tibble: 1 x 2
#> target command
#> <chr> <expr>
#> 1 output_db write_db(x, file_out("demand_forecast.db")) Created on 2019-02-28 by the reprex package (v0.2.1) But in the current CRAN version (<= 6.2.1), to fully utilize the most current file API (
library(drake)
packageVersion("drake")
#> [1] '6.2.1'
drake_plan(
output_db = write_db(x, file_out("demand_forecast.db")),
strings_in_dots = "literals"
)
#> # A tibble: 1 x 2
#> target command
#> <chr> <chr>
#> 1 output_db "write_db(x, file_out(\"demand_forecast.db\"))" Created on 2019-02-28 by the reprex package (v0.2.1) This odd requirement has to do with the process of gradually depreciating Background
plan_fragment_1 <- drake_plan(
data = read.csv('data.csv')
)
plan_fragment_2 <- drake_plan(
out = analyze_data(data, method = "rf"),
strings_in_dots = "literals"
)
full_plan <- rbind(plan_fragment_1, plan_fragment_2) In early 2018, @krlmlr suggested that we use language to mark input and output files (#232). I then learned more about static code analysis and implemented drake_plan(
data = read.csv(file_in("data.csv")),
out = analyze_data(data, method = "rf"),
strings_in_dots = "literals"
) From that point on, I have been trying to gracefully deprecate the single-quoted file interface and switch to the newer API ( DocumentationI try to keep the |
From this post, it looks like repos and URLs are 1:1. |
Okay cool, so I have come in at an awkward moment. I really appreciate the explanation @wlandau, the warning now makes sense to me with that context. My first experience with |
I think your timing is great, re #761 (comment). |
Hi,
I've cooked up a
drake
plan that looks like this:And I get a warning:
I don't understand what this means and it is not mentioned in the manual. I thought it was trying to suggest that I might not use literal file names and instead use a variable. So I changed the plan to look like:
Where
output_db_file
is defined in mymake.R
:output_db_file <- "demand_forecast.db"
. If I do this,drake
no longer recognises the output file as a target. I.e. if I deleted it, it is not regenerated.My understanding from the help for
file_out()
is thatstrings_in_dots
is deprecated. Please help me understand what the correct way to specify a target output file is. I may be able to suggest some changes to the documentation from there.The text was updated successfully, but these errors were encountered: