Title: | A package with style requirements for the gDR suite |
---|---|
Description: | Package fills a helper package role for whole gDR suite. It helps to support good development practices by keeping style requirements and style tests for other packages. It also contains build helpers to make all package requirements met. |
Authors: | Allison Vuong [aut], Dariusz Scigocki [aut], Marcin Kamianowski [aut], Aleksander Chlebowski [ctb], Janina Smola [aut], Arkadiusz Gladki [cre, aut] , Bartosz Czech [aut] |
Maintainer: | Arkadiusz Gladki <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.5.1 |
Built: | 2024-11-07 03:27:25 UTC |
Source: | https://github.com/bioc/gDRstyle |
Avoid new lines in sprintf output. Function helps to avoid line lenght limits without affecting sprintf output
avoid_new_lines(fmt)
avoid_new_lines(fmt)
fmt |
string, formatted as sprintf input |
string
sprintf(avoid_new_lines( "Lorem ipsum dolor sit amet, %s adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam." ), "consectetur")
sprintf(avoid_new_lines( "Lorem ipsum dolor sit amet, %s adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam." ), "consectetur")
Check the package depedency version specifications in the
rplatform/dependencies.yaml
and DESCRIPTION
.
checkDependencies( dep_path, desc_path, skip_pkgs = "R", combo_path = "/mnt/vol/dependencies_combo.yaml" )
checkDependencies( dep_path, desc_path, skip_pkgs = "R", combo_path = "/mnt/vol/dependencies_combo.yaml" )
dep_path |
String of path to the rplatform |
desc_path |
String of the path to the package |
skip_pkgs |
vector of packages from |
combo_path |
String of path to the combo image
|
This function is used for its side effects in the event that there are dependency clashes.
NULL
invisibly.
checkDependencies( dep_path = system.file(package = "gDRstyle", "testdata", "dependencies.yaml"), desc_path = system.file(package = "gDRstyle", "DESCRIPTION"), skip_pkgs = c("testthat", "lintr") )
checkDependencies( dep_path = system.file(package = "gDRstyle", "testdata", "dependencies.yaml"), desc_path = system.file(package = "gDRstyle", "DESCRIPTION"), skip_pkgs = c("testthat", "lintr") )
Used in gDR platform pacakges' CI/CD pipelines to 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.
checkPackage( pkgName, repoDir, subdir = NULL, fail_on = "warning", bioc_check = FALSE, run_examples = TRUE, skip_lint = FALSE, skip_tests = FALSE, build_vignettes = TRUE, check_vignettes = TRUE, as_cran = FALSE )
checkPackage( pkgName, repoDir, subdir = NULL, fail_on = "warning", bioc_check = FALSE, run_examples = TRUE, skip_lint = FALSE, skip_tests = FALSE, build_vignettes = TRUE, check_vignettes = TRUE, as_cran = FALSE )
pkgName |
String of package name. |
repoDir |
String of path to repository directory. |
subdir |
String of relative path to the R package root directory
from the |
fail_on |
String specifying the level at which check fail. Supported
values: |
bioc_check |
Logical whether bioc check should be performed |
run_examples |
Logical whether examples check should be performed |
skip_lint |
skip lint checks |
skip_tests |
skip tests |
build_vignettes |
build vignettes |
check_vignettes |
check vignettes |
as_cran |
run with as_cran flag |
NULL
invisibly.
checkPackage( pkgName = "fakePkg", repoDir = system.file(package = "gDRstyle", "tst_pkgs", "dummy_pkg"), fail_on = "error" )
checkPackage( pkgName = "fakePkg", repoDir = system.file(package = "gDRstyle", "tst_pkgs", "dummy_pkg"), fail_on = "error" )
Install all package dependencies from yaml file for building image purposes
installAllDeps( additionalRepos = NULL, base_dir = "/mnt/vol", use_ssh = FALSE, test_mode = FALSE )
installAllDeps( additionalRepos = NULL, base_dir = "/mnt/vol", use_ssh = FALSE, test_mode = FALSE )
additionalRepos |
List of additional Repos |
base_dir |
String of base working directory. |
use_ssh |
logical, if use ssh keys |
test_mode |
logical, whether to run the function in the test mode (if TRUE the dependencies are not installed but only listed) |
NULL
installAllDeps( base_dir = system.file(package = "gDRstyle", "testdata"), test_mode = TRUE )
installAllDeps( base_dir = system.file(package = "gDRstyle", "testdata"), test_mode = TRUE )
Install locally cloned repo for builiding image purposes
installLocalPackage(repo_path, additionalRepos = NULL, base_dir = "/mnt/vol")
installLocalPackage(repo_path, additionalRepos = NULL, base_dir = "/mnt/vol")
repo_path |
String of repository directory. |
additionalRepos |
List of additional Repos |
base_dir |
String of base working directory. |
NULL
installLocalPackage(system.file( package = "gDRstyle", "tst_pkgs", "dummy_pkg" ))
installLocalPackage(system.file( package = "gDRstyle", "tst_pkgs", "dummy_pkg" ))
Lint select subdirectories in a package directory.
lintPkgDirs(pkg_dir = ".", shiny = FALSE)
lintPkgDirs(pkg_dir = ".", shiny = FALSE)
pkg_dir |
String of path to package directory. |
shiny |
Boolean of whether or not a |
Will look for files in the following directories:
"R"
, "tests"
, and conditionally "inst/shiny"
if shiny
is TRUE
.
NULL
invisibly.
lintPkgDirs( pkg_dir= system.file(package = "gDRstyle", "tst_pkgs", "dummy_pkg"))
lintPkgDirs( pkg_dir= system.file(package = "gDRstyle", "tst_pkgs", "dummy_pkg"))
Check that function has documented specific tag in Roxygen
skeleton (default @author
).
roxygen_tag_linter(tag = "@author")
roxygen_tag_linter(tag = "@author")
tag |
character (default |
linter class function
Kamil Foltynski [email protected]
linters_config <- lintr::linters_with_defaults( line_length_linter = lintr::line_length_linter(120), roxygen_tag_linter = roxygen_tag_linter() )
linters_config <- lintr::linters_with_defaults( line_length_linter = lintr::line_length_linter(120), roxygen_tag_linter = roxygen_tag_linter() )