Skip to content

Commit

Permalink
Merge pull request #14 from tscnlab/comparisons
Browse files Browse the repository at this point in the history
imports and improvements
  • Loading branch information
steffenhartmeyer authored Jun 3, 2024
2 parents c74f83e + 01c4502 commit d9a5e4f
Show file tree
Hide file tree
Showing 34 changed files with 420 additions and 246 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: Test coverage

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: LightLogR
Title: Work With Data from Wearable Light Loggers and Optical Radiation Dosimeters
Version: 0.3.0
Version: 0.3.2
Authors@R: c(
person("Johannes", "Zauner",
email = "[email protected]", role = c("aut", "cre"),
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# LightLogR 0.3.2

* added import functions for `nanoLambda`and `LightWatcher` devices

* new Logo!

# LightLogR 0.3.1

* fixed bug in `interval2state()` that would dismiss the first state if it starts before the actual data
Expand Down
2 changes: 1 addition & 1 deletion R/data.r
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#' These expressions are used to import and prepare data from specific devices.
#' The list is made explicit, so that a user, requiring slight changes to the
#' import functions, (e.g., because a timestamp is formatted differently) can
#' modify of add to the list.
#' modify or add to the list. The list can be turned into a fully functional import function through `import_adjustment‚()`.
#'
#' @format `ll_import_expr` A list, with specific expressions for each supported device
#' \describe{
Expand Down
10 changes: 7 additions & 3 deletions R/gg_overview.R
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
#' Plot an overview of dataset intervals with implicit missing data
#'
#'
#'
#' @inheritParams gg_day
#' @param Datetime.colname column name that contains the datetime. Defaults to
#' `"Datetime"` which is automatically correct for data imported with
#' [LightLogR]. Expects a `symbol`. Needs to be part of the `dataset`.
#' @param Id.colname The column name of the Id column (default is `Id`), needs to
#' be in the `dataset`. This is also used as the y-axis variable and is the
#' @param Id.colname The column name of the Id column (default is `Id`), needs
#' to be in the `dataset`. This is also used as the y-axis variable and is the
#' minimum grouping variable.
#' @param gap.data Optionally provide a `tibble` with `start` and `end`
#' `Datetimes` of gaps per group. If not provided, the function uses
#' [gap_finder()] to calculate implicit missing data. This might be
#' computationally intensive for large datasets and many missing data. In
#' these cases it can make sense to calculate those gaps beforehand and
#' provide them to the function.
#' provide them to the function. If an empty `tibble` ([tibble::tibble()]) is
#' provided, the function will just plot the start and end dates of the
#' dataset, which is computationally very fast at the cost of additional info.
#' @param ... Additional arguments given to the main [ggplot2::aes()] used for
#' styling depending on data within the `dataset`
#'
Expand Down
Loading

0 comments on commit d9a5e4f

Please sign in to comment.