KentonWhite / ProjectTemplate

A template utility for R projects that provides a skeletal project.
http://projecttemplate.net
GNU General Public License v3.0
623 stars 159 forks source link

Add custom templates #206

Closed Hugovdberg closed 6 years ago

Hugovdberg commented 7 years ago

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:

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.

KentonWhite commented 7 years ago

@Hugovdberg There is a conflict in the inst/defaults/full/config/global.dcf. Can you resolve the conflict please?

Hugovdberg commented 7 years ago

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.

KentonWhite commented 7 years ago

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.

Hugovdberg commented 7 years ago

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.

Hugovdberg commented 6 years ago

@KentonWhite @connectedblue did you get a chance to review this already? Is there anything holding us back from implementing this feature?

KentonWhite commented 6 years ago

Sorry thought I had merged this. Thanks for the reminder.