Skip to content

Commit

Permalink
Merge pull request #8 from KWB-R/dev
Browse files Browse the repository at this point in the history
Release v0.6.0
  • Loading branch information
mrustl authored Jul 7, 2021
2 parents 5e6b039 + 8ff3647 commit 358aa98
Show file tree
Hide file tree
Showing 26 changed files with 427 additions and 202 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ LICENSE\.md$
.gitlab-ci.yml
^index\.md$
^\.travis\.yml$
^\.github$
81 changes: 81 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
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:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@master

- 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@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
49 changes: 49 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
branches:
- main
- master
- dev

name: pkgdown

jobs:
pkgdown:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master

- uses: r-lib/actions/setup-pandoc@master

- 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 .

- name: Deploy package
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
51 changes: 51 additions & 0 deletions .github/workflows/pr-commands.yaml
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 }}
48 changes: 48 additions & 0 deletions .github/workflows/test-coverage.yaml
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: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@master

- uses: r-lib/actions/setup-pandoc@master

- 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}
10 changes: 0 additions & 10 deletions .gitlab-ci.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

43 changes: 22 additions & 21 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
Package: kwb.db
Version: 0.5.0
Title: Functions supporting data base access
Description: This package contains some useful functions, especially for
simplifying data transfer between MS Access databases and R. With the
functions of this package it is not needed any more to open and close a
database connection explicitely; this is done 'behind the scenes' in the
functions. Instead of a database connection the path to the database file
needs to be passed to the functions as an argument. The main functions are
hsGetTable and hsPutTable which transfer data from an MS Access database to
a data frame in R and save data from a data frame in R into a table in an MS
Access database, respectively. Take care when getting time series data from
an MS Access database, see therefore hsMdbTimeSeries. Use hsTables to get a
list of tables that are available in a database and hsFields to get a list
of table fields that are contained in a database table.
Version: 0.6.0
Authors@R:
c(person(given = "Hauke",
family = "Sonnenberg",
Expand All @@ -26,6 +14,22 @@ Authors@R:
comment = "0000-0003-0647-7726"),
person(given = "Kompetenzzentrum Wasser Berlin gGmbH",
role = "cph"))
Description: This package contains some useful functions, especially for
simplifying data transfer between MS Access databases and R. With the
functions of this package it is not needed any more to open and close
a database connection explicitely; this is done 'behind the scenes' in
the functions. Instead of a database connection the path to the
database file needs to be passed to the functions as an argument. The
main functions are hsGetTable and hsPutTable which transfer data from
an MS Access database to a data frame in R and save data from a data
frame in R into a table in an MS Access database, respectively. Take
care when getting time series data from an MS Access database, see
therefore hsMdbTimeSeries. Use hsTables to get a list of tables that
are available in a database and hsFields to get a list of table fields
that are contained in a database table.
License: MIT + file LICENSE
URL: https://github.com/KWB-R/kwb.db
BugReports: https://github.com/KWB-R/kwb.db/issues
Imports:
kwb.datetime (>= 0.4.0),
kwb.utils (>= 0.4.4),
Expand All @@ -34,12 +38,9 @@ Imports:
Suggests:
testthat (>= 2.2.1)
Remotes:
github::kwb-r/kwb.datetime,
github::kwb-r/kwb.utils,
github::hsonne/odbc32@r3.0.0,
github::cran/RODBC@1.3-16
github::cran/RODBC@1.3-16,
github::hsonne/odbc32@r3.0.0,
github::kwb-r/kwb.datetime,
github::kwb-r/kwb.utils
Encoding: UTF-8
License: MIT + file LICENSE
RoxygenNote: 7.1.0
URL: https://github.com/KWB-R/kwb.db
BugReports: https://github.com/KWB-R/kwb.db/issues
RoxygenNote: 7.1.1
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2014-2019 Kompetenzzentrum Wasser Berlin gGmbH (KWB)
Copyright (c) 2014-2021 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
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2014-2019 Kompetenzzentrum Wasser Berlin gGmbH (KWB)
Copyright (c) 2014-2021 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
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export(currentDb)
export(dataFrameToSqlTuples)
export(dumpDatabase)
export(getCurrentSqlDialect)
export(getDatabaseFieldInfo)
export(getNamedExcelRanges)
export(hsClearTable)
export(hsCloseMdb)
Expand Down
30 changes: 0 additions & 30 deletions NEWS

This file was deleted.

Loading

0 comments on commit 358aa98

Please sign in to comment.