Skip to content

Commit f7bb895

Browse files
authored
Merge pull request #2 from KWB-R/dev
Release v0.2.0
2 parents 771d8b7 + f151b95 commit f7bb895

31 files changed

+661
-166
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
^.*\.Rproj$
1111
^\.Rproj\.user$
1212
^index\.Rmd$
13+
^\.github$

.github/workflows/R-CMD-check.yaml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- main
6+
- dev
7+
pull_request:
8+
branches:
9+
- master
10+
- main
11+
- dev
12+
13+
name: R-CMD-check
14+
15+
jobs:
16+
R-CMD-check:
17+
runs-on: ${{ matrix.config.os }}
18+
19+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
config:
25+
- {os: macOS-latest, r: 'release'}
26+
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
27+
- {os: windows-latest, r: 'devel'}
28+
- {os: windows-latest, r: 'oldrel'}
29+
- {os: windows-latest, r: 'release'}
30+
31+
env:
32+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
33+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
34+
RSPM: ${{ matrix.config.rspm }}
35+
36+
steps:
37+
- uses: actions/checkout@v2
38+
39+
- uses: r-lib/actions/setup-r@master
40+
with:
41+
r-version: ${{ matrix.config.r }}
42+
43+
- uses: r-lib/actions/setup-pandoc@master
44+
45+
- name: Query dependencies
46+
run: |
47+
install.packages('remotes')
48+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
49+
shell: Rscript {0}
50+
51+
- name: Cache R packages
52+
if: runner.os != 'Windows'
53+
uses: actions/cache@v1
54+
with:
55+
path: ${{ env.R_LIBS_USER }}
56+
key: ${{ runner.os }}-r-${{ matrix.config.r }}-3-${{ hashFiles('depends.Rds') }}
57+
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-3-
58+
59+
- name: Install system dependencies
60+
if: runner.os == 'Linux'
61+
env:
62+
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
63+
run: |
64+
Rscript -e "remotes::install_github('r-hub/sysreqs')"
65+
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
66+
sudo -s eval "$sysreqs"
67+
- name: Install dependencies
68+
run: |
69+
remotes::install_deps(dependencies = TRUE)
70+
remotes::install_cran("rcmdcheck")
71+
shell: Rscript {0}
72+
73+
- name: Check
74+
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
75+
shell: Rscript {0}
76+
77+
- name: Upload check results
78+
if: failure()
79+
uses: actions/upload-artifact@master
80+
with:
81+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
82+
path: check

.github/workflows/pkgdown.yaml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
- dev
7+
8+
name: pkgdown
9+
10+
jobs:
11+
pkgdown:
12+
runs-on: windows-latest
13+
env:
14+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- uses: r-lib/actions/setup-r@master
19+
20+
- uses: r-lib/actions/setup-pandoc@master
21+
22+
- name: Query dependencies
23+
run: |
24+
install.packages('remotes')
25+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
26+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
27+
shell: Rscript {0}
28+
29+
- name: Cache R packages
30+
uses: actions/cache@v2
31+
with:
32+
path: ${{ env.R_LIBS_USER }}
33+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
34+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
35+
36+
- name: Install dependencies
37+
run: |
38+
remotes::install_deps(dependencies = TRUE)
39+
install.packages("pkgdown", type = "binary")
40+
shell: Rscript {0}
41+
42+
- name: Install package
43+
run: R CMD INSTALL .
44+
shell: cmd
45+
46+
- name: Deploy package
47+
run: |
48+
git config --local user.email "actions@github.com"
49+
git config --local user.name "GitHub Actions"
50+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.github/workflows/pr-commands.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
on:
2+
issue_comment:
3+
types: [created]
4+
name: Commands
5+
jobs:
6+
document:
7+
if: startsWith(github.event.comment.body, '/document')
8+
name: document
9+
runs-on: macOS-latest
10+
env:
11+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: r-lib/actions/pr-fetch@master
15+
with:
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
- uses: r-lib/actions/setup-r@master
18+
- name: Install dependencies
19+
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
20+
- name: Document
21+
run: Rscript -e 'roxygen2::roxygenise()'
22+
- name: commit
23+
run: |
24+
git add man/\* NAMESPACE
25+
git commit -m 'Document'
26+
- uses: r-lib/actions/pr-push@master
27+
with:
28+
repo-token: ${{ secrets.GITHUB_TOKEN }}
29+
style:
30+
if: startsWith(github.event.comment.body, '/style')
31+
name: style
32+
runs-on: macOS-latest
33+
env:
34+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
35+
steps:
36+
- uses: actions/checkout@v2
37+
- uses: r-lib/actions/pr-fetch@master
38+
with:
39+
repo-token: ${{ secrets.GITHUB_TOKEN }}
40+
- uses: r-lib/actions/setup-r@master
41+
- name: Install dependencies
42+
run: Rscript -e 'install.packages("styler")'
43+
- name: Style
44+
run: Rscript -e 'styler::style_pkg()'
45+
- name: commit
46+
run: |
47+
git add \*.R
48+
git commit -m 'Style'
49+
- uses: r-lib/actions/pr-push@master
50+
with:
51+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-coverage.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- main
6+
pull_request:
7+
branches:
8+
- master
9+
- main
10+
11+
name: test-coverage
12+
13+
jobs:
14+
test-coverage:
15+
runs-on: windows-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- uses: r-lib/actions/setup-r@master
22+
23+
- uses: r-lib/actions/setup-pandoc@master
24+
25+
- name: Query dependencies
26+
run: |
27+
install.packages('remotes')
28+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
29+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
30+
shell: Rscript {0}
31+
32+
- name: Cache R packages
33+
uses: actions/cache@v1
34+
with:
35+
path: ${{ env.R_LIBS_USER }}
36+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
37+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
38+
39+
- name: Install dependencies
40+
run: |
41+
install.packages(c("remotes"))
42+
remotes::install_deps(dependencies = TRUE)
43+
remotes::install_cran("covr")
44+
shell: Rscript {0}
45+
46+
- name: Test coverage
47+
run: covr::codecov()
48+
shell: Rscript {0}

.travis.yml

-19
This file was deleted.

DESCRIPTION

+16-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
Package: kwb.geosalz
2-
Title: R Package for Documenting Workflow Used in Project
3-
"geosalz"
4-
Version: 0.1.0
5-
Authors@R:
6-
c(person(given = "Michael",
7-
family = "Rustler",
8-
role = c("aut", "cre"),
9-
email = "michael.rustler@kompetenz-wasser.de",
10-
comment = c(ORCID = "0000-0003-0647-7726")),
11-
person(given = "Hauke",
12-
family = "Sonnenberg",
13-
role = "ctb",
14-
email = "hauke.sonnenberg@kompetenz-wasser.de",
15-
comment = c(ORCID = "0000-0001-9134-2871")),
16-
person(given = "Kompetenzzentrum Wasser Berlin gGmbH (KWB)",
17-
role = "cph"))
18-
Description: R Package for Documenting Workflow Used in Project
19-
"geosalz".
2+
Title: R Package for Documenting Workflow Used in Project "geosalz"
3+
Version: 0.2.0
4+
Authors@R: c(
5+
person("Michael", "Rustler", , "michael.rustler@kompetenz-wasser.de", role = c("aut", "cre"),
6+
comment = c(ORCID = "0000-0003-0647-7726")),
7+
person("Hauke", "Sonnenberg", , "hauke.sonnenberg@kompetenz-wasser.de", role = "ctb",
8+
comment = c(ORCID = "0000-0001-9134-2871")),
9+
person("GeoSalz", role = "fnd"),
10+
person("Kompetenzzentrum Wasser Berlin gGmbH (KWB)", role = "cph")
11+
)
12+
Description: R Package for Documenting Workflow Used in Project "geosalz".
2013
License: MIT + file LICENSE
2114
URL: https://github.com/KWB-R/kwb.geosalz
2215
BugReports: https://github.com/KWB-R/kwb.geosalz/issues
@@ -32,19 +25,20 @@ Imports:
3225
readxl (>= 1.2.0),
3326
rlang (>= 0.3.1),
3427
stringr (>= 1.4.0),
35-
tidyr (>= 0.8.2)
28+
tidyr (>= 0.8.2),
29+
tidyselect (>= 1.1.2)
3630
Suggests:
3731
covr (>= 3.2.1),
3832
ggplot2 (>= 3.1.0),
3933
knitr (>= 1.21),
4034
rmarkdown (>= 1.11),
41-
tibble (>= 2.0.1),
42-
sessioninfo (>= 1.1.1)
35+
sessioninfo (>= 1.1.1),
36+
tibble (>= 2.0.1)
4337
VignetteBuilder:
4438
knitr
4539
Remotes:
4640
github::KWB-R/kwb.utils
4741
ByteCompile: true
4842
Encoding: UTF-8
4943
LazyData: true
50-
RoxygenNote: 6.1.1
44+
RoxygenNote: 7.1.2

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
Copyright (c) 2018 Kompetenzzentrum Wasser Berlin gGmbH (KWB)
3+
Copyright (c) 2018-2022 Kompetenzzentrum Wasser Berlin gGmbH (KWB)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
Copyright (c) 2018 Kompetenzzentrum Wasser Berlin gGmbH (KWB)
3+
Copyright (c) 2018-2022 Kompetenzzentrum Wasser Berlin gGmbH (KWB)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

NAMESPACE

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export(gather_ignore)
1010
export(gather_ignore_clean)
1111
export(get_excelcnv_exe)
1212
export(get_foerdermengen)
13+
export(get_foerdermengen_gal_fri)
1314
export(get_parameters_meta)
1415
export(get_site_id)
1516
export(import_labor)
@@ -26,6 +27,8 @@ importFrom(crayon,green)
2627
importFrom(crayon,red)
2728
importFrom(data.table,rbindlist)
2829
importFrom(dplyr,left_join)
30+
importFrom(dplyr,mutate)
31+
importFrom(dplyr,relocate)
2932
importFrom(fs,dir_create)
3033
importFrom(fs,file_copy)
3134
importFrom(janitor,clean_names)
@@ -44,9 +47,12 @@ importFrom(stats,setNames)
4447
importFrom(stringr,str_c)
4548
importFrom(stringr,str_detect)
4649
importFrom(stringr,str_extract)
50+
importFrom(stringr,str_remove)
4751
importFrom(stringr,str_sub)
4852
importFrom(stringr,str_to_upper)
4953
importFrom(tidyr,gather_)
54+
importFrom(tidyr,pivot_longer)
55+
importFrom(tidyselect,starts_with)
5056
importFrom(utils,capture.output)
5157
importFrom(utils,read.csv)
5258
importFrom(utils,str)

NEWS.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# [kwb.geosalz 0.2.0](https://github.com/KWB-R/kwb.geosalz/releases/tag/v0.2.0) <small>2022-06-01</small>
2+
3+
* Add `get_foerdermengen_gal_fri()` for getting annual abstraction values of
4+
well field galeries for waterworks Friedrichshagen
5+
6+
* Add workflow [Data Availability WW Friedrichshagen](../articles/data-availability_fri.html) checking available data
7+
from pre-project phase (see: [workflow](../articles/workflow.html) article)
8+
19
# [kwb.geosalz 0.1.0](https://github.com/KWB-R/kwb.geosalz/releases/tag/v0.1.0) <small>2019-02-13</small>
210

311
* Release on Zenodo [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2563870.svg)](https://doi.org/10.5281/zenodo.2563870)

0 commit comments

Comments
 (0)