KentonWhite / ProjectTemplate

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

Move config/global.dcf #82

Closed krlmlr closed 10 years ago

krlmlr commented 10 years ago

config directory contains only one file, overkill. Suggestions (in order of preference):

?

Related: #79.

KentonWhite commented 10 years ago

I think the inspiration for the config directory is from Rails, where one can define configurations for multiple environments -- production, development, testing. I know that right now ProjectTemplate only supports the single global.dcf. I think it would be nice to add support for multiple configurations.

I know that when I'm working with the data interactively I don't want to load cached data and I want to munge the data each time. When I'm running a script to reproduce a figure, I want to use cached data and not run munging. Today I'm making changes to the global.dcf file when I'm running interactively and then changing them back for reproducing the figures.

Rather than eliminating the config directory and making a single configuration file, what if we support multiple configuration files in the config directory. For example, I could have global.dcf and interactive.dcf defined. load.project() will default to global.dcf. If I want to use the interactive configuration, I could run load.project(config="interactive").

What do you think?

krlmlr commented 10 years ago

I wasn't aware of the Rails convention. We can add cascading configuration once #76 is merged.