# 2 General Package Development

## 2.1 Version of Bioconductor and

Package developers should always use the devel version of Bioconductor when developing and testing packages to be contributed.

Depending on the release cycle, using Bioconductor devel may or may not involve also using the devel version of . See the how-to on using devel version of Bioconductor for up-to-date information.

## 2.2 Correctness, Space and Time

### 2.2.1 R CMD build

Bioconductor packages must minimally pass R CMD build (or R CMD INSTALL --build) and pass R CMD check with no errors and no warnings using a recent R-devel. Authors should also try to address all errors, warnings, and notes that arise during build or check.1

### 2.2.2 BiocCheck

Packages must also pass BiocCheck::BiocCheckGitClone() and BiocCheck::BiocCheck() with no errors and no warnings. The BiocCheck package is a set of tests that encompass Bioconductor Best Practices. Every effort should be made to address any notes that arise during this build or check.2

### 2.2.3 File names

Do not use filenames that differ only in case, as not all file systems are case-sensitive.

### 2.2.4 Package size

The source package resulting from running R CMD build should occupy less than 5 MB on disk.

### 2.2.5 Check duration

The package should require less than 10 minutes to run R CMD check --no-build-vignettes. Using the --no-build-vignettes option ensures that the vignette is built only once.3

### 2.2.6 Memory

Vignette and man page examples should not use more than 3 GB of memory since cannot allocate more than this on 32-bit Windows.

### 2.2.7 Individual file size

For software packages, individual files must be <= 5MB. This restriction exists even after the package is accepted and added to the Bioconductor repository.

### 2.2.8 Undesirable files

The raw package directory should not contain unnecessary files, system files, or hidden files such as .DS_Store, .project, .git, cache files, log files, *.Rproj, *.so, etc. These files may be present in your local directory but should not be commited to git (see .gitignore).

## 2.3 R CMD check environment

It is possible to activate or deactivate a number of options in R CMD build and R CMD check. Options can be set as individual environment variables or they can be listed in a file. Descriptions of all the different options available can be found here. Bioconductor has chosen to customize some of these options for incoming submission during R CMD check. The file of utilized flags can be downloaded from GitHub. The file can either be placed in a default directory as directed here or can be set through environment variable R_CHECK_ENVIRON with a command similar to:

export R_CHECK_ENVIRON = <path to downloaded file>

If a README file is included in the package or the Github repository and it provides installation instructions, those instruction should also include Bioconductor installation instructions.
If a README.Rmd is provided (rather than README.md, or other) those installation instructions should be in an eval=FALSE code chunk.