From 913211895dd026810d41ab2c0f31779c2d4272c4 Mon Sep 17 00:00:00 2001 From: Claudius Appel <151634114+Claudius-Appel@users.noreply.github.com> Date: Fri, 17 May 2024 21:57:19 +0200 Subject: [PATCH 1/3] `duflor_gui()`: reactive `DEBUGKEYS`, cb `dev_key_handler()`: remove old, unused keys, document how to add new ones, closes #74 --- R/app.R | 6 +++--- R/dev_key_handler.R | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/R/app.R b/R/app.R index 16202eb..8cbcaa8 100644 --- a/R/app.R +++ b/R/app.R @@ -227,10 +227,10 @@ duflor_gui <- function() { folder_path = NA ) DEBUGKEYS <- reactiveValues( - force.prints = FALSE, - force.log = FALSE, + # if you want to have functionality blocked by the dev-console, add + # the key here with its default value. + # Next, update the logic within the function `dev_key_handler` set.author = TRUE - ) FLAGS <- reactiveValues( analyse_single_image = FALSE, diff --git a/R/dev_key_handler.R b/R/dev_key_handler.R index af70d8e..547ba0c 100644 --- a/R/dev_key_handler.R +++ b/R/dev_key_handler.R @@ -30,20 +30,20 @@ #' dev_key_handler <- function(input, DATA, DEBUGKEYS, session, use_logical_cores) { # add valid keys here - # private, undocumentable keys must be prefixed with 3 `-` - Arr <- str_split("--force-prints,--force-log,---set-author,---set-cores,-h",",") - # then add them to the reactive 'DEBUGKEYS' so that it can be accessed elsewhere as well. + keys_array <- str_split("---set-cores,-h",",") + # then add them to the reactive 'DEBUGKEYS' (see 'app.R', search for 'DEBUGKEYS <- reactiveValues(') + # so that it can be accessed elsewhere as well. Keys <- unlist(str_split(input$dev_pass,",")) for (each in Keys) { each_ <- str_remove_all(each,"=(1|0|FALSE|TRUE)") each_ <- str_remove_all(each,"=(F|T)") each__ <- str_remove_all(each,"=.*") - if ((each %in% Arr[[1]]) || (each_ %in% Arr[[1]]) || (each__ %in% Arr[[1]])) { # BUG: this bool returns an array if `each` is a char-vector itself. + if ((each %in% keys_array[[1]]) || (each_ %in% keys_array[[1]]) || (each__ %in% keys_array[[1]])) { # BUG: this bool returns an array if `each` is a char-vector itself. if (each=="-h") { showNotification( ui = str_c( "Available dev Keys (see documentation): ", - str_flatten_comma(Arr[[1]][!str_count(Arr[[1]], "---")]) + str_flatten_comma(keys_array[[1]]) ), duration = DATA$notification_duration, type = "message" From cadc8f5669f94b7899c651854e7eb8e6f37e8178 Mon Sep 17 00:00:00 2001 From: Claudius Appel <151634114+Claudius-Appel@users.noreply.github.com> Date: Fri, 17 May 2024 21:59:04 +0200 Subject: [PATCH 2/3] version bump to `0.0.1.9053` --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5075163..088a655 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: duflor.gui Title: Frontend for duflor-package -Version: 0.0.1.9052 +Version: 0.0.1.9053 Author: Claudius Appel Authors@R: c( person("Claudius", "Appel", email = "claudius.appel@freenet.de" , role = c("aut", "cre")) From 390ab1d7f7986f3dcb5f265acc10af752950a1b2 Mon Sep 17 00:00:00 2001 From: Claudius Appel <151634114+Claudius-Appel@users.noreply.github.com> Date: Fri, 17 May 2024 22:11:58 +0200 Subject: [PATCH 3/3] chore: update pkgdown site --- docs/404.html | 2 +- docs/LICENSE-text.html | 2 +- docs/LICENSE.html | 2 +- docs/articles/general-user-manual.html | 2 +- docs/articles/identifier-cropping.html | 2 +- docs/articles/image-cropping.html | 2 +- docs/articles/index.html | 2 +- docs/articles/modifying-hsv-bounds.html | 2 +- docs/articles/optimising-speed.html | 2 +- docs/articles/parallelisation.html | 2 +- docs/articles/raising-issues.html | 2 +- docs/articles/saving-and-restoring-application-states.html | 2 +- docs/authors.html | 6 +++--- docs/index.html | 2 +- docs/pkgdown.yml | 2 +- docs/reference/convert_pixels_to_area_gui.html | 2 +- docs/reference/dev_key_handler.html | 2 +- docs/reference/duflor_gui.html | 2 +- docs/reference/execute_analysis.html | 2 +- docs/reference/execute_multiple.html | 2 +- docs/reference/execute_single.html | 2 +- docs/reference/get_KPI_plot.html | 2 +- docs/reference/get_group.html | 2 +- docs/reference/get_image_dimensions.html | 2 +- docs/reference/index.html | 2 +- docs/reference/key_handle_cores.html | 2 +- docs/reference/limit_identifier_coordinates.html | 2 +- docs/reference/limit_to_range.html | 2 +- docs/reference/open_parallelPanel_event.html | 2 +- docs/reference/prepare_resultsObject.html | 2 +- docs/reference/render_selected_mask.html | 2 +- docs/reference/restore_state.html | 2 +- docs/reference/save_error_state.html | 2 +- docs/reference/save_state.html | 2 +- docs/reference/select_spectra_gui_comp.html | 2 +- docs/reference/setup_parallel.html | 2 +- .../show_infringing_spectrum_elements_gui_comp.html | 2 +- docs/reference/shutdown_parallel.html | 2 +- docs/reference/store_KPI_plot_to_file.html | 2 +- docs/reference/store_results_to_file.html | 2 +- docs/reference/update_resultsObject.html | 2 +- docs/reference/validate_custom_HSV_values.html | 2 +- docs/search.json | 2 +- 43 files changed, 45 insertions(+), 45 deletions(-) diff --git a/docs/404.html b/docs/404.html index c40e2c3..80c951d 100644 --- a/docs/404.html +++ b/docs/404.html @@ -24,7 +24,7 @@ duflor.gui - 0.0.1.9052 + 0.0.1.9053