create a remake.yml template
This is just to get the idea started here. A simple function that a use can call to add a remake.yml file to the current working directory.
Fixes #54.
For some reason I don't see notifications on pull requests via email. You'd think that I would.
Don't worry about the failing check; it's appveyor for reasons that I don't really understand. I might just disable it until I can find the patience to work out what is really going on.
Can we get a test on this perhaps? This sort of testing is a total pain --- you'll probably have to run in a temporary directory like so:
test_that("whatever", {
owd <- setwd(tempfile())
on.exit(setwd(owd))
## ... tests go here.
})
Things to test for:
- remake file is actually copied over (does not exist before running, does exist after running)
- whatever remake file is copied over is valid (i.e. something like
remake::list_targets()does not throw). use_remakewill throw when it would overwrite (as you have implemented)- Different
dirpaths work as expected - Determine appropriate behaviour when
dirdoes not exist yet (create, throw (how is the error message?))
Also, possible things to add after dealing with the above (could be a subsequent PR if you'd rather)
- Support for a vector of packages, sources to propagate the appropriate fields
- Support for non-CRAN package sources to propagate the
remake_sources.ymlfile (e.g.,sources=list(remoji="richfitz/remoji")
Hola @aammd - any interest in picking this up again?
I like this approach for preexisting projects. Any chance we could do use_remake() for old projects and example_remake() (#100) for new ones?