Skip to content

Commit

Permalink
Merge branch 'release/Release-3'
Browse files Browse the repository at this point in the history
  • Loading branch information
franzbischoff committed Jul 21, 2022
2 parents a5c0240 + 3b81f6f commit f502dd4
Show file tree
Hide file tree
Showing 151 changed files with 92,353 additions and 31,000 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
^\.radian_history$
^\.vscode$
^\.whitesource$
^_classifier$
^_regime_change$
^_classifier$
^_regimetest$
^_targets$
^_targets\.R$
^_targets\.yaml$
Expand Down
2 changes: 2 additions & 0 deletions .Rinstignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
inst/extdata/.*
inst/testfiles/.*
102 changes: 60 additions & 42 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
# nolint start
options(repos = c(CRAN = "https://cran.rstudio.org"))

if (.Platform$OS.type == "windows") {
Sys.setenv(LC_CTYPE = "C")
}

source("renv/activate.R")

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 this fails we (probably) are in Binder
})

if (class(a) == "try-error") { # we are in Binder session (hopefully)
message("Starting Binder Session")
setHook("rstudio.sessionInit", function(newSession) {
if (newSession & is.null(rstudioapi::getActiveProject())) {
rstudioapi::openProject("false.alarm.Rproj")
}
}, action = "append")
}
if (Sys.getenv("CI") == "") {
# not CI

rm(a)
# 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 this fails we (probably) are in Binder
# })

# if (class(a) == "try-error") { # we are in Binder session (hopefully)
# 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() && Sys.getenv("RSTUDIO") == "") {
options(
Expand All @@ -44,18 +47,25 @@ if (Sys.getenv("CI") == "") { # not CI
)
options(
vsc.rstudioapi = TRUE,
max.print = 1000,
width = 200,
# vsc.browser = "Two",
# vsc.viewer = "Two",
# vsc.page_viewer = "Two",
# vsc.view = "Two",
# vsc.plot = "Two",
# vsc.helpPanel = "Two",
vsc.str.max.level = 2,
# vsc.str.max.level = 2,
vsc.show_object_size = TRUE,
vsc.globalenv = TRUE,
vsc.dev.args = list(width = 1000, height = 1000)
vsc.dev.args = list(width = 1000, height = 700)
)

options(languageserver.formatting_style = function(options) {
style <- styler::tidyverse_style(scope = "tokens", indent_by = 2)
style
})

# if httpgd is installed, let's use it
# This breaks rendering video
# if ("httpgd" %in% .packages(all.available = TRUE)) {
Expand All @@ -72,32 +82,38 @@ if (Sys.getenv("CI") == "") { # not CI
require("devtools", quietly = TRUE)
require("usethis", quietly = TRUE)
require("conflicted", quietly = TRUE)
# require("tidyverse", quietly = TRUE)
# require("tidymodels", quietly = TRUE)
require("here", quietly = TRUE)
require("glue", quietly = TRUE)
require("workflowr", quietly = TRUE)
require("targets", quietly = TRUE)
require("gittargets", quietly = TRUE)
require("tarchetypes", quietly = TRUE)
})
)

conflicted::conflict_prefer("filter", "dplyr")
options(dplyr.summarise.inform = FALSE)

if (.Platform$OS.type != "windows") {
if (suppressMessages(requireNamespace("prettycode", 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()
)
})
}
# if (suppressMessages(requireNamespace("prompt", quietly = TRUE))) {
# prompt::set_prompt(function(...) {
# paste0(
# "[",
# prompt::git_branch(),
# prompt::git_dirty(),
# prompt::git_arrows(),
# "] ",
# prompt::prompt_runtime()
# )
# })
# }

if (Sys.getenv("RADIAN_VERSION") == "") {
loadhistory() # if no file, no problem.
Expand All @@ -108,7 +124,8 @@ if (Sys.getenv("CI") == "") { # not CI
cat("bye bye...\n") # print this so we see if any non-interactive session is lost here
}
}
} else { # is RSTUDIO
} else {
# is RSTUDIO
suppressMessages(
suppressWarnings({
require("here", quietly = TRUE)
Expand All @@ -119,7 +136,8 @@ if (Sys.getenv("CI") == "") { # not CI
})
)
}
} else { # is CI
} else {
# is CI
suppressMessages(
suppressWarnings({
require("here", quietly = TRUE)
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cellar/
lock/
python/
staging/
.Rhistory
.Rhistory*
.Renviron
.Rapp.history
Pprof.out
Expand Down Expand Up @@ -59,6 +59,7 @@ vignettes/*.pdf
# End of https://www.gitignore.io/api/r

# Personalized
tmp
/tmp/
/tmp_*/
.future
Expand All @@ -73,6 +74,7 @@ debugme.log
/R/RcppExports.R
/code/
/pdfs/
/docs/reference
/pkgdown/
/revdep/*.html
/revdep/checks
Expand All @@ -88,6 +90,7 @@ debugme.log
LOCAL_APPDATA_FONTCONFIG_CACHE/
README.html
Rplots.pdf
dev
dev/
packrat/lib*/
packrat/src/
Expand All @@ -110,3 +113,5 @@ mpxtest.RData
.devcontainer/mathjax.tgz
docs/thesis/*.log
docs/thesis/__*.tex
analysis/shiny/rsconnect/shinyapps.io/franzbischoff/FLOSS.dcf
analysis/shiny_land/rsconnect/shinyapps.io/franzbischoff/FLOSS_land.dcf
54 changes: 44 additions & 10 deletions .lintr
Original file line number Diff line number Diff line change
@@ -1,12 +1,46 @@
linters: with_defaults(open_curly_linter = NULL, T_and_F_symbol_linter, assignment_linter, closed_curly_linter = NULL, commas_linter,
commented_code_linter = NULL, cyclocomp_linter(50),
object_name_linter(styles = "snake_case"), object_length_linter(30),
equals_na_linter, function_left_parentheses_linter, infix_spaces_linter,
line_length_linter(500), no_tab_linter, object_usage_linter = NULL, paren_brace_linter,
absolute_path_linter(lax = TRUE), nonportable_path_linter = NULL, pipe_continuation_linter,
semicolon_terminator_linter(semicolon = "trailing"), seq_linter, single_quotes_linter,
spaces_inside_linter, spaces_left_parentheses_linter, trailing_blank_lines_linter,
trailing_whitespace_linter, undesirable_function_linter, undesirable_operator_linter,
unneeded_concatenation_linter)
linters: linters_with_defaults(
absolute_path_linter(lax = TRUE),
any_duplicated_linter(),
any_is_na_linter(),
backport_linter(),
class_equals_linter(),
commented_code_linter = NULL,
condition_message_linter(),
consecutive_stopifnot_linter(),
cyclocomp_linter(50),
duplicate_argument_linter(),
extraction_operator_linter = NULL,
fixed_regex_linter(),
ifelse_censor_linter(),
implicit_integer_linter(),
inner_combine_linter(),
line_length_linter(150),
literal_coercion_linter(),
missing_argument_linter(),
missing_package_linter(),
namespace_linter(),
nested_ifelse_linter(),
nonportable_path_linter(lax = TRUE),
numeric_leading_zero_linter(),
object_length_linter(30),
object_usage_linter = NULL,
outer_negation_linter(),
package_hooks_linter(),
paste_linter(),
pipe_call_linter(),
redundant_ifelse_linter(),
regex_subset_linter(),
semicolon_linter(allow_compound = TRUE),
sprintf_linter(),
string_boundary_linter(),
strings_as_factors_linter(),
system_file_linter(),
undesirable_function_linter(all_undesirable_functions),
undesirable_operator_linter(all_undesirable_operators),
unneeded_concatenation_linter(),
unreachable_code_linter(),
unused_import_linter(),
yoda_test_linter()
)
exclusions: list("dev", "renv", "R/RcppExports.R", "README.Rmd")

12 changes: 6 additions & 6 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Rtools40-x64",
"intelliSenseMode": "gcc-x64",
"includePath": [
"C:/Program Files/R/R-4.1.2/include",
"C:/Program Files/R/R-4.2.0/include",
"${workspaceFolder}/src"
],
"defines": [
Expand All @@ -24,7 +24,7 @@
"name": "Rtools40-x86",
"intelliSenseMode": "gcc-x86",
"includePath": [ // renv might be on i386-w64-mingw32 if R-32bits
"C:/Program Files/R/R-4.1.2/include",
"C:/Program Files/R/R-4.2.0/include",
"${workspaceFolder}/src"
],
"defines": [
Expand Down Expand Up @@ -89,10 +89,10 @@
"includePath": [
"/usr/share/R/include/**",
"${workspaceFolder}/src/**",
"${workspaceFolder}/renv/library/R-4.1/x86_64-pc-linux-gnu/Rcpp/include/**",
"${workspaceFolder}/renv/library/R-4.1/x86_64-pc-linux-gnu/RcppParallel/include/**",
"${workspaceFolder}/renv/library/R-4.1/x86_64-pc-linux-gnu/RcppThread/include/**",
"${workspaceFolder}/renv/library/R-4.1/x86_64-pc-linux-gnu/RcppProgress/include/**"
"/usr/lib/R/library/Rcpp/include/**",
"/usr/lib/R/library/RcppParallel/include/**",
"/usr/lib/R/library/RcppThread/include/**",
"/usr/lib/R/library/RcppProgress/include/**"
],
"defines": [
"RCPP_PARALLEL_USE_TBB",
Expand Down
6 changes: 3 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
"gruntfuggly.todo-tree",
"spmeesseman.vscode-taskexplorer",
"meakbiyik.vscode-r-test-adapter",
"ikuyadeu.r",
"hbenl.vscode-test-explorer",
"cschleiden.vscode-github-actions",
"editorconfig.editorconfig",
"tht13.html-preview-vscode",
"donjayamanne.git-extension-pack",
"codezombiech.gitignore",
"james-yu.latex-workshop",
Expand All @@ -29,6 +27,8 @@
"usernamehw.errorlens",
"rdebugger.r-debugger",
"hediet.vscode-drawio",
"PsykoSoldi3r.vscode-git-flow"
"serhioromano.vscode-gitflow",
"reditorsupport.r",
"notZaki.pandocciter"
]
}
8 changes: 7 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"debugMode": "function",
"workingDirectory": "${workspaceFolder}",
"file": "${file}",
"mainFunction": "stompi",
"mainFunction": "score_regimes",
"allowGlobalDebugging": false
},
{
Expand All @@ -45,6 +45,12 @@
"request": "attach",
"name": "Attach to R process",
"splitOverwrittenOutput": true
},
{
"type": "pwa-chrome",
"name": "http://127.0.0.1:3000/docs/regime_optimize.html",
"request": "launch",
"url": "http://127.0.0.1:3000/docs/regime_optimize.html"
}
]
}
Loading

0 comments on commit f502dd4

Please sign in to comment.