-
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.
Add pkgdown to gh actions Add pre-commit, roxygenize and R CMD CHECK actions Pin pre-commit version Create LICENSE Fix pre-commit Cleanup
- Loading branch information
Showing
41 changed files
with
2,203 additions
and
3 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,2 @@ | ||
^doc$ | ||
^Meta$ |
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,15 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false | ||
|
||
[*.{yml,yaml,R,r,Rmd,rmd,qmd}] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
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,49 @@ | ||
# The purpose of this action is to generate the website using pkgdown. | ||
# On a commit to the main branch, the website will be deployed on github pages. | ||
# In pull requests, a zip file with the website will be generated which can be downloaded | ||
# in order to preview the website. | ||
# | ||
# 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] | ||
workflow_dispatch: | ||
|
||
name: pkgdown | ||
|
||
jobs: | ||
pkgdown: | ||
runs-on: ubuntu-latest | ||
# Only restrict concurrency for non-PR jobs | ||
concurrency: | ||
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::pkgdown, local::. | ||
needs: website | ||
|
||
- name: Build site | ||
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) | ||
shell: Rscript {0} | ||
|
||
- name: Deploy to GitHub pages 🚀 | ||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' | ||
uses: JamesIves/github-pages-deploy-action@4.1.4 | ||
with: | ||
clean: false | ||
branch: gh-pages | ||
folder: docs |
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,14 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main, master] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/action@v3.0.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# The purpose of this action is to run `document()` of the roxygen2 package on each commit. | ||
# If new documentation was generated, it will automatically add a commit to the current branch. | ||
# This has the same effect as running `document()` locally, but | ||
# * ensures it cannot be forgotten | ||
# * saves setting up the development environment locally, which is especially useful for new contributors. | ||
# | ||
# 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: | ||
pull_request: | ||
paths: ["R/**", ".github/workflows"] | ||
|
||
name: Document | ||
|
||
jobs: | ||
document: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- name: Install dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::roxygen2 | ||
needs: roxygen2 | ||
|
||
- name: Document | ||
run: roxygen2::roxygenise() | ||
shell: Rscript {0} | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Roxygenize |
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,50 @@ | ||
# The purpose of this workflow is to execute `R CMD check` on different R and OS version. | ||
# | ||
# 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: 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: windows-latest, r: "release" } | ||
- { os: ubuntu-latest, r: "devel", http-user-agent: "release" } | ||
- { os: ubuntu-latest, r: "release" } | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
http-user-agent: ${{ matrix.config.http-user-agent }} | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::rcmdcheck | ||
needs: check | ||
|
||
- uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
upload-snapshots: true |
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 |
---|---|---|
@@ -1,11 +1,20 @@ | ||
## custom | ||
/exploratory/ | ||
/doc/ | ||
|
||
## editors | ||
.vscode | ||
|
||
## R | ||
.Rproj.user | ||
.Rhistory | ||
.Rdata | ||
.httr-oauth | ||
.DS_Store | ||
.vscode | ||
inst/doc | ||
/doc/ | ||
/Meta/ | ||
<<<<<<< HEAD | ||
|
||
/exploratory/ | ||
/exploratory/ | ||
======= | ||
>>>>>>> 9a40da3 (Add files from internal repo) |
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,6 @@ | ||
linters: linters_with_defaults( | ||
object_length_linter = NULL, | ||
object_usage_linter = NULL, | ||
line_length_linter(120), | ||
commented_code_linter = NULL | ||
) |
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,46 @@ | ||
# All available hooks: https://pre-commit.com/hooks.html | ||
# R specific hooks: https://github.com/lorenzwalthert/precommit | ||
repos: | ||
- repo: https://github.com/lorenzwalthert/precommit | ||
rev: v0.3.2.9007 | ||
hooks: | ||
- id: style-files | ||
args: [--style_pkg=styler, --style_fun=tidyverse_style, --scope=tokens] | ||
exclude: "exploratory.*$" | ||
- id: readme-rmd-rendered | ||
exclude: "exploratory.*$" | ||
- id: parsable-R | ||
- id: no-browser-statement | ||
exclude: "exploratory.*$" | ||
- id: no-debug-statement | ||
exclude: "exploratory.*$" | ||
- id: deps-in-desc | ||
args: [--allow_private_imports] | ||
exclude: "exploratory.*$" | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
exclude: '\.Rd' | ||
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config | ||
rev: v1.5.1 | ||
hooks: | ||
# Only reuiqred when https://pre-commit.ci is used for config validation | ||
- id: check-pre-commit-ci-config | ||
- repo: local | ||
hooks: | ||
- id: forbid-to-commit | ||
name: Don't commit common R artifacts | ||
entry: Cannot commit .Rhistory, .RData, .Rds or .rds. | ||
language: fail | ||
files: '\.(Rhistory|RData|Rds|rds)$' | ||
exclude: "(inst/extdata|data)/.*" | ||
# `exclude: <regex>` to allow committing specific files | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.0.0-alpha.6 | ||
hooks: | ||
- id: prettier | ||
language_version: "17.9.1" | ||
|
||
ci: | ||
autoupdate_schedule: monthly |
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,29 @@ | ||
Package: MAEio | ||
Title: Read Various Data Sources into MultiAssayExperiment objects | ||
Version: 0.0.0.9000 | ||
Authors@R: | ||
person("Gregor", "Sturm", , "gregor.sturm@boehringer-ingelheim.com", role = c("aut", "cre")) | ||
Description: Read Various Data Sources into MultiAssayExperiment objects | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.2.3 | ||
Suggests: | ||
knitr, | ||
rmarkdown, | ||
purrr, | ||
conflicted, | ||
testthat (>= 3.0.0) | ||
Depends: | ||
SummarizedExperiment, | ||
readxl, | ||
MultiAssayExperiment, | ||
tibble, | ||
pbapply, | ||
tidyr, | ||
purrr, | ||
dplyr, | ||
BumpyMatrix, | ||
rvest | ||
Config/testthat/edition: 3 | ||
biocViews: | ||
VignetteBuilder: knitr |
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,10 @@ | ||
pipeline { | ||
agent any | ||
stages { | ||
stage('hello') { | ||
steps { | ||
sh 'echo Hello Jenkins!' | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.