sfirke / packagemetrics

A Package for Helping You Choose Which Package to Use
Other
134 stars 6 forks source link

How is has_tests determined? #31

Closed MarkEdmondson1234 closed 6 years ago

MarkEdmondson1234 commented 7 years ago

Hi, excellent package :)

I just wondered how the has_tests column is defined, since I ran it against a couple of my packages and saw it flagged for example googleCloudStorageR as not having tests, when it does. I thought it may be because they are failing at the moment, but bigQueryR is flagged as having tests, but they are also failing.

sfirke commented 7 years ago

Hi Mark, thanks for filing this issue.

That column checks whether a package suggests "testthat" or "RUnit."

I think this is the fault of https://github.com/ropenscilabs/packagemetrics/issues/27, that the package has a static snapshot of CRAN data that is falling out of date. In the snapshot we have (from late May), version 0.2 of googleCloudStorageR does not suggest testthat, only "knitr, covr, rmarkdown". I see that v0.3 on CRAN now suggests testthat. So updating the CRAN snapshot embedded in the package should fix this.

While you're here, any good ideas for fixing #27 and having the package auto-update its CRAN snapshot? 👼

MarkEdmondson1234 commented 7 years ago

How about exporting the refresh_cran_database() function for the user? Or, I just tried it and it wasn't so bad, perhaps run it .onLoad of the package?

sfirke commented 6 years ago

The now-memoise'd function get_cran introduced by Colin Gillespie in PR #33 should address this, so I will close. Feel free to reopen if problem persists.