benmarwick / rrtools

rrtools: Tools for Writing Reproducible Research in R
Other
670 stars 85 forks source link

Enabled `rrtools::use_analysis(location = "vignettes")` to set up compendium #82

Closed ntrlshrp closed 5 years ago

ntrlshrp commented 5 years ago

Fixes #81

This function failed to set up the compendium because a usethis::ui_done() was malformed (a typo turned the required 1 argument into 4 arguments).

Once this was fixed, it turned out that some writeLines() functions were not pointing to the correct path and thus failed to create /paper.Rmd.

Once this was fixed, tests/testthat/test_use_analysis.R was extended to test that location = "inst" and location = "vignettes" create the proper analysis sub-directories and that paper/ contains paper.Rmd and references.bib.

Although devtools::check() completed with 0 errors, warnings, or notes, rrtools::use_analysis(location = "vignettes") still failed in the field. This was again a path error (this time in open_in_rstudio()). This was rectified and new code was added so that RStudio opens paper.Rmd for the user for all three locations, i.e., "top_level", "inst", and "vignettes".

benmarwick commented 5 years ago

Thanks very much, this is excellent and most welcome! Thanks especially for adding the tests. Can I invite you to also edit the DESCRIPTION file to add your name as a contributor? Then I'd be very happy to merge this. Thanks again!

benmarwick commented 5 years ago

Thanks!