Skip to content

Commit 650f5df

Browse files
authored
Merge pull request #29 from Boehringer-Ingelheim/303774-tweaks
Expand tracked_hash to two bytes per variable + misc
2 parents cece2e4 + ee7647b commit 650f5df

10 files changed

Lines changed: 231 additions & 155 deletions

File tree

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# formatting
2+
23b125d3d44eda8230e873fcbd88f2a20175d087
3+
a5a5d133ad5ef0df7fd40be2ec4f9cd22ab0fa9d

.lintr.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ linters <- lintr::modify_defaults(
99
, object_length_linter = NULL # we don't type long var names just because
1010
, pipe_continuation_linter = NULL # wickham being overly prescriptive
1111
, trailing_blank_lines_linter = NULL # natural extension of trailing_whitespace_linter, present on the template
12+
, semicolon_linter = NULL # used to highlight checks that lead to the early out on a function
1213
)
1314

1415
if(identical(Sys.getenv('CI'), "true")){

R/mod_listings.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ listings_UI <- function(module_id) { # nolint
217217
#' @param on_sbj_click `[function()]`
218218
#'
219219
#' Function to invoke when a subject ID is clicked in a listing
220+
#'
221+
#' @param review `[list()]`
222+
#'
223+
#' Configuration of the experimental data review feature.
224+
#' For more details, please refer to `vignette("data_review")`.
220225
#'
221226
#' @export
222227
listings_server <- function(module_id,
@@ -389,7 +394,7 @@ listings_server <- function(module_id,
389394
"clear_filters",
390395
# NOTE(miguel): Added here for easier merge with other branches
391396
# TODO(miguel): Move elsewhere after merging
392-
REV_UI(ns = ns, roles = review[["roles"]])[["input_ids_to_exclude_from_bookmarking"]]
397+
REV_UI(ns = ns, roles = character(0))[["input_ids_to_exclude_from_bookmarking"]]
393398
))
394399

395400
# Bookmarking (end)
@@ -429,6 +434,10 @@ listings_server <- function(module_id,
429434
} else {
430435
fs_client <- fs_init(fs_callbacks, review[["store_path"]])
431436
}
437+
438+
# Overly restrictive sanitization of role strings, as they will be used for file names:
439+
# TODO: Consider adapting https://github.com/r-lib/fs/blob/main/R/sanitize.R instead to allow alternative charsets
440+
review[["roles"]] <- gsub("[^a-zA-Z0-9 _.-]", "", review[["roles"]]) # Accepts alpha+num+space+'.'+'_'+'-'
432441

433442
output[[TBL$REVIEW_UI_ID]] <- shiny::renderUI(
434443
shinyWidgets::dropdownButton(

R/review.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ REV_include_review_info <- function(annotation_info, data, col_names, extra_col_
6969
}
7070

7171
REV_UI <- function(ns, roles) {
72-
choices <- setNames(c("", roles), c("<select reviewer role>", make.names(roles)))
72+
choices <- setNames(c("", roles), c("<select reviewer role>", roles))
7373

7474
res <- list()
7575
res[["ui"]] <- shiny::tagList(
@@ -108,8 +108,6 @@ REV_load_annotation_info <- function(folder_contents, review, dataset_lists) {
108108
folder_IO_plan <<- c(folder_IO_plan, list(action))
109109
}
110110

111-
review[["roles"]] <- make.names(review[["roles"]])
112-
113111
for (dataset_lists_name in names(dataset_lists)) {
114112
sub_res <- list()
115113
dataset_list <- dataset_lists[[dataset_lists_name]]
@@ -590,7 +588,7 @@ REV_logic_2 <- function(ns, state, input, review, datasets, selected_dataset_lis
590588
SH$double_to_raw(timestamp)
591589
)
592590

593-
fname <- paste0(dataset_name, "_", make.names(role), ".review")
591+
fname <- paste0(dataset_name, "_", role, ".review")
594592

595593
IO_plan <- list(
596594
list(

0 commit comments

Comments
 (0)