ropensci / drake

An R-focused pipeline toolkit for reproducibility and high-performance computing
https://docs.ropensci.org/drake
GNU General Public License v3.0
1.34k stars 129 forks source link

add a package option to turn off adding `.gitignore` file #991

Closed januz closed 5 years ago

januz commented 5 years ago

I understand that for most use cases, it's a good standard to exclude .drake contents from version control.

However, I would like to check them in for certain projects in which I want to deliver the cache as part of the reproducible research compendium. I know that I can "just" remove the file after the first run, but I regularly forget to do so after deleting and running make() anew.

A package option like pkgconfig::set_config("drake::write_gitignore" = FALSE) would be greatly appreciated as I could just set it in .onLoad() for the respective projects and forget about it.

wlandau commented 5 years ago

I hear you, but because of how complicated drake has become, is hesitate to add new arguments to make() or drake_config(). For the research compendium, maybe automate the removal of .gitignore instead of doing it manually?

# make.R: script that calls make() in the compendium
# ...
make(plan)
unlink(".drake/.gitignore")
januz commented 5 years ago

Alright, that's a good alternative!