chirunconf / chirunconf19

Discussion of potential projects for Chicago R Unconference, March 9-10, 2019
16 stars 2 forks source link

usethis issue clinic #27

Open tjmahr opened 5 years ago

tjmahr commented 5 years ago

I love the usethis package. It lets you set up common pieces of R projects using standardized templates. Want to add a unit test a package? usethis::use_test() will create a file in tests/testthat and open it in RStudio for you. usethis::use_logo() will take an image file, resize it and store it man/figures/logo.png, which is a good spot for a logo file in an R package.

I see two routes here.

1. We show the package some care and try to take out some issues with one of the package's contributer's onsite as a coach (Jim Hester)

2. usethis is geared towards package developers, so we think about what pieces of boilerplate we would want to automate as data analysts. For example, use_database(connection) would create the configuration files needed to manage a database connection, add them to .gitignore, etc.

The main limitations for this proposal I think are that

wlandau commented 5 years ago

We might also look at the starters package.

On a different note, a use_drake() function has been requested (ref: https://github.com/ropensci/drake/issues/761#issuecomment-468848523). I am thinking it could set up some simple files described here with example code included but commented out (example file structure: https://github.com/wlandau/drake-examples/tree/master/main). I am not sure whether such a function should go in drake, starters, or usethis.

emilyriederer commented 5 years ago

Given that drake would have to be installed for use_drake() to be useful, maybe it would make sense to put it in drake and then both starters and usethis could add their own wrappers calling it? (Similar to how devtools is now calling from a family of package development packages)

wlandau commented 5 years ago

Sounds reasonable. Just opened https://github.com/ropensci/drake/issues/773.

jdblischak commented 5 years ago

usethis is geared towards package developers, so we think about what pieces of boilerplate we would want to automate as data analysts.

@tjmahr You may also be able to get some ideas from the rrtools package, which has e.g. use_analysis().