Skip to content

Development

YiLiu6240 edited this page Jan 14, 2022 · 3 revisions

Notes on development

This document details steps on package development in a local docker environment for ease of maintenance and reproducibility. For simple changes simply relying on github actions will be enough.

Set up for local development

After git clone the repo, build the docker environment

docker-compose build

Spawn a working environment, which will give you a bash shell with relevant directories mounted and an R environment initialized with the dependencies for package development

docker-compose run epigraphdb-r

During development

Use the following the format codebase and check for issues with static analysis

make fmt lint

Use the following the run unit tests

make tests

Testing package builds

Check functition examples, and compile function docs (roxygen) and vignettes

make run_examples roxygen precompute_docs

Run devtools::check as

make check

Build package and docs

make build docs

Pre-CRAN checks

Run local R CMD check

make r-cmd-check

Run checks on rhub. First authenticate your environment

R
rhub::validate_email("YOUR EMAIL")
# paste back the token received by email.

Then run rhub checks.

Make rhub-check-cran rhub-check-windows

Submit to CRAN

Update cran-comments.md. Then submit

R
devtools::submit()

Confirm submission via email.

Done. \[T]/

References