ropensci-org / pkgreviewr

R package to facilitate rOpenSci package reviews.
https://docs.ropensci.org/pkgreviewr/
Other
37 stars 8 forks source link

Fix match.arg() use and make the package safe to use from within another project. #60

Closed rorynolan closed 5 years ago

rorynolan commented 5 years ago

Hi Anna and Maelle, Been trying to use the package today and am of the opinion that it needs a few small bug fixes. I hope the diffs will explain the changes I've made, but feel free to discuss or reject. Thanks for the package, it's very useful, Rory

annakrystalli commented 5 years ago

Thanks for this really important bug catch and nice solution!

This PR also picked up a bug in the test suite I need to correct.

Regarding the match.arg() fix, the choices are automatically taken from the argument option specification in the function (See Details in the docs). So re-specifying them in match.arg is not necessary and just makes more work if we want to add further options to the argument in future. I'm going to revert those changes but definitely keeping the important with_project fix.

Thanks again!

rorynolan commented 5 years ago

OK cool, glad to be of help. Also glad to learn a nice quirk of match.arg()! Thanks and all the best.