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

Add option to wflow_open to specify template #83

Closed
docmanny opened this issue Nov 27, 2017 · 2 comments
Closed

Add option to wflow_open to specify template #83

docmanny opened this issue Nov 27, 2017 · 2 comments

Comments

@docmanny
Copy link

Sometimes there's a specific protocol that you are doing that follows the same vein, where it would be nice to just have a pre-populated skeleton. I personally went from copy-pasting the skeleton, to following the internal flow of wflow_open but with my skeleton file; I just wrote a proof-of-concept wflow_open() that simply adds a template="default" keyword argument that a user can change to specify the location of a properly-formatted template directory. To simplify that, I also wrote a wflow_template() function that creates a "templates" folder at the root level of the project, and then creates a template using specified template Rmd and YAML files. If this is something people would want as well, I can submit these two changes as a pull request!

@jdblischak
Copy link
Member

Hey, Manny! Thanks for using workflowr and thinking of ways to improve it! I took a quick look at your code and overall it looks really nice:

https://github.com/docmanny/workflowr/commit/cd68cde0b4a693ff512c210ec2d5abb7bd454b58
https://github.com/docmanny/workflowr/commit/9f47971cdffa3277f3bdc222871a2797fbe48da0

However, I hesitate to merge this into workflowr. This is because I am actually investigating how to deprecate wflow_open() and its associated template. This is because it is hard to maintain a template (if I make a breaking change, a user would need to update every one of their Rmd files) as opposed to encapsulating this functionality inside a function, e.g. wflow_build().

However, even if the core workflowr material (e.g. the Git SHA1) are removed from the template, I could imagine changing wflow_open() to focus on using pre-made templates as you are doing.

Could you please send me the link to the workflowr project where you are using this template strategy so that I can experiment with it?

@jdblischak
Copy link
Member

Closing this now that wflow_open has been deprecated. Thanks again for the idea!

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