Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
pydemull committed Oct 12, 2021
1 parent 89a666a commit 4c9300e
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 10 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
tags: ['*']

name: pkgdown

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

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

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

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: pkgdown
needs: website

- name: Deploy package
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
36 changes: 36 additions & 0 deletions .github/workflows/render-rmarkdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths: ['**.Rmd']

name: render-rmarkdown

jobs:
render-rmarkdown:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0

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

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

- uses: r-lib/actions/setup-renv@v1

- name: Render Rmarkdown files
run: |
RMD_PATH=($(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '[.]Rmd$'))
Rscript -e 'for (f in commandArgs(TRUE)) if (file.exists(f)) rmarkdown::render(f)' ${RMD_PATH[*]}
- name: Commit results
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git commit ${RMD_PATH[*]/.Rmd/.md} -m 'Re-build Rmarkdown files' || echo "No changes to commit"
git push origin || echo "No changes to commit"
30 changes: 30 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/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@v2

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

- uses: r-lib/actions/setup-r-dependencies@v1
with:
extra-packages: covr

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
18 changes: 13 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,35 @@ knitr::opts_chunk$set(

# Overview

activAnalyzer is a shinny app that was developed to analyse ActiGraph accelerometer data (.agd files) recorded at the hip in adults. Once analysis is completed, the app allows to export results to .csv files and to generate a report of the measurement (.pdf file). All the configured inputs relevant for interpreting the results are recorded in the report. Be sure that the inputs that are configured when generating the report correspond to the analysis that was actually performed (in other words, avoid modifying the inputs after generating satisfactory results). Please read the user's guide for details about how the app works.
activAnalyzer is a shinny app that was developed to analyse ActiGraph accelerometer data (.agd files) recorded at the hip in adults. Once analysis is completed, the app allows to export results to .csv files and to generate a report of the measurement (.pdf file). All the configured inputs relevant for interpreting the results are recorded in the report. Be sure that the inputs that are configured when generating the report correspond to the analysis that was actually performed (in other words, avoid modifying the inputs after generating satisfactory results). Please read the [user's guide](https://github.com/pydemull/activAnalyzer/blob/master/inst/guide/user_guide_en.pdf) for details about how the app works.

## Installation
# Usage

For now, this app can be used following two different ways: (i) on the web via a [shinyapps.io plateform] (pydemull.shinyapps.io/activanalyzer); (ii) on PC after installing R software and the activAnalyzer package.

## Installation for using with R

You can install the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("pydemull/activAnalyzer")
```

## Example

To launch the app:
To launch the app using R:

```{r example, eval=FALSE}
library(activAnalyzer)
run_app()
activAnalyzer::run_app()
```


```{r, include=FALSE, eval=FALSE}
You'll still need to render `README.Rmd` regularly, to keep `README.md` up-to-date. `devtools::build_readme()` is handy for this. You could also use GitHub Actions to re-render `README.Rmd` every time you push. An example workflow can be found here: <https://github.com/r-lib/actions/tree/master/examples>.
You'll still need to render `README.Rmd` regularly, to keep `README.md` up-to-date:
devtools::build_readme()
You could also use GitHub Actions to re-render `README.Rmd` every time you push. An example workflow can be found here: <https://github.com/r-lib/actions/tree/master/examples>.
```

18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@ configured inputs relevant for interpreting the results are recorded in
the report. Be sure that the inputs that are configured when generating
the report correspond to the analysis that was actually performed (in
other words, avoid modifying the inputs after generating satisfactory
results). Please read the user’s guide for details about how the app
works.
results). Please read the [user’s
guide](https://github.com/pydemull/activAnalyzer/blob/master/inst/guide/user_guide_en.pdf)
for details about how the app works.

## Installation
# Usage

For now, this app can be used following two different ways: (i) on the
web via a \[shinyapps.io plateform\]
(pydemull.shinyapps.io/activanalyzer); (ii) on PC after installing R
software and the activAnalyzer package.

## Installation for using with R

You can install the development version from
[GitHub](https://github.com/) with:
Expand All @@ -35,9 +43,9 @@ devtools::install_github("pydemull/activAnalyzer")

## Example

To launch the app:
To launch the app using R:

``` r
library(activAnalyzer)
run_app()
activAnalyzer::run_app()
```
14 changes: 14 additions & 0 deletions codecov.yml
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

0 comments on commit 4c9300e

Please sign in to comment.