Skip to content

Commit

Permalink
Merge pull request #84 from KWB-R/dev
Browse files Browse the repository at this point in the history
Release v0.1.8
  • Loading branch information
mrustl authored Jul 12, 2021
2 parents c429bfd + 84033eb commit 1e4f49d
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 22 deletions.
22 changes: 12 additions & 10 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
Package: kwb.pkgbuild
Title: R package for standardised development at KWB
Version: 0.1.7
Version: 0.1.8
Authors@R:
c(person(given = "Michael",
family = "Rustler",
role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0003-0647-7726")),
person(given = "Kompetenzzentrum Wasser Berlin gGmbH (KWB)",
role = "cph"),
person(given = "Hauke",
family = "Sonnenberg",
role = "ctb",
role = "aut",
email = "[email protected]",
comment = c(comment = "0000-0001-9134-2871")))
comment = c(ORCID = "0000-0001-9134-2871")),
person(given = "FAKIN",
role = "fnd"),
person(given = "Kompetenzzentrum Wasser Berlin gGmbH (KWB)",
role = "cph"))
Description: Helper functions for automating R package development at KWB
to a predefined style.
to a predefined style.
License: MIT + file LICENSE
URL: https://github.com/KWB-R/kwb.pkgbuild
BugReports: https://github.com/KWB-R/kwb.pkgbuild/issues
Expand All @@ -27,21 +29,21 @@ Imports:
fs,
httr,
kwb.utils,
magrittr,
openssl,
processx,
pkgdown,
processx,
rematch2,
sessioninfo,
stringr,
travis,
usethis,
withr,
yaml,
magrittr
yaml
Suggests:
covr,
kwb.orcid,
knitr,
kwb.orcid,
rmarkdown,
testthat
VignetteBuilder:
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export(use_badge_ghactions)
export(use_badge_ghactions_pkgdown)
export(use_badge_ghactions_rcmdcheck)
export(use_badge_lifecycle)
export(use_badge_runiverse)
export(use_badge_travis)
export(use_codecov)
export(use_description)
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# [kwb.pkgbuild 0.1.8](https://github.com/KWB-R/kwb.pkgbuild/releases/tag/v0.1.8) <small>2021-07-13</small>

* Add `use_badge_runiverse()` (for linking to [https://kwb-r.r-universe.dev](https://kwb-r.r-universe.dev))
if package is available and use for `index.md` and `README.md`

# [kwb.pkgbuild 0.1.7](https://github.com/KWB-R/kwb.pkgbuild/releases/tag/v0.1.7) <small>2021-02-23</small>

* Improve re-usability of Github Actions badges (for R package `kwb.pkgstatus`)
Expand Down
6 changes: 6 additions & 0 deletions R/grammars.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,11 @@ grammars <- list(
),
mirror = list(
url = "https://cran.<org>.org/package=<pkgname>"
),
runiverse = list(
url_runiverse = "r-universe.dev",
title = "R-Universe_Status_Badge",
src = "https://<user>.<url_runiverse>/badges/<pkgname>",
href = "https://<user>.<url_runiverse>/"
)
)
20 changes: 20 additions & 0 deletions R/use_badges.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,23 @@ is_on_cran <- function(cran_link)

! errored && httr::status_code(x) == 200
}


# use_badge_runiverse ----------------------------------------------------------

#' Badge R-Universe
#' @param repo name of repository (default: NULL)
#' @param user user name or organisation under which repository defined in
#' parameter "repo" is hosted (default: KWB-R")
#' @return generates codecov badge link
#' @export
use_badge_runiverse <- function(repo = NULL, user = "KWB-R")
{
kwb.utils::resolve(
"url",
grammars$general,
grammars$runiverse,
user = tolower(user),
pkgname = get_pkgname(repo)
)
}
1 change: 1 addition & 0 deletions R/use_index_md.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use_index_md <- function(
use_badge_codecov(pkg$name, user, domain ),
use_badge_lifecycle(stage),
use_badge_cran(pkg$name),
use_badge_runiverse(pkg$name),
"",
pkg$desc,
"",
Expand Down
3 changes: 2 additions & 1 deletion R/use_readme_md.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' to [https://www.tidyverse.org/lifecycle/](https://www.tidyverse.org/lifecycle/),
#' valid arguments are: "experimental", "maturing", "stable", "retired",
#' "archived", "dormant", "questioning"), (default: "experiment")
#' @return generates travis badge link
#' @return generates README.md
#' @export
#' @importFrom desc desc

Expand All @@ -32,6 +32,7 @@ use_readme_md <- function(
use_badge_codecov(pkg$name, user, domain ),
use_badge_lifecycle(stage),
use_badge_cran(pkg$name),
use_badge_runiverse(pkg$name),
"",
sprintf("# %s", pkg$name),
"",
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![codecov](https://codecov.io/github/KWB-R/kwb.pkgbuild/branch/master/graphs/badge.svg)](https://codecov.io/github/KWB-R/kwb.pkgbuild)
[![Project Status](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/kwb.pkgbuild)]()
[![R-Universe_Status_Badge](https://kwb-r.r-universe.dev/badges/kwb.pkgbuild)](https://kwb-r.r-universe.dev/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3387180.svg)](https://doi.org/10.5281/zenodo.3387180)

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

## Installation

For details on how to install KWB-R packages checkout our [installation tutorial](https://kwb-r.github.io/kwb.pkgbuild/articles/install.html).

```r
#install.packages("remotes", repos = "https://cloud.r-project.org")
remotes::install_github("kwb-r/kwb.pkgbuild", INSTALL_opts = c('--no-multiarch'))
### Optionally: specify GitHub Personal Access Token (GITHUB_PAT)
### See here why this might be important for you:
### https://kwb-r.github.io/kwb.pkgbuild/articles/install.html#set-your-github_pat

# Sys.setenv(GITHUB_PAT = "mysecret_access_token")

# Install package "remotes" from CRAN
if (! require("remotes")) {
install.packages("remotes", repos = "https://cloud.r-project.org")
}

# Install KWB package 'kwb.pkgbuild' from GitHub
remotes::install_github("KWB-R/kwb.pkgbuild")
```

## Documentation
Expand Down
10 changes: 8 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
authors:
Michael Rustler:
href: https://mrustl.de
Hauke Sonnenberg:
href: https://github.com/hsonne
FAKIN:
href: https://www.kompetenz-wasser.de/en/project/fakin/
html: <img src='https://www.kompetenz-wasser.de/wp-content/uploads/2017/08/forschung-headerbild_fakin-2-1920x449.jpg'
height='24' />
Kompetenzzentrum Wasser Berlin gGmbH (KWB):
href: http://www.kompetenz-wasser.de
href: https://www.kompetenz-wasser.de
html: <img src='http://www.kompetenz-wasser.de/wp-content/uploads/2017/08/cropped-logo-kwb_klein-new.png'
height='24' />
template:
params:
bootswatch: cerulean
docsearch:
docsearch:
api_key: d114e26fe8901b7b424d949906e60102
index_name: kwb_pkgbuild
development:
Expand Down
24 changes: 18 additions & 6 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
[![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)
[![Travis build Status](https://travis-ci.com/KWB-R/kwb.pkgbuild.svg?branch=master)](https://travis-ci.com/KWB-R/kwb.pkgbuild)
[![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)
[![pkgdown](https://github.com/KWB-R/kwb.pkgbuild/workflows/pkgdown/badge.svg)](https://github.com/KWB-R/kwb.pkgbuild/actions?query=workflow%3Apkgdown)
[![codecov](https://codecov.io/github/KWB-R/kwb.pkgbuild/branch/master/graphs/badge.svg)](https://codecov.io/github/KWB-R/kwb.pkgbuild)
[![Project Status](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/kwb.pkgbuild)]()
[![R-Universe_Status_Badge](https://kwb-r.r-universe.dev/badges/kwb.pkgbuild)](https://kwb-r.r-universe.dev/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3387180.svg)](https://doi.org/10.5281/zenodo.3387180)



Helper functions for automating R package development at KWB
to a predefined style.

## Installation

For details on how to install KWB-R packages checkout our [installation tutorial](https://kwb-r.github.io/kwb.pkgbuild/articles/install.html).

```r
#install.packages("remotes", repos = "https://cloud.r-project.org")
remotes::install_github("kwb-r/kwb.pkgbuild", INSTALL_opts = c('--no-multiarch'))
### Optionally: specify GitHub Personal Access Token (GITHUB_PAT)
### See here why this might be important for you:
### https://kwb-r.github.io/kwb.pkgbuild/articles/install.html#set-your-github_pat

# Sys.setenv(GITHUB_PAT = "mysecret_access_token")

# Install package "remotes" from CRAN
if (! require("remotes")) {
install.packages("remotes", repos = "https://cloud.r-project.org")
}

# Install KWB package 'kwb.pkgbuild' from GitHub
remotes::install_github("KWB-R/kwb.pkgbuild")
```
20 changes: 20 additions & 0 deletions man/use_badge_runiverse.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/use_readme_md.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1e4f49d

Please sign in to comment.