Skip to content

Commit

Permalink
adds files from checklist::setup_package
Browse files Browse the repository at this point in the history
  • Loading branch information
hansvancalster committed Sep 7, 2022
1 parent 1472915 commit d929c08
Show file tree
Hide file tree
Showing 11 changed files with 284 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check_on_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
push:
branches-ignore:
- main
- master
- ghpages

name: "check package"

jobs:
check-package:
runs-on: ubuntu-latest
name: "check package"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
steps:
- uses: inbo/actions/check_pkg@master
with:
token: ${{ secrets.PAT }}
99 changes: 99 additions & 0 deletions .github/workflows/check_on_different_r_os.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

name: R-CMD-check-OS

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: windows-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_SYSTEM_CLOCK_: false
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}

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), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
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 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"
sudo apt-get install -y libcurl4-openssl-dev
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check")
shell: Rscript {0}

- 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@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
retention-days: 5
21 changes: 21 additions & 0 deletions .github/workflows/check_on_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
push:
branches:
- main
- master
schedule:
- cron: '6 0 15 * *'

name: "check package on main"

jobs:
check-package:
runs-on: ubuntu-latest
name: "check package"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
ORCID_TOKEN: ${{ secrets.ORCID_TOKEN }}
steps:
- uses: inbo/actions/check_pkg@master
with:
token: ${{ secrets.PAT }}
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
tags:
- 'v*'

name: Create Release

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get tag message
run: |
TAG_BODY=$(git tag --contains ${{ github.sha }} -n100 | awk '(NR>1)')
echo "::set-output name=TAG_BODY::$TAG_BODY"
id: tag-body
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.tag-body.outputs.TAG_BODY }}
draft: false
prerelease: false
5 changes: 5 additions & 0 deletions checklist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: Configuration file for checklist::check_pkg()
package: yes
allowed:
warnings: []
notes: []
17 changes: 17 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
comment: true

coverage:
precision: 1
round: down
range: "70...100"
status:
patch:
default:
target: auto
threshold: 10%
informational: true
project:
default:
target: auto
threshold: 1%
informational: false
Binary file added man/figures/background-pattern.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/flanders.woff
Binary file not shown.
Binary file added man/figures/flanders.woff2
Binary file not shown.
Binary file added man/figures/logo-en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions pkgdown/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
body {
background-color: #f5f5f5;
color: #5e5e5e;
background-image: url('reference/figures/background-pattern.png');
font-family: FlandersArtSans-Light, Verdana, Arial, sans-serif;
}

.row{
background-color: #ffffff;
}

a {
color: #c04384;
}
a:hover {
color: #337ab7;
}

.navbar,
.label-default,
.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:hover, .navbar-default .navbar-nav>.active>a:focus {
background-color: #356196;
}

.navbar-default .navbar-link,
.navbar-default .navbar-nav>li>a {
color: #ffffff;
}

.nav-pills li.active>a, .nav-pills li>a:hover {
background-color: #c2c444;
}

.nav-pills>li.active>a, .nav-pills>li.active>a:focus {
color: #ffffff;
background-color: #356196;
}

.nav-pills a {
color: #5e5e5e;
}

@font-face{
font-family: inbo;
src:
url('figures/flanders.woff2') format('woff2'),
url('reference/figures/flanders.woff') format('woff');
;
font-weight:normal;
font-style:normal;
}

code.sourceCode.diff span.st {
background-color: #C04384;
color: #FFFFFF;
font-weight: bold;
}

code.sourceCode.diff span.va {
background-color: #E4E517;
font-weight: bold;
}

/*selection color*/
::selection {
background: #c04384;
color: #fff;
}
::-moz-selection {
background: #c04384;
color: #fff;
}

.navbar-default .navbar-nav>.open>a, .navbar-default .navbar-nav>.open>a:focus, .navbar-default .navbar-nav>.open>a:hover{
color: #337ab7;
background: #fff;
}

.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover {
color: #337ab7;
background: #fff;
}

.navbar-default .navbar-nav>li>a:hover{
color: #337ab7;
background: #fff;
}

.dropdown-menu>li>a:hover{
color: #fff;
background: #337ab7;
}

0 comments on commit d929c08

Please sign in to comment.