Bioconductor / BiocCheck

http://bioconductor.org/packages/BiocCheck
8 stars 26 forks source link

Make BiocCheck output legible. #179

Open nick-robo opened 2 years ago

nick-robo commented 2 years ago

Currently, BiocCheck outputs a bunch of red text which make it very difficult to read and for users to quickly identify what is wrong and what is working as expected.

Is there a specific reason why BiocCheck doesn't implement user-friendly outputs, such as rcmdcheck and devtools, by using the cli package?

I would be happy to put some work into this if it's not something that was already considered.

vjcitn commented 2 years ago

I have had similar concerns. But I think it would be helpful to look closely at all available functionality and give a clear suggestion on revision -- even before putting the offered work in -- and the offer is truly appreciated.

Here's an example. The current devel image of GenomicRanges is broken, crashes BiocCheck. But with a small change to one of the vignettes, I can do

> x = BiocCheck::BiocCheck("GenomicRanges")

where R is running in the folder enclosing a checkout of GenomicRanges sources.

Now

>  names(x)
 [1] "getLastCheck"    "show_meta"       ".refClassDef"    "add"            
 [5] ".->error"        ".->verbose"      "error"           ".->check"       
 [9] "check"           "initFields"      ".self"           ".->log"         
[13] "verbose"         "setCheck"        ".->metadata"     "zero"           
[17] "report"          "initialize"      "log"             "warning"        
[21] "metadata"        ".->warning"      "getBiocCheckDir" ".->note"        
[25] "note"            "composeReport"   "getNum"         
> x$error
$checkWatchedTag
$checkWatchedTag[[1]]
[1] "* ERROR: Maintainer must add package name to Watched Tags on the support site; Edit your Support Site User Profile to add Watched Tags."

I don't have to read the output to find the ERROR class and statement.

> names(x$warning)
[1] "checkIndivFileSizes"  "checkCodingPractice"  "checkForValueSection"

is also useful, and more details can be extracted.

There is also the log file in the GenomicRanges.BiocCheck folder created by BiocCheck.

I am somewhat familiar with the cli API, but I am not completely clear on what aspects of its formatting in, e.g., rcmdcheck, are needed here.

LiNk-NY commented 1 year ago

Is there a specific reason why BiocCheck doesn't implement user-friendly outputs, such as rcmdcheck and devtools, by using the cli package?

Hi Nick, @nick-robo The reason is BiocCheck was developed before the cli package came around. We would like to add it but it is currently not a priority of the package as it is only cosmetic.

The current devel image of GenomicRanges is broken, crashes BiocCheck.

Hi Vince, @vjcitn It looks like the Rnw vignette has duplicate chunk names: see https://github.com/Bioconductor/GenomicRanges/pull/72 Unfortunately, BiocCheck currently does not have a tryCatch mechanism for these type of errors (as they are few and far between). It would be good to have these error messages recorded in the GenomicRanges.BiocCheck report.