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

Dedicated vignette on wildcard templating #388

Closed
wlandau opened this issue May 20, 2018 · 9 comments
Closed

Dedicated vignette on wildcard templating #388

wlandau opened this issue May 20, 2018 · 9 comments

Comments

@wlandau
Copy link
Member

wlandau commented May 20, 2018

Ref: #353. As @lorenzwalthert suggested, we should caution users to come up with wildcards that do not conflict with existing text in the commands.

@lorenzwalthert
Copy link
Contributor

Thanks for opening this. In case you did not know: If want to refer to the exact comment in that issue, you can get the link from right clicking on "xx hours ago" in "lorenzwalthert commented xx hours ago" in the header of the comment. Learned that from Kirill 😊

@lorenzwalthert
Copy link
Contributor

And let me know if I can assist on this, as it is in principle an easy task. But maybe it adds more overhead and you wanna do it yourself. 😊 Let me know.

@wlandau
Copy link
Member Author

wlandau commented May 21, 2018

If want to refer to the exact comment in that issue, you can get the link from right clicking on "xx hours ago"...

That is my usual preference, but I was away from a proper computer.

And let me know if I can assist on this, as it is in principle an easy task.

Yes, I would love help. Thank you!

@lorenzwalthert
Copy link
Contributor

So would you want to give an outline? Because I don't know drake very well (yet) so I want to make sure I can focus on the right aspects.

I thought about:

  • Quick description of what a wild card is and why it is useful (including recycling property).
  • mention two functions plan_analysis() and make_plan() and their relationship. Not sure how to describe.
  • Word of caution (reason for this issue) plus recommendations to use consistent wild cards, e.g. analysis__ and dataset__.
  • Example (maybe simply taking from help file, or create a new one).

@wlandau
Copy link
Member Author

wlandau commented May 22, 2018

Yeah, let's outline it together. From bullet 2 in your list, I think we might even expand the vignette to cover workflow plan data frames in general. Workflow plans are at least as mysterious, and they might even deserve more attention than wildcards. Throughout, we could build on one of the existing examples, maybe the GSP example.

  • What is a workflow plan data frame?
    • Role in make().
    • Possible comparison to Makefiles.
    • drake_plan().
  • Why is it a data frame and not a file?
    • You can manipulate it (more easily than a Makefile).
    • Workflow plan from the GSP example: generate lots of targets easily with combos() or expand.grid().
    • expand_plan() generates replicates.
  • Wildcard templating: a tool for generating lots of targets.
    • plan_analyses()
    • plan_summaries()
    • evaluate_plan()
    • Need to avoid conflicts with non-wildcard text. Maybe use trailing double underscores.

@lorenzwalthert
Copy link
Contributor

Ok, will try to get us started this or next week on this. Most likely, I will miss a few things though and need help from you 😊

@wlandau
Copy link
Member Author

wlandau commented Jun 6, 2018

I would really appreciate that, thank you!

@wlandau
Copy link
Member Author

wlandau commented Jun 7, 2018

FYI: when you are ready for a PR, would you submit it to https://github.com/wlandau/drake-manual? I am moving all the vignettes and HTML widgets to a large online bookdown-powered user manual: (ref: #332 (comment)).

Closing in favor of ropensci-books/drake#5.

@wlandau wlandau closed this as completed Jun 7, 2018
@lorenzwalthert
Copy link
Contributor

Sure

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

No branches or pull requests

2 participants