Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Release v0.3.0 #2

Merged
merged 143 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
f954a80
Update Rd files
hsonne Jun 30, 2022
a9b3062
Use non-deprecated function
hsonne Jun 30, 2022
9ec7eca
Cosmetics, let if () set variable to NULL
hsonne Jul 1, 2022
75ba017
Add new version of getInspectionHeaderInfo()
hsonne Jul 1, 2022
a1087da
Extract readObservationsFromCsvText()
hsonne Jul 1, 2022
9702b3f
Use new function to get read inspection headers
hsonne Jul 1, 2022
9bcf146
Use new function to read observation data
hsonne Jul 1, 2022
fec0fbc
Use kwb.utils::isTryError()
hsonne Jul 28, 2022
320ce55
Add arg "dbg" to getInspectionsFromEuLines()
hsonne Jul 28, 2022
73df1d5
Check and adapt arg "colClasses" if given
hsonne Jul 28, 2022
32ed19b
Set "colClasses" according to expected types
hsonne Jul 28, 2022
2ef0fad
Remove empty records from table of observations
hsonne Jul 28, 2022
53ed267
Update NAMESPACE and Roxygen version
hsonne Jul 28, 2022
5f69a14
Add last "to" position if there is not last #Z
hsonne Jul 28, 2022
10cb238
Add getLineDamageInfo() from kwb.rerau
hsonne Aug 1, 2022
a19a84f
Use kwb.utils::orderBy(), renumbering rows
hsonne Aug 1, 2022
538b5e1
Rename file according to contained function
hsonne Aug 2, 2022
c5582c6
Reindent to improve readability
hsonne Aug 2, 2022
bb531bb
Update Rd files (consider file renaming)
hsonne Aug 2, 2022
9e0abca
Clean readAndMergeEuCodedFiles()
hsonne Aug 2, 2022
b22b2c4
Add simple test for mergeInspectionData()
hsonne Aug 2, 2022
133416d
Return early in asNumericIfRequired()
hsonne Aug 2, 2022
523e95a
Improve output of warnOnDifferingHeaders()
hsonne Aug 2, 2022
3c1dba4
Allow "table" to be a vector of table names
hsonne Aug 2, 2022
fab53b3
Simplify get_code_meanings()
hsonne Aug 2, 2022
f38b650
Simply use writeLines()
hsonne Aug 2, 2022
26e98f0
Move functions from main.R to utils.R
hsonne Aug 2, 2022
12756fb
Use "L" to indicate integer constant
hsonne Aug 2, 2022
c06aaa2
Move removeEmptyLines() to utils.R
hsonne Aug 2, 2022
e09f59a
Reindent
hsonne Aug 2, 2022
9788bea
Use "L" as indicator for integer, return early
hsonne Aug 2, 2022
fad8231
Rename import.R to readEuCodedFiles.R
hsonne Aug 2, 2022
411a83d
Use kwb.utils::orderBy()
hsonne Aug 2, 2022
783a938
Rename get_code_meanings() to getCodeMeanings()
hsonne Aug 2, 2022
cbd4fa3
Clean export.R
hsonne Aug 2, 2022
6ef008d
Rename export.R to writeEuCodedFiles.R
hsonne Aug 3, 2022
3a077bb
Rename N to n_inspections
hsonne Aug 3, 2022
3c9b456
Move functions to extra files
hsonne Aug 3, 2022
9e4bb15
Add toEuFormat()
hsonne Aug 3, 2022
0295fe9
Clean toEuFormat.R, improve names
hsonne Aug 3, 2022
9a3b19e
Remove old code that was commented out
hsonne Aug 4, 2022
2b84e2f
Test writeEuCodedFile(), add/pass "dbg" arg
hsonne Aug 4, 2022
32d86e7
Add getExampleData(), getExampleFile()
hsonne Aug 4, 2022
66a48c1
Update Rd files
hsonne Aug 4, 2022
0517436
Make all tests pass, silently.
hsonne Aug 4, 2022
d68b1c1
Rename columns via new arg "short.names"
hsonne Aug 4, 2022
7cd112f
Optionally add globally unique inspection ID
hsonne Aug 4, 2022
7ff4e78
Add arg "project", stop if required but missing
hsonne Aug 4, 2022
3cca31e
Use lower case "project" instead of "Project"
hsonne Aug 4, 2022
6780bce
Move functions from main.R to separate files
hsonne Aug 4, 2022
b5e502c
Move readEuCodedFile() to its own file
hsonne Aug 4, 2022
b66bd88
Clean removeEmptyLines()
hsonne Aug 4, 2022
bb0760c
Add getFileHeaderFromEuLines(), replacing two
hsonne Aug 4, 2022
c4bb554
Shorten code in getFileHeaderFromEuLines
hsonne Aug 4, 2022
069924c
Refactor readEuCodedFile()
hsonne Aug 4, 2022
bb12ff0
Replace arg short.names with meaningful.names
hsonne Aug 4, 2022
6c215dc
Move and rename functions
hsonne Aug 4, 2022
a081b4d
Replace arg "getInfo" with "version"
hsonne Aug 4, 2022
5bebb93
Improve names, use intermediate variable
hsonne Aug 4, 2022
32806d8
Move function to its own file, rename files
hsonne Aug 4, 2022
c694b7b
Fix :bug:: Consider variable renaming
hsonne Aug 5, 2022
fc55347
Move two versions of functions into two files
hsonne Aug 5, 2022
3d9db6a
Use "L" for integer constants
hsonne Aug 8, 2022
84a6e2c
Use nzchar(), add commented microbenchmark code
hsonne Aug 8, 2022
14817d0
Rename arg "quoteCharacter" to "quote"
hsonne Aug 8, 2022
2bee26f
Clean toEuFormat_v1()
hsonne Aug 8, 2022
82df3dc
Pass "dbg" to removeEmptyLines()
hsonne Dec 6, 2022
32bb7e2
Add material codes (Table C.4), save as UTF-8
hsonne Dec 6, 2022
9dbd8b0
Add English material names
hsonne Dec 6, 2022
d32105c
Update RoxygenNote in DESCRIPTION
hsonne Sep 11, 2023
888b60d
Stop if columns required for id are missing
hsonne Sep 11, 2023
9f0689f
Create time "on the fly" if time column missing
hsonne Sep 11, 2023
ed99f94
Run kwb.pkgbuild::use_ghactions()
hsonne Sep 13, 2023
75ddb2c
Run kwb.pkgbuild::use_index_md()
hsonne Sep 13, 2023
d3fc916
Manually adapt files
hsonne Sep 13, 2023
2b5e776
Fix documentation of argument
hsonne Sep 13, 2023
97ab211
Remove Travis and Appveyor configuration files
hsonne Sep 13, 2023
9f64bcf
Merge pull request #4 from KWB-R/harmonise
hsonne Sep 14, 2023
0837c5b
Consider existing time columns but with gaps
hsonne Oct 5, 2023
ea79394
Remove misleading "for each inspection"
hsonne Oct 5, 2023
0963e35
Allow for C(hange)-codes in continuous defects
hsonne Oct 6, 2023
537dcdf
Add csv file with mainCode/char1/char2 combis
hsonne Nov 24, 2023
fcf534b
Remove commented header from csv file
hsonne Nov 24, 2023
116edac
Indicate language in file name
hsonne Nov 24, 2023
976ce73
Add arg. "snakeCase", extract readRenamings()
hsonne Nov 24, 2023
f066ca8
Give the pattern as string constant
hsonne Nov 28, 2023
3b11eee
Describe more fields in "column-names.csv"
hsonne Nov 28, 2023
52752a7
Fix typo: "Linig" -> "Lining"
hsonne Nov 28, 2023
1b22248
Improve names, use accessor, output "context"
hsonne Nov 28, 2023
c12c9e7
Fix typo
hsonne Nov 28, 2023
35a002b
By default, suppress warning on diff. headers
hsonne Nov 28, 2023
13fc035
Add argument "warn" to mergeInspectionData()
hsonne Nov 28, 2023
12013d6
Add test files
hsonne Nov 28, 2023
7212606
Merge pull request #5 from KWB-R/clean
hsonne Nov 28, 2023
bc2cfc7
Update DESCRIPTION, testthat.R
hsonne Nov 28, 2023
21c3254
Add argument "snake.case" to readEuCodedFile()
hsonne Nov 28, 2023
0d6772f
Add argument "file"
hsonne Nov 28, 2023
b7f0288
Expect snake_case names when creating unique id
hsonne Nov 28, 2023
97dc24d
Remove some empty lines
hsonne Nov 28, 2023
d1f85b1
Move getvalueFromKeyValueString() to utils.R
hsonne Nov 28, 2023
8e2d239
Specify quantification 1 as numeric
hsonne Nov 28, 2023
1c87aab
Test for camel/snake case column names
hsonne Nov 28, 2023
e20aaa0
Rename file according to contained function
hsonne Nov 28, 2023
2396d3a
Replace NA with "" in character columns
hsonne Nov 28, 2023
672e298
Add two more tests
hsonne Nov 28, 2023
ea0f154
Simplify name
hsonne Nov 28, 2023
ede8f9d
Check not only for NA but also for empty string
hsonne Nov 28, 2023
35b4d66
Safely select columns with get_columns()
hsonne Nov 30, 2023
f72e7d1
Add arg. "as.text" to extractObservationData()
hsonne Nov 30, 2023
34e3a88
Fix implementation of as.text = TRUE
hsonne Nov 30, 2023
d493092
Add test for extractObservationBlocks()
hsonne Nov 30, 2023
4c8787c
Allow to pass argument "as.text" through
hsonne Nov 30, 2023
7302880
Provide argument "default.time" at high level
hsonne Dec 2, 2023
4aacb95
Add argument "name.convention"
hsonne Dec 2, 2023
ebb2835
Improve createInspectionId() and rename
hsonne Dec 2, 2023
27a6b0a
Add argument "name.convention"
hsonne Dec 2, 2023
99ec0be
Stop with improved error message
hsonne Jan 2, 2024
51c819c
Simplify error message (may have been confusing)
hsonne Jan 2, 2024
edd32d3
Invert logic, use "result" as variable name
hsonne Jan 4, 2024
d232432
Allow to write duplicates to a file
hsonne Jan 4, 2024
2ee4a2c
Import capture.output()
hsonne Jan 4, 2024
f3b82bb
Add argument "error.file", rename from "file"
hsonne Jan 4, 2024
ba33205
Add argument "naToEmpty"
hsonne Mar 22, 2024
445cf13
Allow to specify the file encoding
hsonne Mar 22, 2024
dae5c73
Rename getFileEncoding()
hsonne Mar 22, 2024
a5df320
Change default of "encoding" to "unknown"
hsonne Mar 22, 2024
198bef1
Replace encoding iso-8859-1:1998 with latin1
hsonne Mar 26, 2024
4f5a0ca
Add latest change as NEWS entry
hsonne Mar 26, 2024
6b4575c
Replace also "ISO-8859-1" with "latin1"
hsonne Mar 26, 2024
c1f33c5
Accept "latin1" as encoding string
hsonne Mar 26, 2024
83294a2
Use "L" to indicate "integer" (long)
hsonne Mar 28, 2024
4ab30eb
Add Roxygen export directives
hsonne Mar 28, 2024
078d23d
Use kwb.utils::collapsed()
hsonne Mar 28, 2024
fd6ef99
Use normal output instead of message
hsonne Mar 28, 2024
f3c8c13
Update NAMESPACE
hsonne Mar 28, 2024
ea7df69
Try to find out why GitHub Actions fail
hsonne Mar 28, 2024
f417055
Try harder
hsonne Mar 28, 2024
d61b6fa
Using kwb.utils >= v0.15.0 should have fixed it
hsonne Mar 28, 2024
74103c7
Fix rotten comment
hsonne Mar 29, 2024
7b79946
Add package version requirement in DESCRIPTION
hsonne Mar 29, 2024
79b8d66
Update NEWS based on commits in PR #2
hsonne Mar 29, 2024
4d0bc92
Check and correct NEWS.md
hsonne Mar 29, 2024
3b97002
Bump version, add hint on version requirement
hsonne Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ README\.md$
^\.gitignore$
^docs$
^.gitlab-ci\.yml$
^\.github$
^README\.md$
^index\.md$
83 changes: 83 additions & 0 deletions .github/workflows/R-CMD-check.yaml
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
53 changes: 53 additions & 0 deletions .github/workflows/pkgdown.yaml
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 "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: 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}
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

12 changes: 7 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: kwb.en13508.2
Title: Read and Write CCTV Inspection Data According to Norm
EN13508-2
Version: 0.2.0.9000
Version: 0.3.0
Authors@R:
c(person(given = "Hauke",
family = "Sonnenberg",
Expand All @@ -15,12 +15,14 @@ Description: functions to read and write CCTV inspections
License: MIT + file LICENSE
URL: https://github.com/kwb-r/kwb.en13508.2
BugReports: https://github.com/kwb-r/kwb.en13508.2/issues
Imports:
kwb.utils
Imports:
digest,
kwb.utils (>= 0.15.0)
Suggests:
testthat,
testthat (>= 3.0.0),
ggplot2
Remotes:
github::kwb-r/kwb.utils
Encoding: UTF-8
RoxygenNote: 6.1.1
RoxygenNote: 7.2.3
Config/testthat/edition: 3
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) 2015-2019 Kompetenzzentrum Wasser Berlin gGmbH (KWB)
Copyright (c) 2017-2023 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) 2015-2019 Kompetenzzentrum Wasser Berlin gGmbH
Copyright (c) 2017-2023 Kompetenzzentrum Wasser Berlin gGmbH

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
21 changes: 21 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

export(euCodedFileHeader)
export(getCodes)
export(getLineDamageInfo)
export(mergeInspectionData)
export(numberOfInspections)
export(plotObservations)
Expand All @@ -10,3 +11,23 @@ export(readEuCodedFile)
export(readEuCodedFiles)
export(writeEuCodedFile)
export(writeEuCodedFiles)
importFrom(kwb.utils,allAreEqual)
importFrom(kwb.utils,catAndRun)
importFrom(kwb.utils,catIf)
importFrom(kwb.utils,collapsed)
importFrom(kwb.utils,hsSafeName)
importFrom(kwb.utils,isTryError)
importFrom(kwb.utils,makeUnique)
importFrom(kwb.utils,moveToFront)
importFrom(kwb.utils,orderBy)
importFrom(kwb.utils,printIf)
importFrom(kwb.utils,readLinesWithEncoding)
importFrom(kwb.utils,removeColumns)
importFrom(kwb.utils,removeExtension)
importFrom(kwb.utils,safeRowBindAll)
importFrom(kwb.utils,selectColumns)
importFrom(kwb.utils,setColumns)
importFrom(kwb.utils,stopFormatted)
importFrom(kwb.utils,stringList)
importFrom(kwb.utils,substSpecialChars)
importFrom(utils,capture.output)
Loading
Loading