BiocCheck
BiocCheck
BiocCheck provides additional package checks different from `R CMD check` that follow Bioconductor best practice and recommended guidelines
There are two ways to run BiocCheck after installing the package.
Caveat: There is also BiocCheckGitClone (we will review the difference later)
Set Up / Process Overview
This assumes you have a github account and git installed:
Demo forking and creating branch
Editing Code
How you choose to edit and make changes to code will depend on what you as a programmer are used to but the two most highly used ways:
This assumes you forked to your local github as previously shown and you have git installed on your computer for version control.
Command Line
Command Line
RStudio
Some useful links on creating package from scratch and version control can be found at
https://github.com/lshep/MakeAPackage
https://github.com/shwetagopaul92/biocmeetup
Rstudio
This assumes you have git set up on your computer and with Rstudio
Rstudio
Now you are git tracking your local changes to your github repository on the special branch you created
Make your code changes
Rstudio
Commit changes locally
Rstudio
Don’t forget to build and check the package!
Two ways:
Rstudio
Push changes to Github
If you check github your changes will be uploaded if it was successful
Creating Pull Request
From your personal github (e.g. https://github.com/lshep/BiocCheck)
Important!
The Core Team will not merge just a Pull Request of R Code!
You must also update:
Code Organization
The R files
BiocCheck.R
Main function exposed to end users.
One liner calls to functions in checks.R organized by different package sections: Broadly: dependencies, version numbers, Description, Namespace, Vignette, Coding practices, man pages, news file, unit tests, formatting, package naming, support site registration (see vignette)
Each check in this file has a `handleCheck( )` with message that appears as output in the BiocCheck
Contains flags to turn off any of the high level check contained in this file
The R files
BiocCheckGitClone.R - same as BiocCheck but...
There are some checks that Bioconductor implemented that could not be done on the built tar.gz file like checking for bad file types or formatting of author/maintainer fields.
The built tar will exclude certain files or lose extensions so they would not be able to be checked but that should not be included in Bioconductor’s copy of the git repository
The built tar will reformat the description appropriately from the original file.
These types of checks are therefore intended to only done on a fresh clone of the git repository.
The R files
utils.R
Contains helper functions to the checks.R functions.
- Helps keep checks.R functions more readable and maintainable
- Contains helpers that are used in multiple function calls
* handleError, handleWarning, handleNote, handleMessage
The R files
checks.R - This is the file you will most likely be adding/modifying
Functions are in order of the sections they appear in the BiocCheck
There can be multiple checks per section or a new section can be added but try and group the checks according to what it is checking
Each check should contains a handleNote( ), handleWarning( ), or handleError( ) with a descriptive short message to indicate the check failure and the severity. If appropriate a handleCheck( ) could also be included.
Additional informative output should use handleMessage(“ “, indent=6)
To keep check readable put helper functions directly after they are used or in utils.R
Vignette
The Vignette follows the order of checks in BiocCheck.R.
This clearly identifies the different sections of a package being checked at any given time.
For EVERY/ANY new check or modified check the section in the vignette should be updated for a detailed description of the severity, causation, and reasoning. The header of the section is what text would appear in the BiocCheck output (i.e handleCheck)
Any new or updated use of handleCheck, handleNote, handleWarning, handleERROR will need an entry in the vignette.
Unit Tests
BiocCheck uses RUnit to do its testing.
The file is inst/unitTests/test_BiocCheck.R
There are test packages in inst/testpackages to add specific test cases in a repository setting
As BiocCheck is performed, a running count of Notes, Warnings, and Errors occurs. `.zeroCounters` returns the counter to zero for the next check. There is a .note, .warning, and .error object that keeps track of the numbers and text. inspect() will print out the current status of all. An individual counter can be accessed with .error$getNum() or .error$get()
Don’t Give Up
The Core Team appreciates every effort your making. We want your changes to be included.
Coding around other programmers code can be challenging and frustrating. Don’t give up!
This is meant to be a FUN community event so remember your resources! The slack channel is a great resource to engage other programmers and the core team if you need advice or are getting stuck.
We would encourage forming small groups too!
Live Check-Ins
Developers Forum - Thursday May 21 12:00 pm EST
https://bluejeans.com/114067881
Friday Review: Friday May 22 11:00 am EST
https://bluejeans.com/296225857
Hack-a-thon Open Issues