Skip to content

Commit 1e4f49d

Browse files
authored
Merge pull request #84 from KWB-R/dev
Release v0.1.8
2 parents c429bfd + 84033eb commit 1e4f49d

12 files changed

Lines changed: 110 additions & 22 deletions

DESCRIPTION

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
Package: kwb.pkgbuild
22
Title: R package for standardised development at KWB
3-
Version: 0.1.7
3+
Version: 0.1.8
44
Authors@R:
55
c(person(given = "Michael",
66
family = "Rustler",
77
role = c("aut", "cre"),
88
email = "michael.rustler@kompetenz-wasser.de",
99
comment = c(ORCID = "0000-0003-0647-7726")),
10-
person(given = "Kompetenzzentrum Wasser Berlin gGmbH (KWB)",
11-
role = "cph"),
1210
person(given = "Hauke",
1311
family = "Sonnenberg",
14-
role = "ctb",
12+
role = "aut",
1513
email = "hauke.sonnenberg@kompetenz-wasser.de",
16-
comment = c(comment = "0000-0001-9134-2871")))
14+
comment = c(ORCID = "0000-0001-9134-2871")),
15+
person(given = "FAKIN",
16+
role = "fnd"),
17+
person(given = "Kompetenzzentrum Wasser Berlin gGmbH (KWB)",
18+
role = "cph"))
1719
Description: Helper functions for automating R package development at KWB
18-
to a predefined style.
20+
to a predefined style.
1921
License: MIT + file LICENSE
2022
URL: https://github.com/KWB-R/kwb.pkgbuild
2123
BugReports: https://github.com/KWB-R/kwb.pkgbuild/issues
@@ -27,21 +29,21 @@ Imports:
2729
fs,
2830
httr,
2931
kwb.utils,
32+
magrittr,
3033
openssl,
31-
processx,
3234
pkgdown,
35+
processx,
3336
rematch2,
3437
sessioninfo,
3538
stringr,
3639
travis,
3740
usethis,
3841
withr,
39-
yaml,
40-
magrittr
42+
yaml
4143
Suggests:
4244
covr,
43-
kwb.orcid,
4445
knitr,
46+
kwb.orcid,
4547
rmarkdown,
4648
testthat
4749
VignetteBuilder:

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export(use_badge_ghactions)
2020
export(use_badge_ghactions_pkgdown)
2121
export(use_badge_ghactions_rcmdcheck)
2222
export(use_badge_lifecycle)
23+
export(use_badge_runiverse)
2324
export(use_badge_travis)
2425
export(use_codecov)
2526
export(use_description)

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# [kwb.pkgbuild 0.1.8](https://github.com/KWB-R/kwb.pkgbuild/releases/tag/v0.1.8) <small>2021-07-13</small>
2+
3+
* Add `use_badge_runiverse()` (for linking to [https://kwb-r.r-universe.dev](https://kwb-r.r-universe.dev))
4+
if package is available and use for `index.md` and `README.md`
5+
16
# [kwb.pkgbuild 0.1.7](https://github.com/KWB-R/kwb.pkgbuild/releases/tag/v0.1.7) <small>2021-02-23</small>
27

38
* Improve re-usability of Github Actions badges (for R package `kwb.pkgstatus`)

R/grammars.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,11 @@ grammars <- list(
5353
),
5454
mirror = list(
5555
url = "https://cran.<org>.org/package=<pkgname>"
56+
),
57+
runiverse = list(
58+
url_runiverse = "r-universe.dev",
59+
title = "R-Universe_Status_Badge",
60+
src = "https://<user>.<url_runiverse>/badges/<pkgname>",
61+
href = "https://<user>.<url_runiverse>/"
5662
)
5763
)

R/use_badges.R

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,23 @@ is_on_cran <- function(cran_link)
208208

209209
! errored && httr::status_code(x) == 200
210210
}
211+
212+
213+
# use_badge_runiverse ----------------------------------------------------------
214+
215+
#' Badge R-Universe
216+
#' @param repo name of repository (default: NULL)
217+
#' @param user user name or organisation under which repository defined in
218+
#' parameter "repo" is hosted (default: KWB-R")
219+
#' @return generates codecov badge link
220+
#' @export
221+
use_badge_runiverse <- function(repo = NULL, user = "KWB-R")
222+
{
223+
kwb.utils::resolve(
224+
"url",
225+
grammars$general,
226+
grammars$runiverse,
227+
user = tolower(user),
228+
pkgname = get_pkgname(repo)
229+
)
230+
}

R/use_index_md.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use_index_md <- function(
2323
use_badge_codecov(pkg$name, user, domain ),
2424
use_badge_lifecycle(stage),
2525
use_badge_cran(pkg$name),
26+
use_badge_runiverse(pkg$name),
2627
"",
2728
pkg$desc,
2829
"",

R/use_readme_md.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#' to [https://www.tidyverse.org/lifecycle/](https://www.tidyverse.org/lifecycle/),
99
#' valid arguments are: "experimental", "maturing", "stable", "retired",
1010
#' "archived", "dormant", "questioning"), (default: "experiment")
11-
#' @return generates travis badge link
11+
#' @return generates README.md
1212
#' @export
1313
#' @importFrom desc desc
1414

@@ -32,6 +32,7 @@ use_readme_md <- function(
3232
use_badge_codecov(pkg$name, user, domain ),
3333
use_badge_lifecycle(stage),
3434
use_badge_cran(pkg$name),
35+
use_badge_runiverse(pkg$name),
3536
"",
3637
sprintf("# %s", pkg$name),
3738
"",

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![codecov](https://codecov.io/github/KWB-R/kwb.pkgbuild/branch/master/graphs/badge.svg)](https://codecov.io/github/KWB-R/kwb.pkgbuild)
44
[![Project Status](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
55
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/kwb.pkgbuild)]()
6+
[![R-Universe_Status_Badge](https://kwb-r.r-universe.dev/badges/kwb.pkgbuild)](https://kwb-r.r-universe.dev/)
67
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3387180.svg)](https://doi.org/10.5281/zenodo.3387180)
78

89
# kwb.pkgbuild
@@ -12,9 +13,22 @@ to a predefined style.
1213

1314
## Installation
1415

16+
For details on how to install KWB-R packages checkout our [installation tutorial](https://kwb-r.github.io/kwb.pkgbuild/articles/install.html).
17+
1518
```r
16-
#install.packages("remotes", repos = "https://cloud.r-project.org")
17-
remotes::install_github("kwb-r/kwb.pkgbuild", INSTALL_opts = c('--no-multiarch'))
19+
### Optionally: specify GitHub Personal Access Token (GITHUB_PAT)
20+
### See here why this might be important for you:
21+
### https://kwb-r.github.io/kwb.pkgbuild/articles/install.html#set-your-github_pat
22+
23+
# Sys.setenv(GITHUB_PAT = "mysecret_access_token")
24+
25+
# Install package "remotes" from CRAN
26+
if (! require("remotes")) {
27+
install.packages("remotes", repos = "https://cloud.r-project.org")
28+
}
29+
30+
# Install KWB package 'kwb.pkgbuild' from GitHub
31+
remotes::install_github("KWB-R/kwb.pkgbuild")
1832
```
1933

2034
## Documentation

_pkgdown.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
authors:
22
Michael Rustler:
33
href: https://mrustl.de
4+
Hauke Sonnenberg:
5+
href: https://github.com/hsonne
6+
FAKIN:
7+
href: https://www.kompetenz-wasser.de/en/project/fakin/
8+
html: <img src='https://www.kompetenz-wasser.de/wp-content/uploads/2017/08/forschung-headerbild_fakin-2-1920x449.jpg'
9+
height='24' />
410
Kompetenzzentrum Wasser Berlin gGmbH (KWB):
5-
href: http://www.kompetenz-wasser.de
11+
href: https://www.kompetenz-wasser.de
612
html: <img src='http://www.kompetenz-wasser.de/wp-content/uploads/2017/08/cropped-logo-kwb_klein-new.png'
713
height='24' />
814
template:
915
params:
1016
bootswatch: cerulean
11-
docsearch:
17+
docsearch:
1218
api_key: d114e26fe8901b7b424d949906e60102
1319
index_name: kwb_pkgbuild
1420
development:

index.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
1-
[![Appveyor build Status](https://ci.appveyor.com/api/projects/status/fpwyt36kp3wfd4x4/branch/master?svg=true)](https://ci.appveyor.com/project/KWB-R/kwb-pkgbuild/branch/master)
2-
[![Travis build Status](https://travis-ci.com/KWB-R/kwb.pkgbuild.svg?branch=master)](https://travis-ci.com/KWB-R/kwb.pkgbuild)
1+
[![R-CMD-check](https://github.com/KWB-R/kwb.pkgbuild/workflows/R-CMD-check/badge.svg)](https://github.com/KWB-R/kwb.pkgbuild/actions?query=workflow%3AR-CMD-check)
2+
[![pkgdown](https://github.com/KWB-R/kwb.pkgbuild/workflows/pkgdown/badge.svg)](https://github.com/KWB-R/kwb.pkgbuild/actions?query=workflow%3Apkgdown)
33
[![codecov](https://codecov.io/github/KWB-R/kwb.pkgbuild/branch/master/graphs/badge.svg)](https://codecov.io/github/KWB-R/kwb.pkgbuild)
44
[![Project Status](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
55
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/kwb.pkgbuild)]()
6+
[![R-Universe_Status_Badge](https://kwb-r.r-universe.dev/badges/kwb.pkgbuild)](https://kwb-r.r-universe.dev/)
67
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3387180.svg)](https://doi.org/10.5281/zenodo.3387180)
78

8-
9-
109
Helper functions for automating R package development at KWB
1110
to a predefined style.
1211

1312
## Installation
1413

14+
For details on how to install KWB-R packages checkout our [installation tutorial](https://kwb-r.github.io/kwb.pkgbuild/articles/install.html).
15+
1516
```r
16-
#install.packages("remotes", repos = "https://cloud.r-project.org")
17-
remotes::install_github("kwb-r/kwb.pkgbuild", INSTALL_opts = c('--no-multiarch'))
17+
### Optionally: specify GitHub Personal Access Token (GITHUB_PAT)
18+
### See here why this might be important for you:
19+
### https://kwb-r.github.io/kwb.pkgbuild/articles/install.html#set-your-github_pat
20+
21+
# Sys.setenv(GITHUB_PAT = "mysecret_access_token")
22+
23+
# Install package "remotes" from CRAN
24+
if (! require("remotes")) {
25+
install.packages("remotes", repos = "https://cloud.r-project.org")
26+
}
27+
28+
# Install KWB package 'kwb.pkgbuild' from GitHub
29+
remotes::install_github("KWB-R/kwb.pkgbuild")
1830
```

0 commit comments

Comments
 (0)