-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
900 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
^template\.Rproj$ | ||
^\.Rproj\.user$ | ||
^LICENSE\.md$ | ||
^\.github$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# ===================================================================== # | ||
# An R package by Certe: # | ||
# https://github.com/certe-medical-epidemiology # | ||
# # | ||
# Licensed as GPL-v2.0. # | ||
# # | ||
# Developed at non-profit organisation Certe Medical Diagnostics & # | ||
# Advice, department of Medical Epidemiology. # | ||
# # | ||
# This R package is free software; you can freely use and distribute # | ||
# it for both personal and commercial purposes under the terms of the # | ||
# GNU General Public License version 2.0 (GNU GPL-2), as published by # | ||
# the Free Software Foundation. # | ||
# # | ||
# We created this package for both routine data analysis and academic # | ||
# research and it was publicly released in the hope that it will be # | ||
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # | ||
# ===================================================================== # | ||
|
||
# Remember that R-universe will hourly build binaries for macOS and Windows: | ||
# https://certe-medical-epidemiology.r-universe.dev | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: main | ||
schedule: | ||
# run a schedule everyday at 1 AM. | ||
# this is to check that all dependencies are still available | ||
- cron: '0 1 * * *' | ||
|
||
name: R-CMD-check | ||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ${{ matrix.config.os }} | ||
continue-on-error: ${{ matrix.config.allowfail }} | ||
name: ${{ matrix.config.os }} (R-${{ matrix.config.r }}) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: macOS-latest, r: 'devel', allowfail: true} | ||
- {os: macOS-latest, r: '4.1', allowfail: false} | ||
- {os: macOS-latest, r: '4.0', allowfail: false} | ||
- {os: macOS-latest, r: '3.6', allowfail: false} | ||
- {os: ubuntu-20.04, r: 'devel', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | ||
- {os: ubuntu-20.04, r: '4.1', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | ||
- {os: ubuntu-20.04, r: '4.0', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | ||
- {os: ubuntu-20.04, r: '3.6', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | ||
- {os: windows-latest, r: 'devel', allowfail: true} | ||
- {os: windows-latest, r: '4.1', allowfail: false} | ||
- {os: windows-latest, r: '4.0', allowfail: false} | ||
- {os: windows-latest, r: '3.6', allowfail: false} | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
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: rcmdcheck | ||
|
||
- uses: r-lib/actions/check-r-package@v1 | ||
|
||
- name: Show testthat output | ||
if: always() | ||
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true | ||
shell: bash | ||
|
||
- name: Upload check results | ||
if: failure() | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | ||
path: check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# ===================================================================== # | ||
# An R package by Certe: # | ||
# https://github.com/certe-medical-epidemiology # | ||
# # | ||
# Licensed as GPL-v2.0. # | ||
# # | ||
# Developed at non-profit organisation Certe Medical Diagnostics & # | ||
# Advice, department of Medical Epidemiology. # | ||
# # | ||
# This R package is free software; you can freely use and distribute # | ||
# it for both personal and commercial purposes under the terms of the # | ||
# GNU General Public License version 2.0 (GNU GPL-2), as published by # | ||
# the Free Software Foundation. # | ||
# # | ||
# We created this package for both routine data analysis and academic # | ||
# research and it was publicly released in the hope that it will be # | ||
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. # | ||
# ===================================================================== # | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
name: lintr | ||
|
||
jobs: | ||
lintr: | ||
runs-on: macOS-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v1 | ||
|
||
- 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: | | ||
install.packages(c("remotes")) | ||
remotes::install_deps(dependencies = TRUE) | ||
remotes::install_cran("lintr") | ||
shell: Rscript {0} | ||
|
||
- name: Lint | ||
run: lintr::lint_package(linters = lintr::with_defaults(line_length_linter = NULL, trailing_whitespace_linter = NULL, object_name_linter = NULL, cyclocomp_linter = NULL, object_length_linter = lintr::object_length_linter(length = 50L))) | ||
shell: Rscript {0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Package: certetemplate | ||
Title: A Certe Package for ... | ||
Version: 0.0.1.9000 | ||
Authors@R: c( | ||
person(given = c("Matthijs", "S."), | ||
family = "Berends", | ||
role = c("aut", "cre")), | ||
person(given = c("Erwin", "E.", "A."), | ||
family = "Hassing", | ||
role = c("aut")), | ||
person(given = c("Erwin"), | ||
family = "Dijkstra", | ||
role = c("aut")), | ||
person(given = "Certe Medical Diagnostics & Advice Foundation", | ||
role = c("cph", "fnd"))) | ||
Description: A Certe R Package for ... . | ||
This package is part of the 'certedata' universe. | ||
URL: https://github.com/certe-medical-epidemiology | ||
Depends: | ||
R (>= 3.6.0) | ||
Suggests: | ||
testthat (>= 2.0.0) | ||
License: GPL-2 | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.1.2 | ||
Config/testthat/edition: 2 |
Oops, something went wrong.