Closed Hugovdberg closed 6 years ago
@Hugovdberg There is a conflict in the inst/defaults/full/config/global.dcf
. Can you resolve the conflict please?
I was looking into fixing the problem, but I see that the inst/defaults/config/default.dcf
still has the old version number, and some other default settings than inst/defaults/templates/full/config/global.dcf
. Shouldn't those two be the same? And if they should be the same, than how do you feel about removing the global.dcf
from the base templates provided, and add some logic to create.project
to copy the default.dcf
into the project if it's missing in the template? That way we don't have to manage the default settings in both the full
and minimal
template.
Good point about not having to update the global.dcf
file in multiple places. I'm not sure how much effort it would be. Lets make resolve the conflicts on this PR and then open a new PR to copy to use a single global.dcf
file.
Apparently default.dcf
contains some other defaults than global.dcf
, which the tests do rely on. I reverted those changes, though I'm not exactly sure why those settings were hardcoded in the tests and why the tests assume different settings than the normal defaults.
@KentonWhite @connectedblue did you get a chance to review this already? Is there anything holding us back from implementing this feature?
Sorry thought I had merged this. Thanks for the reminder.
This is a first try at creating custom templates, as proposed in #204 and, originally, in #36. It seems like a very large change, but in fact the changes can be grouped in a few categories:
create.template.R
was added as a lightweight wrapper aroundcreate.project
with some checking for a sensible locationProjectTemplate.templatedir
was introduced to allow the user to specify a directory which contains her or his templates.migrate.template
was added as a wrapper aroundmigrate.project
to migrate the configuration of the template.create.project
was changed to take an argumenttemplate
instead ofminimal
, which defaults tofull
to preserve the original behavior.create.project
. I removed all references tominimal = TRUE|FALSE
because just a few tests actually depended on the template used in the test.inst/default/full
directory was moved toinst/default/templates/full
, and a new minimal template was created atinst/default/templates/minimal
to cope with the new template system.Some stuff has yet to be added, such as documentation for the functions and for the website, but I wanted to show this already to get some feedback before doing so.