Commit 6714b4f1 authored by Lorenz Kapsner's avatar Lorenz Kapsner
Browse files

refactor: switch to diztools dependency

Showing with 110 additions and 99 deletions
+110 -99
Package: DQAgui
Title: Graphical User Interface for Data Quality Assessment
Version: 0.1.7
Version: 0.1.8
Authors@R: c(
person("Lorenz A.", "Kapsner", , "lorenz.kapsner@uk-erlangen.de", role = c("cre", "aut"),
comment = c(ORCID = "0000-0003-1866-860X")),
......@@ -14,10 +14,11 @@ License: GPL-3
URL: https://github.com/miracum/dqa-dqagui
BugReports: https://github.com/miracum/dqa-dqagui/issues
Encoding: UTF-8
Date: 2022-02-10
Date: 2022-02-21
Imports:
data.table,
daterangepicker,
DIZtools,
DIZutils (>= 0.0.12),
DQAstats (>= 0.2.3),
DT,
......
# DQAgui NEWS
## Unreleased (2022-02-21)
#### Others
* updated news.md and readme
Full set of changes: [`v0.1.7...d53af4f`](https://gitlab.miracum.org/miracum/dqa/dqagui/compare/v0.1.7...d53af4f)
## v0.1.7 (2022-02-10)
#### Fixes
......
......@@ -84,7 +84,7 @@ feedback_txt <- function(system, type) {
"\U2714 ",
tags$b(system),
" will be used as ",
DIZutils::firstup(type),
DIZtools::firstup(type),
" system.",
"\n\n",
"To change, simply select and save another one."
......@@ -123,7 +123,7 @@ validate_inputs <- function(rv, input, output, session) {
if (typeof(rv[[source_target]]$settings$path) == "character" &&
!is.null(rv[[source_target]]$settings$path) &&
length(rv[[source_target]]$settings$path) > 0) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(source_target, " settings seem valid."),
findme = "c0bcc9aa31",
logfile_dir = rv$log$logfile_dir,
......@@ -138,7 +138,7 @@ validate_inputs <- function(rv, input, output, session) {
headless = rv$headless
)
if (isTRUE(test_csv_tmp)) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0("All ",
source_target,
" csv-files were found."),
......@@ -147,7 +147,7 @@ validate_inputs <- function(rv, input, output, session) {
headless = rv$headless
)
} else{
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0("Some ",
source_target,
" csv-files are MISSING."),
......@@ -160,7 +160,7 @@ validate_inputs <- function(rv, input, output, session) {
}
} else {
# invalid path:
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(source_target, " settings not valid."),
type = "warning",
findme = "10d5e79d44",
......@@ -168,7 +168,7 @@ validate_inputs <- function(rv, input, output, session) {
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"rv$",
source_target,
......@@ -201,7 +201,7 @@ validate_inputs <- function(rv, input, output, session) {
)
} else {
## This system name is not known/implemented here:
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
source_target,
" system ",
......@@ -219,7 +219,7 @@ validate_inputs <- function(rv, input, output, session) {
}
}
} else {
DIZutils::feedback(
DIZtools::feedback(
print_this = "Either source or target system is not set.",
type = "Warning",
findme = "4e9400f8c9",
......@@ -325,7 +325,7 @@ check_load_data_button <- function(rv, session) {
if (time_filtering_possible) {
## Time filtering is possible, so enable the elements in the GUI:
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Date restriction is possible.",
" Showing date-picking elements in the GUI now."
......@@ -347,7 +347,7 @@ check_load_data_button <- function(rv, session) {
} else {
## Time filtering is NOT possible, so disable the elements in the GUI:
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Date restriction is NOT possible or needed.",
" Hiding date-picking elements in the GUI now."
......@@ -407,7 +407,7 @@ test_connection_button_clicked <-
output,
session) {
error <- TRUE
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Trying to connect to ",
db_type,
......@@ -468,7 +468,7 @@ test_connection_button_clicked <-
if (!is.null(rv[[source_target]]$db_con)) {
DIZutils::feedback(
DIZtools::feedback(
paste0(
"Connection to ",
input_system,
......@@ -560,7 +560,7 @@ print_runtime <-
} else {
text <- paste0("Execution of ", name, " took ")
}
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
text,
format(Sys.time() - start_time),
......@@ -659,7 +659,7 @@ get_settings_from_displayname <-
} else {
name_to_check <- settings[[i]]$displayname
}
if (DIZutils::equals2(name_to_check, displayname)) {
if (DIZtools::equals2(name_to_check, displayname)) {
return(settings[[i]])
} else {
return(NA)
......@@ -674,7 +674,7 @@ get_settings_from_displayname <-
}) == FALSE]
if (length(res) > 1) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Found more than one setting-list while searching for '",
displayname,
......
......@@ -35,7 +35,7 @@
#'
#' @export
button_send_datamap <- function(rv) {
DIZutils::feedback(
DIZtools::feedback(
print_this = "Sending the datamap",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
......@@ -103,7 +103,7 @@ button_mdr <-
mdr_filename,
logfile_dir,
headless) {
DIZutils::feedback(print_this = "Loading the metadata repository",
DIZtools::feedback(print_this = "Loading the metadata repository",
logfile_dir = logfile_dir,
headless = headless)
shiny::withProgress(message = "Loading MDR", value = 0, {
......
......@@ -56,23 +56,23 @@ launch_app <- function(port = 3838,
parallel = TRUE,
ncores = 2) {
DIZutils::global_env_hack(key = "utils_path",
DIZtools::assign_to_R_env(key = "utils_path",
val = utils_path,
pos = 1L)
DIZutils::global_env_hack(key = "mdr_filename",
DIZtools::assign_to_R_env(key = "mdr_filename",
val = mdr_filename,
pos = 1L)
DIZutils::global_env_hack(key = "logfile_dir",
DIZtools::assign_to_R_env(key = "logfile_dir",
val = logfile_dir,
pos = 1L)
DIZutils::global_env_hack(key = "parallel",
DIZtools::assign_to_R_env(key = "parallel",
val = parallel,
pos = 1L)
DIZutils::global_env_hack(key = "ncores",
DIZtools::assign_to_R_env(key = "ncores",
val = ncores,
pos = 1L)
......
......@@ -182,7 +182,7 @@ module_atemp_pl_server <- function(input, output, session, rv, input_re) {
)
}, error = function(e) {
shinyjs::logjs(e)
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Error while rendering the source counts while",
" determining the atemporal plausibilities."
......
......@@ -88,7 +88,7 @@ module_config_server <-
handlerExpr = {
rv$csv_dir_src_clicked <- FALSE
rv$csv_dir_src <- as.character(
DIZutils::clean_path_name(
DIZtools::clean_path_name(
shinyFiles::parseDirPath(
roots = roots,
selection = input$config_sourcedir_in
......@@ -101,7 +101,7 @@ module_config_server <-
rv$source$settings$path != "") {
# workaround to tell ui, that it is there
output$source_csv_dir <- reactive({
DIZutils::feedback(
DIZtools::feedback(
paste0("Source file dir: ",
rv$source$settings$path),
findme = "ad440c9fcb",
......@@ -118,7 +118,7 @@ module_config_server <-
## Fixes #42 (GitLab):
env_var_name <-
paste0(toupper(rv$source$system_name), "_PATH")
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"CSV path '",
rv$source$settings$path,
......@@ -137,10 +137,10 @@ module_config_server <-
## Sys.setenv(env_var_name = rv$source$settings$path) leads to
## `env_var_name = "path"` be created and not
## `example_name = "path"`):
DIZutils::setenv2(key = env_var_name, val = rv$source$settings$path)
DIZtools::setenv2(key = env_var_name, val = rv$source$settings$path)
rm(env_var_name)
DIZutils::feedback(
DIZtools::feedback(
paste0("rv$source$system_type = ",
rv$source$system_type),
findme = "91ebdd5a1d")
......@@ -159,7 +159,7 @@ module_config_server <-
handlerExpr = {
rv$csv_dir_tar_clicked <- FALSE
rv$csv_dir_tar <- as.character(
DIZutils::clean_path_name(
DIZtools::clean_path_name(
shinyFiles::parseDirPath(
roots = roots,
selection = input$config_targetdir_in
......@@ -171,7 +171,7 @@ module_config_server <-
rv$target$settings$path != "") {
# workaround to tell ui, that it is there
output$target_csv_dir <- reactive({
DIZutils::feedback(
DIZtools::feedback(
paste0("Target file dir: ",
rv$target$settings$path),
findme = "6f18c181e5",
......@@ -188,7 +188,7 @@ module_config_server <-
## Fixes #42 (GitLab):
env_var_name <-
paste0(toupper(rv$target$system_name), "_PATH")
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"CSV path '",
rv$target$settings$path,
......@@ -207,10 +207,10 @@ module_config_server <-
## Sys.setenv(env_var_name = rv$target$settings$path) leads to
## `env_var_name = "path"` be created and not
## `example_name = "path"`):
DIZutils::setenv2(key = env_var_name, val = rv$target$settings$path)
DIZtools::setenv2(key = env_var_name, val = rv$target$settings$path)
rm(env_var_name)
DIZutils::feedback(
DIZtools::feedback(
paste0("rv$target$system_type = ",
rv$target$system_type),
findme = "4690c52739")
......@@ -228,20 +228,20 @@ module_config_server <-
eventExpr = input_re()[["moduleConfig-config_load_mdr"]],
handlerExpr = {
if (is.null(rv$mdr)) {
DIZutils::feedback(
DIZtools::feedback(
print_this = "Reading MDR ...",
findme = "f877fee7d2",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0("MDR-Filename:",
rv$mdr_filename),
findme = "582d6a39c6",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0("rv$utilspath:",
rv$utilspath),
findme = "b5c71849f9",
......@@ -264,7 +264,7 @@ module_config_server <-
"source_system_type")
rv$systems <- unique(rv$mdr[, vec, with = FALSE])
rv$systems <- rv$systems[!is.na(get("source_system_name"))]
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Different systems found in the MDR: ",
paste(unique(rv$systems[["source_system_name"]]),
......@@ -313,7 +313,7 @@ module_config_server <-
rv$systems[!is.na(get("source_system_type")),
unique(get("source_system_type"))]
DIZutils::feedback(
DIZtools::feedback(
print_this = rv$system_types,
prefix = "System types: ",
findme = "9aec84fcca",
......@@ -322,7 +322,7 @@ module_config_server <-
)
if (!("csv" %in% tolower(rv$system_types))) {
# Remove CSV-Tabs:
DIZutils::feedback(
DIZtools::feedback(
"Removing csv-tab from source ...",
findme = "3c2f368001",
logfile_dir = rv$log$logfile_dir,
......@@ -331,7 +331,7 @@ module_config_server <-
shiny::removeTab(inputId = "source_tabs",
target = system_types_mapping[["csv"]])
DIZutils::feedback(
DIZtools::feedback(
"Removing csv-tab from target ...",
findme = "337b20a126",
logfile_dir = rv$log$logfile_dir,
......@@ -344,7 +344,7 @@ module_config_server <-
rv$systems[get("source_system_type") == "csv" &
!is.na(get("source_system_name")),
unique(get("source_system_name"))]
DIZutils::feedback(
DIZtools::feedback(
csv_system_names,
prefix = "csv_system_names: ",
findme = "5a083a3d53",
......@@ -369,7 +369,7 @@ module_config_server <-
}
if (!("postgres" %in% tolower(rv$system_types))) {
# Remove Postgres-Tabs:
DIZutils::feedback(
DIZtools::feedback(
"Removing postgres-tab from source ...",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
......@@ -377,7 +377,7 @@ module_config_server <-
shiny::removeTab(inputId = "source_tabs",
target = system_types_mapping[["postgres"]])
DIZutils::feedback(
DIZtools::feedback(
"Removing postgres-tab from target ...",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
......@@ -395,7 +395,7 @@ module_config_server <-
rv$systems[get("source_system_type") == "postgres" &
!is.na(get("source_system_name")),
unique(get("source_system_name"))]
DIZutils::feedback(
DIZtools::feedback(
postgres_system_names,
prefix = "postgres_system_names: ",
findme = "be136f5ab6",
......@@ -420,7 +420,7 @@ module_config_server <-
}
if (!("oracle" %in% tolower(rv$system_types))) {
# Remove Oracle-Tabs:
DIZutils::feedback(
DIZtools::feedback(
"Removing oracle-tab from source ...",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless,
......@@ -429,7 +429,7 @@ module_config_server <-
shiny::removeTab(inputId = "source_tabs",
target = system_types_mapping[["oracle"]])
DIZutils::feedback(
DIZtools::feedback(
"Removing oracle-tab from target ...",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless,
......@@ -448,7 +448,7 @@ module_config_server <-
rv$systems[get("source_system_type") == "oracle" &
!is.na(get("source_system_name")),
unique(get("source_system_name"))]
DIZutils::feedback(
DIZtools::feedback(
oracle_system_names,
prefix = "oracle_system_names: ",
findme = "bea2cd91a1",
......@@ -473,7 +473,7 @@ module_config_server <-
}
first_system <- tolower(rv$system_types)[[1]]
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0("Setting tab '",
first_system,
"' as active tab for source",
......@@ -528,7 +528,7 @@ module_config_server <-
# If the "load presets"-button was pressed, startload & show the presets:
# observeEvent(input$source_pg_presettings_btn, {
observeEvent(input$source_postgres_presettings_list, {
DIZutils::feedback(
DIZtools::feedback(
print_this =
paste0(
"Input-preset '",
......@@ -548,7 +548,7 @@ module_config_server <-
settings = rv$settings
)
DIZutils::feedback(
DIZtools::feedback(
print_this = paste(
"Loaded successfully.",
"Filling presets to global rv-object and UI ..."
......@@ -600,7 +600,7 @@ module_config_server <-
})
observeEvent(input$source_oracle_presettings_list, {
DIZutils::feedback(
DIZtools::feedback(
print_this =
paste0(
"Input-preset ",
......@@ -618,7 +618,7 @@ module_config_server <-
settings = rv$settings
)
DIZutils::feedback(
DIZtools::feedback(
print_this = paste(
"Loaded successfully.",
"Filling presets to global rv-object and UI ..."
......@@ -678,7 +678,7 @@ module_config_server <-
#observeEvent(input$target_pg_presettings_btn, {
observeEvent(input$target_postgres_presettings_list, {
DIZutils::feedback(
DIZtools::feedback(
paste0(
"Input-preset ",
input$target_postgres_presettings_list,
......@@ -696,7 +696,7 @@ module_config_server <-
settings = rv$settings
)
DIZutils::feedback(
DIZtools::feedback(
paste(
"Loaded successfully.",
"Filling presets to global rv-object and UI ..."
......@@ -748,7 +748,7 @@ module_config_server <-
})
observeEvent(input$target_oracle_presettings_list, {
DIZutils::feedback(
DIZtools::feedback(
paste0(
"Input-preset ",
input$target_oracle_presettings_list,
......@@ -766,7 +766,7 @@ module_config_server <-
settings = rv$settings
)
DIZutils::feedback(
DIZtools::feedback(
paste(
"Loaded successfully.",
"Filling presets to global rv-object and UI ..."
......@@ -886,7 +886,7 @@ module_config_server <-
feedback_txt(system = "The source system", type = "target")
})
# Feedback to the console:
DIZutils::feedback(
DIZtools::feedback(
"Target == source now.",
findme = "94d3a2090c",
logfile_dir = rv$log$logfile_dir,
......@@ -902,7 +902,7 @@ module_config_server <-
showTab(inputId = "target_tabs", target = "PostgreSQL")
showTab(inputId = "target_tabs", target = "Oracle")
# Feedback to the console:
DIZutils::feedback(
DIZtools::feedback(
"Target != source now.",
findme = "ec51b122ee",
logfile_dir = rv$log$logfile_dir,
......@@ -947,7 +947,7 @@ module_config_server <-
## For runtime calculation:
start_time <- Sys.time()
DIZutils::feedback(
DIZtools::feedback(
paste0(
"Restricting date slider state: ",
input$date_restriction_slider
......@@ -969,7 +969,7 @@ module_config_server <-
# check, if mdr is present. without mdr, we cannot perform any
# further operations
if (is.null(rv$mdr)) {
DIZutils::feedback(
DIZtools::feedback(
"No MDR found. Please provide a metadata repository (MDR).",
type = "Warning",
findme = "1dc68937b8",
......@@ -1001,7 +1001,7 @@ module_config_server <-
# Check if at least one data element was selected for analyzation:
if (length(input_re()[[paste0("moduleConfig-select_dqa_assessment",
"_variables")]]) <= 0) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"You didn't specify a data element to",
" analyze. Please select at least one data element",
......@@ -1018,26 +1018,26 @@ module_config_server <-
# If target should be identical to source, set it here again:
if (isTRUE(rv$target_is_source)) {
rv <- set_target_equal_to_source(rv)
DIZutils::feedback(print_this = "Source == Target",
DIZtools::feedback(print_this = "Source == Target",
findme = "c14c17bf15",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
} else {
DIZutils::feedback(print_this = "Source != Target",
DIZtools::feedback(print_this = "Source != Target",
findme = "54fe9a5717",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
}
DIZutils::feedback(
DIZtools::feedback(
paste0("Source system is ", rv$source$system_name),
findme = "1d61685355",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
DIZutils::feedback(
DIZtools::feedback(
paste0("Target system is ", rv$target$system_name),
findme = "eaf72ed747",
logfile_dir = rv$log$logfile_dir,
......@@ -1075,7 +1075,7 @@ module_config_server <-
)
}
}, error = function(cond) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(cond),
findme = "05c96798f8",
type = "Error",
......@@ -1118,7 +1118,7 @@ module_config_server <-
shiny::observeEvent(eventExpr = input$date_restriction_slider,
handlerExpr = {
if (isTRUE(input$date_restriction_slider)) {
DIZutils::feedback(
DIZtools::feedback(
print_this = "Date restriction will be applied",
findme = "4736de090c",
logfile_dir = rv$log$logfile_dir
......@@ -1131,7 +1131,7 @@ module_config_server <-
rv$restricting_date$end <-
as.Date(input$datetime_picker[[2]])
} else {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0("Date restriction will",
" NOT be applied"),
findme = "508c7f34f9",
......@@ -1170,7 +1170,7 @@ module_config_server <-
input$datetime_picker[[2]]
)
})
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Using ",
rv$restricting_date$start,
......
......@@ -71,7 +71,7 @@ module_dashboard_server <-
## Save restricting date information to rv object:
if (isFALSE(rv$restricting_date$use_it)) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"No time contstraints will be applied to input data.",
" Either `restricting_date_start` or ",
......@@ -99,7 +99,7 @@ module_dashboard_server <-
## Check the start date:
if (is.na(restricting_date_start_posixct)) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0("Couldn't identify input date",
" format for `restricting_date_start`."),
logfile = rv$log$logfile_dir,
......@@ -111,7 +111,7 @@ module_dashboard_server <-
## Check the end date:
if (is.na(restricting_date_end_posixct)) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Couldn't identify input date format for ",
" `restricting_date_end`.",
......@@ -128,7 +128,7 @@ module_dashboard_server <-
## Check if start < end:
if (restricting_date_end_posixct <=
restricting_date_start_posixct) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"`restricting_date_start` needs to be a timestamp",
" before `restricting_date_end`.",
......@@ -151,7 +151,7 @@ module_dashboard_server <-
restricting_date_start_posixct
rv$restricting_date$end <- restricting_date_end_posixct
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Time contstraints from ",
rv$restricting_date$start,
......@@ -175,7 +175,7 @@ module_dashboard_server <-
enable_stop = FALSE
)
} else {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Don't checking the time filtering columns because",
" time filtering is not necessarry.",
......@@ -236,7 +236,7 @@ module_dashboard_server <-
## load target_data
if (isTRUE(rv$target_is_source)) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Source and Target settings are identical.",
" Using source data also as target data."
......@@ -248,7 +248,7 @@ module_dashboard_server <-
rv <- set_target_equal_to_source(rv)
rv$data_target <- rv$data_source
} else {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(
"Source and Target settings are NOT identical.",
" Loading the target dataset now."
......@@ -400,7 +400,7 @@ module_dashboard_server <-
)
if (!is.null(rv$datamap)) {
DIZutils::feedback(print_this = paste0(
DIZtools::feedback(print_this = paste0(
"Datamap:", rv$datamap),
findme = "43404a3f38")
}
......@@ -418,7 +418,7 @@ module_dashboard_server <-
rv$create_report <- TRUE
}
}, error = function(cond) {
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0(cond),
findme = "32b84ec323",
type = "Error",
......
......@@ -3,7 +3,7 @@ output_dir = "output/"
## debugging the MIRACUM stuff (JM):
## ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
# utils_path = DIZutils::clean_path_name(system.file("application/_utilities",
# utils_path = DIZtools::clean_path_name(system.file("application/_utilities",
# package = "miRacumDQA"))
# mdr_filename = "mdr.csv"
# logfile_dir = "~/share/logfiles/"
......@@ -12,7 +12,7 @@ output_dir = "output/"
## debugging the MIRACUM stuff (LK):
## ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
# utils_path = DIZutils::clean_path_name(system.file("application/_utilities",
# utils_path = DIZtools::clean_path_name(system.file("application/_utilities",
# package = "miRacumDQA"))
# mdr_filename = "mdr.csv"
# logfile_dir <- tempdir()
......@@ -35,15 +35,15 @@ ncores = 4
## Lorenz:
# utils_path = "/home/user/development/Rpackages/dqa/miracumdqa/inst/application/_utilities/"
## Jonathan:
# utils_path = DIZutils::clean_path_name(system.file("application/_utilities",
# utils_path = DIZtools::clean_path_name(system.file("application/_utilities",
# package = "miRacumDQA"))
# utils_path = DIZutils::clean_path_name(system.file("application/_utilities",
# utils_path = DIZtools::clean_path_name(system.file("application/_utilities",
# package = "ume_dqatool"))
# utils_path = "~/git-local/miracum/ume_dqatool/inst/application/_utilities/"
# mdr_filename = "mdr_combined.csv"
DIZutils::set_env_vars(
DIZtools::setenv_file(
paste0(
"../",
list.files(path = "../", pattern = "^env_INTERNAL.*")
......
......@@ -28,7 +28,7 @@ my_desc$set_authors(c(
# Remove some author fields
my_desc$del("Maintainer")
# Set the version
my_desc$set_version("0.1.7")
my_desc$set_version("0.1.8")
# The title of your package
my_desc$set(Title = "Graphical User Interface for Data Quality Assessment")
# The description of your package
......@@ -79,6 +79,7 @@ usethis::use_package("shinyWidgets", type = "Imports")
usethis::use_package("knitr", type = "Imports")
usethis::use_package("jsonlite", type = "Imports")
usethis::use_package("DIZutils", type = "Imports", min_version = "0.0.12")
usethis::use_package("DIZtools", type = "Imports")
usethis::use_package("DQAstats", type = "Imports", min_version = "0.2.3")
# For loading-animations:
usethis::use_package("waiter", type = "Imports")
......@@ -183,3 +184,4 @@ usethis::use_git_ignore(".~lock.*.csv#")
system(
command = 'auto-changelog -u -t "DQAgui NEWS" --tag-prefix "v" -o "NEWS.md"'
)
......@@ -21,8 +21,8 @@ shiny::shinyServer(function(input, output, session) {
rv <- shiny::reactiveValues(
headless = FALSE,
mdr_filename = mdr_filename,
log = list(logfile_dir = DIZutils::clean_path_name(logfile_dir)),
utilspath = DIZutils::clean_path_name(utils_path),
log = list(logfile_dir = DIZtools::clean_path_name(logfile_dir)),
utilspath = DIZtools::clean_path_name(utils_path),
current_date = format(Sys.Date(), "%d. %B %Y", tz = "CET"),
parallel = parallel,
ncores = ncores
......@@ -31,28 +31,28 @@ shiny::shinyServer(function(input, output, session) {
shiny::observe({
if (is.null(rv$finished_onstart)) {
# Clean old connections (e.g. after reloading the app):
DIZutils::close_all_connections(
DIZtools::close_all_connections(
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
# Create new logfile:
DIZutils::cleanup_old_logfile(logfile_dir = rv$log$logfile_dir)
DIZtools::cleanup_old_logfile(logfile_dir = rv$log$logfile_dir)
# feedback directories
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0("Logfile dir: ",
rv$log$logfile_dir),
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0("Utils path: ",
rv$utilspath),
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
DIZutils::feedback(
DIZtools::feedback(
print_this = paste0("MDR filename: ",
rv$mdr_filename),
logfile_dir = rv$log$logfile_dir,
......@@ -63,7 +63,7 @@ shiny::shinyServer(function(input, output, session) {
rv$datamap_email <- tryCatch(
expr = {
# if existing, set email address for data-map button
out <- DIZutils::get_config(
out <- DIZtools::get_config(
config_file = paste0(utils_path, "/MISC/email.yml"),
config_key = "email",
logfile_dir = rv$log$logfile_dir,
......@@ -92,23 +92,23 @@ shiny::shinyServer(function(input, output, session) {
# handle reset
shiny::observeEvent(input$reset, {
DIZutils::feedback(
DIZtools::feedback(
print_this = "\U2304",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
DIZutils::feedback(
DIZtools::feedback(
print_this = "############ APP WAS RESETTED ############",
findme = "9c57ce125a",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
DIZutils::feedback(
DIZtools::feedback(
print_this = "\U2303",
logfile_dir = rv$log$logfile_dir,
headless = rv$headless
)
DIZutils::close_all_connections(logfile_dir = rv$log$logfile_dir,
DIZtools::close_all_connections(logfile_dir = rv$log$logfile_dir,
headless = rv$headless)
invisible(gc())
session$reload()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment