request: data_loading cache only

69 views
Skip to first unread message

lizardking1976

unread,
Nov 21, 2011, 6:20:45 AM11/21/11
to ProjectTemplate
Hi, I am learning to use ProjectTemplate, congratulations on a nice
tool. Using the command "load.project" I would like to load my pre-
processed data.frame stored in "cache", but not the original data
stored in "data". In the global.dcf I have set the options
"data_loading: off" and "munging: off", however this results in the
"cache" not being loaded. Using "data_loading: on" results in original
data and "cache" being loaded. Is there an option to only load the
cache and if not could this be added to the feature request list.
cheers Ed.

John Myles White

unread,
Nov 21, 2011, 8:46:31 AM11/21/11
to project...@googlegroups.com
Thanks for the suggestion, Ed. I thought this was possible, but I'm not sure offhand. I'll go look through and let you know or write a quick patch.

-- John

John Myles White

unread,
Nov 22, 2011, 8:06:52 AM11/22/11
to project...@googlegroups.com
Hi Ed,

I just realized the reason why you're having this trouble: the mechanism currently in place for adjudicating between cache and data is a priority system in which X will be loaded from cache and not from data if both cache and data contain a file named X. But if not, then you'll load everything from data and cache. I'm guessing that your example is one in which you have A, B and C in data and X, Y, Z in cache and are loading A, B, C, X, Y and Z now when you'd like to only be loading X, Y and Z.

I don't see any reason not to allow the configuration you're proposing. Unless someone objects, I'll add it to the next release.

Best,

-- John

On Nov 21, 2011, at 6:20 AM, lizardking1976 wrote:

John Myles White

unread,
Nov 23, 2011, 8:30:34 AM11/23/11
to project...@googlegroups.com
Hi Ed,

I've just uploaded a draft of ProjectTemplate 0.4-1 to GitHub that includes a cache_loading setting that should allow you to achieve what you were hoping to do. If you can, please try it out and let me know if things work. You'll need to edit your config/global.dcf file to contain the two lines:

data_loading: off
cache_loading: on

Best,

-- John

On Nov 21, 2011, at 6:20 AM, lizardking1976 wrote:

Antonio P. Ramos

unread,
Nov 23, 2011, 12:22:19 PM11/23/11
to project...@googlegroups.com
Hi John,

That will be useful. 

Thanks. 

Antonio.
Message has been deleted

Kenny Daily

unread,
Jul 16, 2013, 11:37:57 AM7/16/13
to project...@googlegroups.com
Hi John,

I'm having an issue with the cache_loading now too; load.project() doesn't seem to be looking at it. When data_loading is on, cache gets loaded as well, regardless of the state of cache_loading. I've just installed from the github (version 0.4-3).

Thanks!

Kenny

Kenny Daily

unread,
Jul 16, 2013, 11:56:57 AM7/16/13
to project...@googlegroups.com
I forked into my own repo and made the changes myself to make data loading and cache loading completely independent (https://github.com/kdaily/ProjectTemplate), so I'll just use this now! They seem this way in my mind because there are separate data/ and cache/ subdirectories that serve different purposes. The data/ should be things that are necessary to do data munging and analysis; cache/ should hold things that have already been run. But that's a big change that might break a lot of other people's workflows.

Thanks for your work in building this great tool, and congrats on defending!

Kenny

John Myles White

unread,
Jul 16, 2013, 12:38:54 PM7/16/13
to project...@googlegroups.com
Glad you were able to get this working.

I'm not likely to do any design-level developing for the R version of ProjectTemplate any time soon, but I'll be interested to see how this idea works for you. The original goal of cache was to override matching files in data directory entirely, but that's always been a little chaotic. Your strategy might be the better path.

 -- John

--
You received this message because you are subscribed to the Google Groups "ProjectTemplate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projecttempla...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages