Overview
The gDRstyle
package is intended to be used during
development of packages within the gDR platform. It has 3 primary uses:
(1)to set a style guide with functions that check that the style is
upheld, (2) during CI to ensure code passes R CMD check
to
maintain the state of the code in high quality, and (3) for package
dependency installation during gDR platform image building.
Use Cases
Style guide
See the written Style
guide. The function lintPkgDirs
can be used to ensure
the package is appropriately linted.
CI/CD
The checkPackage
function will check that the package
abides by gDRstyle stylistic requirements, passes
rcmdcheck
, and ensures that the
dependencies.yml
file used to build gDR platform’s docker
image is kept up-to-date with the dependencies listed in the package’s
DESCRIPTION
file. This is called in gDR platform packages’
CI/CD.
Package installation
The function installAllDeps
assists in installing
package dependencies. For example, it’s used in gdrplatform packages
(see e.g. link).
SessionInfo
## R version 4.3.0 (2023-04-21)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.3 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: Etc/UTC
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] gDRstyle_1.5.1 BiocStyle_2.30.0
##
## loaded via a namespace (and not attached):
## [1] jsonlite_1.8.9 compiler_4.3.0 BiocManager_1.30.25
## [4] crayon_1.5.3 xml2_1.3.6 stringr_1.5.1
## [7] callr_3.7.6 jquerylib_0.1.4 systemfonts_1.0.5
## [10] textshaping_0.3.7 yaml_2.3.10 fastmap_1.2.0
## [13] R6_2.5.1 knitr_1.48 backports_1.5.0
## [16] tibble_3.2.1 lintr_3.1.2 bookdown_0.37
## [19] desc_1.4.3 cyclocomp_1.1.1 pillar_1.9.0
## [22] bslib_0.6.1 rlang_1.1.4 utf8_1.2.4
## [25] cachem_1.1.0 stringi_1.8.4 xfun_0.49
## [28] fs_1.6.3 sass_0.4.8 lazyeval_0.2.2
## [31] rex_1.2.1 memoise_2.0.1 cli_3.6.3
## [34] pkgdown_2.0.7 withr_3.0.2 magrittr_2.0.3
## [37] ps_1.8.1 digest_0.6.37 processx_3.8.4
## [40] remotes_2.5.0 lifecycle_1.0.4 vctrs_0.6.5
## [43] data.table_1.15.0 evaluate_1.0.1 glue_1.8.0
## [46] ragg_1.2.7 fansi_1.0.6 rmarkdown_2.25
## [49] purrr_1.0.2 pkgconfig_2.0.3 tools_4.3.0
## [52] htmltools_0.5.7