Comments (4)
HI @eribul, this is an interesting thought. In the global.dcf
there are 2 cache flags: cache_loading
and cache_loaded_data
. I'm assuming for this conversation you are referring to cache_loading
and that if cache_loading
is set to FALSE you aren't using the cache directory. I'm also assuming that you have manually removed the cache directory. If I'm missing something please let me know!
ProjectTemplate
is meant as a framework that provides sensible defaults. This sets novices on a good path, which includes caching data for faster load time. At the same time, ProjectTemplate
shouldn't get in the way of experienced users. If you don't want a cache
folder you should not need a cache
folder!
It's an easy change making cache
not mandatory. What should ProjectTemplate
do if a person has removed the cache
directory and then decides they want caching? Should it simply fail, putting the burden on you to figure out what went wrong? Should it provide an error message that a cache
directory should be present and require you to make the cache
directory? Should it create the cache
directory, notify the user, and get on with the work?
Before making the change, these are the questions I'm mulling over. Would love your thoughts! I'm leaning towards creating the directory if this wouldn't get in your way.
from projecttemplate.
Hi agin!
Yes, I had removed it manually for a project without any data of its own (usnig data from SQL database and just exporting a report).
I agree! To create the cahce folder with a message sounds great :-)
from projecttemplate.
Hi @eribul,
I've been checking edge cases associated with removing the cache
directory. Not having a cache
directory may interfere with other features. Caching is very much integrated with ProjectTemplate
going forward. I also recognize that sometimes the cache
directory is removed! The error message coming from .stopifnotproject
could be very confusing if the cache directory is missing. It simply says "<current_directory> is not a ProjectTemplate directory." This is not very informative and can lead someone down a very frustrating path if the cache
directory or the data
directory is missing.
Rather than catching all the places where the cache
could be used, checking for the cache
directory, and creating a cache
directory if missing, I think the way forward is providing a more informative error message. I'm adding to the existing error message the following: "If you believe you are in a ProjectTemplate directory and seeing this message in error, try running migrate.project(). migrate.project() will ensure the ProjectTemplate structure is consistent with your version of ProjectTemplate."
from projecttemplate.
Sounds great! I agree!
from projecttemplate.
Related Issues (20)
- Consider removing "cache" from .mandatory.files HOT 4
- Rebuild cache if the underlying data changed HOT 9
- Error in order(data.files$cache_only, data.files$filename, data.files$varname, : HOT 6
- Help: using projecttemplate R within RStudio: Microsoft Azure Data Science VM HOT 2
- Spelling - Main README.md HOT 4
- Clear objects from the workspace - deleted cached files - no such file or directory HOT 4
- Loading data with space in name HOT 1
- false cache entry from autoloading data HOT 3
- data_ignore does not ignore cached files
- more informative error for typo in "depends" list HOT 2
- Clear explanation of where/how to use Notebooks (Rmd) with ProjectTemplate HOT 9
- Missing spaces in warning HOT 1
- quite/verbose option in `run.project` HOT 1
- Quotes used to wrap the path for dbname value in sql file returns error HOT 4
- Mastering guide should show 'load.project' step prior to stub.tests() HOT 2
- Support underscore in data file names HOT 3
- Autoload stopped working after update HOT 11
- My RStudio can't find templates of ProjectTemplate in the New Project… wizard HOT 5
- Not an issue more so a question/feature request HOT 32
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from projecttemplate.