Title: | R package for checking KWB package status |
---|---|
Description: | R package for checking KWB package status (e.g. generating https://kwb-r.github.io/status). |
Authors: | Michael Rustler [aut, cre] , Hauke Sonnenberg [ctb] , FAKIN [fnd], Kompetenzzentrum Wasser Berlin gGmbH (KWB) [cph] |
Maintainer: | Michael Rustler <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.3.5 |
Built: | 2024-11-14 03:43:52 UTC |
Source: | https://github.com/KWB-R/kwb.pkgstatus |
badge_appveyor
badge_appveyor(repo_full_names)
badge_appveyor(repo_full_names)
repo_full_names |
vector with combination of username/repo (e.g. c("KWB-R/kwb.utils", "KWB-R/kwb.db")) |
appveyor badges for provided repo_full_names
badge_codecov
badge_codecov(repo_full_names)
badge_codecov(repo_full_names)
repo_full_names |
vector with combination of username/repo (e.g. c("KWB-R/kwb.utils", "KWB-R/kwb.db")) |
codecov badges for provided repo_full_names
badge_cran
badge_cran(repo_names)
badge_cran(repo_names)
repo_names |
vector of repository names (e.g. c("kwb.utils", "kwb.db")) |
crank badges for provided repo_names
badge_dependencies
badge_dependencies(repo_names)
badge_dependencies(repo_names)
repo_names |
vector of repository names (e.g. c("kwb.utils", "kwb.db")) |
dependency badges for provided repo_names
badge_gitlab
badge_gitlab( url, logo_path = paste0("https://gitlab.com/gitlab-com/gitlab-artwork/raw/", "master/logo/logo-square.png"), size = 24 )
badge_gitlab( url, logo_path = paste0("https://gitlab.com/gitlab-com/gitlab-artwork/raw/", "master/logo/logo-square.png"), size = 24 )
url |
url to repository on Gitlab |
logo_path |
path to Gitlab logo (default: "https://gitlab.com/gitlab-com/gitlab-artwork/raw/master/logo/logo-square.png") |
size |
size of logo in pixels (default: 24) |
Gitlab logo in html with path to repository in Gitlab
badge_license
badge_license(license_keys, github_token = Sys.getenv("GITHUB_TOKEN"))
badge_license(license_keys, github_token = Sys.getenv("GITHUB_TOKEN"))
license_keys |
one or many valid license keys from c("agpl-3.0", "apache-2.0", "bsd-2-clause", "bsd-3-clause", "epl-2.0", "gpl-2.0", "gpl-3.0", "lgpl-2.1", "lgpl-3.0", "mit", "mpl-2.0", "unlicense") |
github_token |
github access token (default: Sys.getenv("GITHUB_TOKEN")) |
badge for all provided license keys
badge_opencpu
badge_opencpu( url, logo_path = "https://avatars2.githubusercontent.com/u/28672890?s=200&v=4", size = 24 )
badge_opencpu( url, logo_path = "https://avatars2.githubusercontent.com/u/28672890?s=200&v=4", size = 24 )
url |
url to repository on Gitlab |
logo_path |
path to OpenCpu logo (default: "https://avatars2.githubusercontent.com/u/28672890?s=200&v=4") |
size |
size of logo in pixels (default: 24) |
OpenCpu logo in html with path to R package on OpenCpu
badge_travis
badge_travis(repo_full_names)
badge_travis(repo_full_names)
repo_full_names |
vector with combination of username/repo (e.g. c("KWB-R/kwb.utils", "KWB-R/kwb.db")) |
travis badges for provided repo_full_names
badge_zenodo
badge_zenodo(repo_full_names, zenodo_token = Sys.getenv("ZENODO_TOKEN"))
badge_zenodo(repo_full_names, zenodo_token = Sys.getenv("ZENODO_TOKEN"))
repo_full_names |
vector with combination of username/repo (e.g. c("KWB-R/kwb.utils", "KWB-R/kwb.db")) |
zenodo_token |
zenodo authentication token (default: Sys.getenv("ZENODO_TOKEN")) |
zenodo badges for provided repo_full_names
Check documentation: development
check_docu_dev(repo_names, url = "http://kwb-r.github.io")
check_docu_dev(repo_names, url = "http://kwb-r.github.io")
repo_names |
vector of repository names to be checked |
url |
main url for Github pages (default: "http://kwb-r.github.io") |
character vector with links in case documentation of development version for R packages is available
Check documentation: release
check_docu_release(repo_names, url = "http://kwb-r.github.io")
check_docu_release(repo_names, url = "http://kwb-r.github.io")
repo_names |
vector of repository names to be checked |
url |
main url for Github pages (default: "http://kwb-r.github.io") |
character vector with links in case documentation of latest release for R packages is available
check_gitlab_backup
check_gitlab_backup( group = "KWB-R", github_token = Sys.getenv("GITHUB_TOKEN"), gitlab_token = Sys.getenv("GITLAB_TOKEN") )
check_gitlab_backup( group = "KWB-R", github_token = Sys.getenv("GITHUB_TOKEN"), gitlab_token = Sys.getenv("GITLAB_TOKEN") )
group |
username or organisation for Github/Gitlab (default: "KWB-R") |
github_token |
github access token (default: Sys.getenv("GITHUB_TOKEN")) |
gitlab_token |
gitlab access token (default: Sys.getenv("GITLAB_TOKEN"))) |
data.frame containing all Github repositoriers that are mirrored in Gitlab (i.e. were at least syncronised within the last 2 hours)
Direct deployment of R packages (including vignette build) by using webhooks as described in OpenCpu blog post (https://www.opencpu.org/posts/opencpu-release-1-4-5/) and online help (https://www.opencpu.org/cloud.html)
check_opencpu_deploy(group = "KWB-R")
check_opencpu_deploy(group = "KWB-R")
group |
username or organisation for Github (default: "KWB-R") |
data.frame containing names with OpenCpu badges for all Github repositories that are deployed on OpenCpu (default: https://kwb-r.ocpu.io)
Create R packages status report#'
create_report_rpackages( secrets_csv = NULL, non_r_packages = get_non_r_packages(), export_dir = ".", input_rmd = system.file("extdata/reports/status_report.Rmd", package = "kwb.pkgstatus") )
create_report_rpackages( secrets_csv = NULL, non_r_packages = get_non_r_packages(), export_dir = ".", input_rmd = system.file("extdata/reports/status_report.Rmd", package = "kwb.pkgstatus") )
secrets_csv |
path to "secrets.csv" file, if "NULL" Sys.env variables for the following services are used/need to be defined: APPVEYOR_TOKEN, GITHUB_TOKEN, GITLAB_TOKEN, CODECOV_TOKEN, ZENODO_TOKEN, (default: NULL) |
non_r_packages |
a character vector with repositories in KWB-R group that
are not R packages (default: |
export_dir |
report export directory (default: ".") |
input_rmd |
default: system.file("extdata/reports/status_report.Rmd", package = "kwb.pkgstatus") |
creates html status report for R packages and returns the absolute path to the export directory
get_coverage
get_coverage( repo_full_name, codecov_token = Sys.getenv("CODECOV_TOKEN"), dbg = TRUE )
get_coverage( repo_full_name, codecov_token = Sys.getenv("CODECOV_TOKEN"), dbg = TRUE )
repo_full_name |
one combination of username/repo (e.g."KWB-R/kwb.db") |
codecov_token |
codecov authentication token (default: Sys.getenv("CODECOV_TOKEN")) |
dbg |
debug if TRUE (default: TRUE) |
codecov coverage in percent for provided repo_full_name
get_coverage
get_coverages( repo_full_names, codecov_token = Sys.getenv("CODECOV_TOKEN"), dbg = TRUE )
get_coverages( repo_full_names, codecov_token = Sys.getenv("CODECOV_TOKEN"), dbg = TRUE )
repo_full_names |
vector with combination of username/repo (e.g. c("KWB-R/kwb.utils", "KWB-R/kwb.db")) |
codecov_token |
zenodo authentication token (default: Sys.getenv("CODECOV_TOKEN") |
dbg |
debug if TRUE (default: TRUE) |
data.frame with coverage percent and url for all provided repo_full_names
get_github_repos
get_github_repos(group = "KWB-R", github_token = Sys.getenv("GITHUB_TOKEN"))
get_github_repos(group = "KWB-R", github_token = Sys.getenv("GITHUB_TOKEN"))
group |
username or organisation for Github (default: "KWB-R") |
github_token |
github access token (default: Sys.getenv("GITHUB_TOKEN")) |
data.frame with for all repositories of the user/organisation defined in parameter group (private repos will only be accessible if the token is configured to allow that)
get_gitlab_repos
get_gitlab_repos(group = "KWB-R", gitlab_token = Sys.getenv("GITLAB_TOKEN"))
get_gitlab_repos(group = "KWB-R", gitlab_token = Sys.getenv("GITLAB_TOKEN"))
group |
username or organisation for Gitlab (default: "KWB-R") |
gitlab_token |
gitlab access token (default: Sys.getenv("GITLAB_TOKEN")) |
data.frame with for all repositories of the user/organisation defined in parameter group (private repos will only be accessible if the token is configured to allow that)
Helper function: get_non_r_packages
get_non_r_packages()
get_non_r_packages()
returns vector with KWB-R repos on Github, which are not R packages
get_non_r_packages()
get_non_r_packages()
prepare_status_rpackages
prepare_status_rpackages( secrets_csv = NULL, non_r_packages = get_non_r_packages() )
prepare_status_rpackages( secrets_csv = NULL, non_r_packages = get_non_r_packages() )
secrets_csv |
path to "secrets.csv" file, if "NULL" Sys.env variables for the following services are used/need to be defined: APPVEYOR_TOKEN, GITHUB_TOKEN, GITLAB_TOKEN, CODECOV_TOKEN, ZENODO_TOKEN, (default: NULL) |
non_r_packages |
a character vector with repositories in KWB-R group that
are not R packages (default: |
data.frame with R package status information
Helper function for Zenodo
process_hitter_response(response)
process_hitter_response(response)
response |
response provided by httr::content() |
a tibble of available Zenodo data
url_success
url_success(url)
url_success(url)
url |
url of documentation website |
TRUE in case HTTP status code is 200, if not: FALSE
Zenodo: get available collections
zen_collections(n = 1000, access_token = Sys.getenv("ZENODO_TOKEN"))
zen_collections(n = 1000, access_token = Sys.getenv("ZENODO_TOKEN"))
n |
number of zenodo entries ("size") to return per API call (default: 1000) |
access_token |
Zenodo access token (default: Sys.getenv("ZENODO_TOKEN")) |
a tibble of available Zenodo data
https://developers.zenodo.org/#depositions