Skip to content

Commit

Permalink
Finish Release-2
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/binder.yaml
#	.github/workflows/workflowr.yaml
#	README.Rmd
#	README.md
#	heads_thesis.Rproj
#	protocol/references.bib
  • Loading branch information
franzbischoff committed Mar 24, 2021
2 parents 5f126a5 + bf772a5 commit 86998c2
Show file tree
Hide file tree
Showing 256 changed files with 199,124 additions and 3,850 deletions.
47 changes: 47 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
^renv$
^renv\.lock$
^\.vscode$
^\.editorconfig$
^.*\.code-workspace$
^.*\.Rout$
^.*\.Rproj$
^.*\.yml$
^\..*$
^\.Rproj\.user$
^cran-comments\.md$
^CRAN-RELEASE$
^dev$
^docs$
^pdfs$
^examples_.*$
^LICENSE\.md$
^LOCAL_APPDATA_FONTCONFIG_CACHE$
^NEWS\.md$
^NEWS\.Rmd$
^packrat$
^pkgdown$
^README-.*\.png$
^README\.Rmd$
^README_cache$
^revdep$
^src-i386$
^false.alarm-Ex_i386\.Rout$
^false.alarm-Ex_x64\.Rout$
^false.alarm.*\.tar\.gz$
^false.alarm.*\.tgz$
^false.alarm\.Rcheck$
^API$
^\.github$
^codecov\.yml$
\.clang-format
^Makefile$
^docs/_pkgdown\.yml$
^_targets*$
^_targets\.R$
^analysis$
^output$
^protocol$
^review$
^thesis$
^data-raw$
^inst/extdata$
89 changes: 85 additions & 4 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -1,5 +1,86 @@
# nolint start
if (.Platform$OS.type == "windows") {
Sys.setenv(LC_CTYPE="C")
}

source("renv/activate.R")
setHook("rstudio.sessionInit", function(newSession) {
if (newSession & is.null(rstudioapi::getActiveProject()))
rstudioapi::openProject("heads_thesis.Rproj")
}, action = "append")

if (Sys.getenv("CI") == "") { # not CI

a <- NULL
suppressMessages(if (requireNamespace("languageserver", quietly = TRUE)) {
a <- try(suppressWarnings(source(file.path(
Sys.getenv(if (.Platform$OS.type == "windows") {
"USERPROFILE"
} else {
"HOME"
}),
".vscode-R",
"init.R"
))),
silent = TRUE
)
})

if (class(a) == "try-error") {
message("Starting Binder Session")
setHook("rstudio.sessionInit", function(newSession) {
if (newSession & is.null(rstudioapi::getActiveProject())) {
rstudioapi::openProject("false.alarm.Rproj")
}
}, action = "append")
}

rm(a)

if (interactive()) {
options(
warnPartialMatchArgs = FALSE,
warnPartialMatchDollar = FALSE,
warnPartialMatchAttr = FALSE,
usethis.protocol = "https",
vsc.rstudioapi = TRUE
# error = recover
)

suppressMessages(
suppressWarnings({
require("testthat", quietly = TRUE)
require("devtools", quietly = TRUE)
require("usethis", quietly = TRUE)
require("conflicted", quietly = TRUE)
require("here", quietly = TRUE)
require("workflowr", quietly = TRUE)
require("targets", quietly = TRUE)
require("tarchetypes", quietly = TRUE)
})
)
# suppressMessages(prettycode::prettycode())

if (suppressMessages(requireNamespace("prompt", quietly = TRUE))) {
prompt::set_prompt(function(...) {
paste0(
"[",
prompt::git_branch(),
prompt::git_dirty(),
prompt::git_arrows(),
"] ",
prompt::prompt_runtime()
)
})
}
}
} else { # is CI
suppressMessages(
suppressWarnings({
require("here", quietly = TRUE)
require("workflowr", quietly = TRUE)
require("targets", quietly = TRUE)
require("tarchetypes", quietly = TRUE)
})
)
}



# nolint end
1 change: 1 addition & 0 deletions .covrignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
renv/**
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Classify R Markdown files as R code for GitHub language statistics
# https://github.com/github/linguist#overrides
*.[Rr]md linguist-language=R
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
4 changes: 4 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
todo:
keyword: ["@todo", "TODO", "TODO:"]
autoAssign: true
caseSensitive: true
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "daily"
9 changes: 9 additions & 0 deletions .github/fix-timestamps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
FILES=$1

for f in $FILES
do
echo "Processing $f file..."
# take action on each file. $f store current file name
touch -d "$(git log -1 --pretty="format:%cI" "$f")" "$f"
done
13 changes: 13 additions & 0 deletions .github/gh-pages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
git ls-remote --quiet --exit-code origin gh-pages
if [ $? -ne 0 ]; then
dt=$(git rev-parse --abbrev-ref HEAD)
dt=${dt//$'\n'/}
git checkout --orphan gh-pages
git rm -rf --quiet .
git commit --allow-empty -m "Initializing gh-pages branch"
git push origin HEAD:gh-pages
git checkout $dt
fi


11 changes: 11 additions & 0 deletions .github/pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: "1"
rules:
- base: master
upstream: matrix-profile-foundation:master
mergeMethod: hardreset
- base: main
upstream: matrix-profile-foundation:main
mergeMethod: hardreset
- base: develop
upstream: matrix-profile-foundation:develop
mergeMethod: hardreset
5 changes: 4 additions & 1 deletion .github/workflows/binder.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Binder
on: [push]
on:
push:
branches:
- future

jobs:
Create-MyBinderOrg-Cache:
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This action will search for R code and apply the rules stored in the .lintr
# file using the `lintr` R package.

name: Lint

on:
push:
branches:
- main
- master
- develop

workflow_dispatch:
repository_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RENV_PATHS_ROOT: ~/.local/share/renv
steps:
- name: Checking out shallow repository
uses: actions/checkout@v2

- run: git branch

- name: Install System dependencies
run: |
sudo apt-fast update
sudo apt-fast install -y libgit2-dev libharfbuzz-dev libcurl4-openssl-dev \
libfribidi-dev libzmq3-dev
- name: Setting up R installation
uses: r-lib/actions/setup-r@v1

- name: Cache R packages
uses: actions/[email protected]
id: cache-packages
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}-targets-v2
restore-keys: |
${{ runner.os }}-renv-
- name: Install dependencies
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
Sys.unsetenv("GITHUB_PAT")
renv::restore()
shell: Rscript {0}

- name: Lint
run: |
for(i in c("analysis", "R", "review", "thesis", "output")) {
lintr::lint_dir(i)
}
shell: Rscript {0}
Loading

0 comments on commit 86998c2

Please sign in to comment.