baumer-lab / fertile

creating optimal conditions for reproducibility
GNU General Public License v3.0
52 stars 4 forks source link

Remedies for external paths #30

Open jennybc opened 6 years ago

jennybc commented 6 years ago

In various discussion around safe path practices, many people insist that they simply must refer to paths outside the project. I bet a lot of this can be eliminated but I also accept you can't completely design this problem away.

This solution presented by @HenrikBengtsson makes a 💡 go on for lots of people and I think you should have it on your radar here. Either helping people to implement it or providing it as a suggested remedy.

https://community.rstudio.com/t/project-oriented-workflow-setwd-rm-list-ls-and-computer-fires/3549/35?u=jennybryan

beanumber commented 5 years ago

@jennybc do you mean that if we find paths that point outside the project directory that we create sym links instead? That sounds reasonable to me. I wonder if we should put all the symlinks in a directory called data-external or something like that, to clearly quarantine references to it.

jennybc commented 5 years ago

Yes, I think a good recommendation is to replace hard-coded external paths with an internal path to a symlink. Your idea of collecting them all in one place is good, but the name probably has to be more generic, maybe just external? That folder would also be an obvious place for a README explaining which destinations must be defined.