-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialise package with kwb.pkgbuild
- Loading branch information
0 parents
commit a9a213b
Showing
16 changed files
with
442 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
^LICENSE\.md$ | ||
^_pkgdown\.yml$ | ||
^docs$ | ||
^pkgdown$ | ||
^\.github$ | ||
^codecov\.yml$ | ||
^index\.md$ | ||
^README\.md$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
- dev | ||
|
||
name: R-CMD-check | ||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: macOS-latest, r: 'release'} | ||
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | ||
- {os: windows-latest, r: 'devel'} | ||
- {os: windows-latest, r: 'oldrel'} | ||
- {os: windows-latest, r: 'release'} | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | ||
RSPM: ${{ matrix.config.rspm }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- name: Query dependencies | ||
run: | | ||
install.packages('remotes') | ||
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2) | ||
shell: Rscript {0} | ||
|
||
- name: Cache R packages | ||
if: runner.os != 'Windows' | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ runner.os }}-r-${{ matrix.config.r }}-3-${{ hashFiles('depends.Rds') }} | ||
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-3- | ||
|
||
- name: Install system dependencies | ||
if: runner.os == 'Linux' | ||
env: | ||
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc | ||
run: | | ||
Rscript -e "remotes::install_github('r-hub/sysreqs')" | ||
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") | ||
sudo -s eval "$sysreqs" | ||
- name: Install dependencies | ||
run: | | ||
remotes::install_deps(dependencies = TRUE) | ||
remotes::install_cran("rcmdcheck") | ||
shell: Rscript {0} | ||
|
||
- name: Check | ||
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check") | ||
shell: Rscript {0} | ||
|
||
- name: Upload check results | ||
if: failure() | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | ||
path: check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- dev | ||
|
||
name: pkgdown | ||
|
||
jobs: | ||
pkgdown: | ||
runs-on: windows-latest | ||
env: | ||
CURL_SSL_BACKEND: "openssl" | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- name: Query dependencies | ||
run: | | ||
install.packages('remotes') | ||
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | ||
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") | ||
shell: Rscript {0} | ||
|
||
- name: Cache R packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- | ||
|
||
- name: Install dependencies | ||
run: | | ||
remotes::install_deps(dependencies = TRUE) | ||
install.packages("pkgdown", type = "binary") | ||
shell: Rscript {0} | ||
|
||
- name: Install package | ||
run: R CMD INSTALL . | ||
shell: cmd | ||
|
||
- name: Deploy package | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Actions" | ||
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
on: | ||
issue_comment: | ||
types: [created] | ||
name: Commands | ||
jobs: | ||
document: | ||
if: startsWith(github.event.comment.body, '/document') | ||
name: document | ||
runs-on: macOS-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: r-lib/actions/pr-fetch@master | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: r-lib/actions/setup-r@master | ||
- name: Install dependencies | ||
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)' | ||
- name: Document | ||
run: Rscript -e 'roxygen2::roxygenise()' | ||
- name: commit | ||
run: | | ||
git add man/\* NAMESPACE | ||
git commit -m 'Document' | ||
- uses: r-lib/actions/pr-push@master | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
style: | ||
if: startsWith(github.event.comment.body, '/style') | ||
name: style | ||
runs-on: macOS-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: r-lib/actions/pr-fetch@master | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: r-lib/actions/setup-r@master | ||
- name: Install dependencies | ||
run: Rscript -e 'install.packages("styler")' | ||
- name: Style | ||
run: Rscript -e 'styler::style_pkg()' | ||
- name: commit | ||
run: | | ||
git add \*.R | ||
git commit -m 'Style' | ||
- uses: r-lib/actions/pr-push@master | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
|
||
name: test-coverage | ||
|
||
jobs: | ||
test-coverage: | ||
runs-on: windows-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- name: Query dependencies | ||
run: | | ||
install.packages('remotes') | ||
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | ||
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") | ||
shell: Rscript {0} | ||
|
||
- name: Cache R packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- | ||
|
||
- name: Install dependencies | ||
run: | | ||
install.packages(c("remotes")) | ||
remotes::install_deps(dependencies = TRUE) | ||
remotes::install_cran("covr") | ||
shell: Rscript {0} | ||
|
||
- name: Test coverage | ||
run: covr::codecov() | ||
shell: Rscript {0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Package: kwb.rect | ||
Title: R Package for Plotting Rectangles | ||
Version: 0.0.0.9000 | ||
Authors@R: c( | ||
person("Hauke", "Sonnenberg", , "[email protected]", role = c("aut", "cre"), | ||
comment = c(ORCID = "0000-0001-9134-2871")), | ||
person("Kompetenzzentrum Wasser Berlin gGmbH (KWB)", role = "cph") | ||
) | ||
Description: This package provides functions to define and plot | ||
rectangles, e.g. to plot rectangles side-by-side or on top of each | ||
other. | ||
License: MIT + file LICENSE | ||
URL: https://github.com/KWB-R/kwb.rect | ||
BugReports: https://github.com/KWB-R/kwb.rect/issues | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.3.1 | ||
Suggests: | ||
covr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
YEAR: 2024 | ||
COPYRIGHT HOLDER: Kompetenzzentrum Wasser Berlin gGmbH (KWB) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# MIT License | ||
|
||
Copyright (c) 2024 Kompetenzzentrum Wasser Berlin gGmbH (KWB) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# kwb.rect 0.0.0.9000 | ||
|
||
* Added a `NEWS.md` file to track changes to the package. | ||
|
||
* see https://style.tidyverse.org/news.html for writing a good `NEWS.md` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[![R-CMD-check](https://github.com/KWB-R/kwb.rect/workflows/R-CMD-check/badge.svg)](https://github.com/KWB-R/kwb.rect/actions?query=workflow%3AR-CMD-check) | ||
[![pkgdown](https://github.com/KWB-R/kwb.rect/workflows/pkgdown/badge.svg)](https://github.com/KWB-R/kwb.rect/actions?query=workflow%3Apkgdown) | ||
[![codecov](https://codecov.io/github/KWB-R/kwb.rect/branch/main/graphs/badge.svg)](https://codecov.io/github/KWB-R/kwb.rect) | ||
[![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.rect)]() | ||
[![R-Universe_Status_Badge](https://kwb-r.r-universe.dev/badges/kwb.rect)](https://kwb-r.r-universe.dev/) | ||
|
||
# kwb.rect | ||
|
||
This package provides functions to define and plot | ||
rectangles, e.g. to plot rectangles side-by-side or on top of each | ||
other. | ||
|
||
## 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 | ||
### 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.rect' from GitHub | ||
remotes::install_github("KWB-R/kwb.rect") | ||
``` | ||
|
||
## Documentation | ||
|
||
Release: [https://kwb-r.github.io/kwb.rect](https://kwb-r.github.io/kwb.rect) | ||
|
||
Development: [https://kwb-r.github.io/kwb.rect/dev](https://kwb-r.github.io/kwb.rect/dev) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
url: https://kwb-r.github.io/kwb.rect | ||
authors: | ||
Hauke Sonnenberg: | ||
href: ~ | ||
Kompetenzzentrum Wasser Berlin gGmbH (KWB): | ||
href: http://www.kompetenz-wasser.de | ||
html: <img src='https://publications.kompetenz-wasser.de/img/KWB-Logo.svg' alt='KWB' | ||
width='72' /> | ||
template: | ||
bootstrap: 5 | ||
bootswatch: cerulean | ||
bslib: | ||
bg: '#ffffff' | ||
fg: '#000000' | ||
primary: '#007aff' | ||
border-radius: 0.5rem | ||
btn-border-radius: 0.25rem | ||
development: | ||
mode: auto | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
comment: false | ||
|
||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: auto | ||
threshold: 1% | ||
informational: true | ||
patch: | ||
default: | ||
target: auto | ||
threshold: 1% | ||
informational: true |
Oops, something went wrong.