Skip to content

create a remake.yml template#61

Open
aammd wants to merge 1 commit intorichfitz:masterfrom
aammd:master
Open

create a remake.yml template#61
aammd wants to merge 1 commit intorichfitz:masterfrom
aammd:master

Conversation

@aammd
Copy link
Copy Markdown

@aammd aammd commented Sep 2, 2015

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.

@richfitz
Copy link
Copy Markdown
Owner

richfitz commented Sep 3, 2015

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.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file does not exist - I presume you're trying to copy over this file? That file is not installed (only files below inst/ would be). Perhaps it would be better to install a new, heavily commented, file that is custom designed for being easy to start with?

@richfitz
Copy link
Copy Markdown
Owner

richfitz commented Sep 3, 2015

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
Copy link
Copy Markdown
Owner

richfitz commented Sep 3, 2015

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
Copy link
Copy Markdown
Owner

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

@wlandau
Copy link
Copy Markdown

wlandau commented Nov 20, 2016

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

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

Successfully merging this pull request may close these issues.

3 participants