Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@brunocarlin

Description

@brunocarlin

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions