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

deployment = "local" was removed and it breaks tar_target() #298

Closed
10 tasks done
brunocarlin opened this issue Feb 5, 2021 · 1 comment
Closed
10 tasks done

deployment = "local" was removed and it breaks tar_target() #298

brunocarlin opened this issue Feb 5, 2021 · 1 comment

Comments

@brunocarlin
Copy link

brunocarlin commented Feb 5, 2021

Prework

  • Read and agree to the code of conduct and contributing guidelines.
  • If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
  • For any problems you identify, post a minimal reproducible example like this one so the maintainer can troubleshoot. A reproducible example is:
    • Runnable: post enough R code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the tidyverse style guide.

Description

Please describe the issue.

Hi, I don't know if this is just me ranting about wasting a few minutes but I think the depreciation of the

 tar_target(
    raw_data_file,
    "data/raw_data.csv",
    format = "file",
   deployement = "local"
  )


Giving error

Error in match.arg(deployment, c("worker", "main")) : 
  'arg' should be one of "worker", "main"
Error: callr subprocess failed: 'arg' should be one of "worker", "main"
Type .Last.error.trace to see where the error occured


.Last.error.trace 
 Process 16000:
 19. (function (targets_script, targets_function, targets_arg ...
 20. base:::source(targets_script)
 21. base:::withVisible(eval(ei, envir))
 22. base:::eval(ei, envir)
 23. base:::eval(ei, envir)
 24. targets:::tar_target(raw_data_file, "data/raw_data.csv", ...
 25. base:::match.arg(deployment, c("worker", "main"))
 26. base:::stop(gettextf("'arg' should be one of %s", paste( ...
 27. base:::.handleSimpleError(function (e)  ...
 28. h(simpleError(msg, call))



Is not very clear, maybe an argument with a better message would have been better, I know this is just the initial stages of a great project but still...

As always thanks for the great package!

To help us read any code you include (optional) please try to follow the tidyverse style guide. The style_text() and style_file() functions from the styler package make it easier.

Reproducible example

  • For any problems you identify, post a minimal reproducible example so the maintainer can troubleshoot. A reproducible example is:
    • Runnable: post enough R code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the tidyverse style guide.

You can fork the r targets-minimal to test or just change any target you have to include deployment = "local"

@brunocarlin brunocarlin changed the title deployment = "local" was removed and it break the tar_target() deployment = "local" was removed and it breaks tar_target() Feb 5, 2021
@wlandau
Copy link
Member

wlandau commented Feb 5, 2021

Sorry about that. I was less concerned about breaking changes before targets achieved its first CRAN release. The error message should be better now.

targets::tar_target(x, 1, deployment = "local")
#> Error: deployment equals "local" but must be in c("worker", "main")

Created on 2021-02-05 by the reprex package (v0.3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants