remake icon indicating copy to clipboard operation
remake copied to clipboard

create a remake.yml template

Open aammd opened this issue 10 years ago • 5 comments

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.

aammd avatar Sep 02 '15 06:09 aammd

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.

richfitz avatar Sep 03 '15 12:09 richfitz

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_remake will throw when it would overwrite (as you have implemented)
  • Different dir paths work as expected
  • Determine appropriate behaviour when dir does not exist yet (create, throw (how is the error message?))

richfitz avatar Sep 03 '15 12:09 richfitz

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.yml file (e.g., sources=list(remoji="richfitz/remoji")

richfitz avatar Sep 03 '15 12:09 richfitz

Hola @aammd - any interest in picking this up again?

richfitz avatar Oct 17 '16 06:10 richfitz

I like this approach for preexisting projects. Any chance we could do use_remake() for old projects and example_remake() (#100) for new ones?

wlandau avatar Nov 20 '16 20:11 wlandau