baumer-lab / fertile

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

Added check for whether file provided in each check is a directory #41

Closed ambertin closed 5 years ago

ambertin commented 5 years ago

Added check_is_dir to checks.R, and included it in all of the functions that require directories in checks.R.

Added tests to test-check.R to make sure that check_is_dir works as intended.

@beanumber Is this check formatting correct, or do I need to alter something? Should there be an error message that comes up if check_is_dir fails inside some of the other checks? If so, how should that be included? I'm not sure where exactly to put it.

beanumber commented 5 years ago

@ambertin I don't think check_is_dir() needs to be a "check" (like the other checks). I think it should just be a regular function (probably put it in utils.R). Basically:

ambertin commented 5 years ago

@beanumber I edited and moved check_is_dir() into utils.R, and moved the tests for the function into test-fertile.R. Let me know if this looks better!

beanumber commented 5 years ago

Nice.