Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thuringothyris #141

Merged
merged 9 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
cache-version: 2
extra-packages: any::rcmdcheck
needs: check

Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: requal
Title: Shiny Application for Computer-Assisted Qualitative Data Analysis
Version: 1.1.1.9006
Version: 1.1.2
Authors@R:
c(
person(given = "Radim",
Expand Down
15 changes: 15 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# requal 1.1.2 Thuringothyris

__Release notes:__

- Export functions
- Export enabled for memos and codebooks. Segments export now includes character positions.
- Citation information
- Updated citation information for proper referencing.
- User Interface
- Minor UI updates plus a new logo.
- Improved testing
- Certain behaviors are now formally tested with the integration of `shinytest2`.
- Permission controls in server mode
- Project owners will no longer be able to inadvertently revoke their own permission privileges.

# requal 1.1.1

- export memos
Expand Down
6 changes: 3 additions & 3 deletions R/app_ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ app_ui <- function(request, mode = NULL, access = NULL) {
golem_add_external_resources(),
# Your application UI logic
dashboardPage(
title = "reQual",
title = "requal",
options = list(sidebarExpandOnHover = FALSE),
header = dashboardHeader(
title = tags$span(
tags$img(
src = "www/requal_logo.png",
height = "70%", style = "margin-right: 20px"
), "reQual"
), "requal"
),
controlbarIcon = icon("ellipsis-v", id = "launchpad_icon"),
dropdownBlock2(
Expand Down Expand Up @@ -62,7 +62,7 @@ golem_add_external_resources <- function() {
favicon(),
bundle_resources(
path = app_sys("app/www"),
app_title = "reQual"
app_title = "requal"
),
# Add here other external resources
# for example, you can add shinyalert::useShinyalert()
Expand Down
4 changes: 2 additions & 2 deletions R/db_startup.R
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ update_db_schema <- function(pool) {

purrr::walk(to_create_tables$sql, ~ DBI::dbExecute(pool, .x))
}
message("Updated reQual schema.")
message("Updated requal schema.")
} else {
NULL
}
Expand Down Expand Up @@ -423,7 +423,7 @@ update_db_schema <- function(pool) {

purrr::walk(to_create_tables$sql, ~ DBI::dbExecute(pool, .x))
}
message("Updated reQual schema.")
message("Updated requal schema.")
} else {
NULL
}
Expand Down
8 changes: 4 additions & 4 deletions R/mod_about.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
mod_about_ui <- function(id) {
ns <- NS(id)
# Citation info ----
rql_citation <- citation("requal")
rql_citation <- utils::citation("requal")
# Extract authors
authors <- sapply(as.character(rql_citation$author), function(x) strsplit(x, " ")) # Split the author names into first and last names
# Format the authors as "Last name, Initial."
Expand All @@ -30,14 +30,14 @@ mod_about_ui <- function(id) {
href = "https://requal.fsv.cuni.cz/",
tags$img(src = "www/requal_logo.png", width = "5%"), target = "_blank"
),
"reQual CAQDAS"
"requal CAQDAS"
),
textOutput(ns("version_project")),
textOutput(ns("version_package")),
p(),
p(
"For help, consult ",
a("reQual Wiki", href = "https://github.com/RE-QDA/requal/wiki", target = "_blank"),
a("requal Wiki", href = "https://github.com/RE-QDA/requal/wiki", target = "_blank"),
".",
br(),
"Leave feedback on our ",
Expand Down Expand Up @@ -68,7 +68,7 @@ mod_about_ui <- function(id) {
p("To cite package", tags$code("requal"), "in publications use:"),
HTML(apa_citation), p(),
p("A BibTeX entry for LaTeX users:"),
tags$pre(paste(toBibtex(citation("requal")), collapse = "\n"))
tags$pre(paste(utils::toBibtex(utils::citation("requal")), collapse = "\n"))
)
}

Expand Down
4 changes: 2 additions & 2 deletions R/mod_codebook.R
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ mod_codebook_server <- function(id, glob) {

output$export_codebook <- downloadHandler(
filename = function() {
"requal_codebook_export.csv"
"requal_codebook.csv"
},
content = function(file) {
codebook <- get_codebook_export_table(glob)
write.csv(codebook, file)
utils::write.csv(codebook, file)
}
)

Expand Down
2 changes: 1 addition & 1 deletion R/mod_doc_manager.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' doc_manager UI Function
#'
#' @description This module accept document inputs and writes them to ReQual database.
#' @description This module accept document inputs and writes them to Requal database.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/mod_download_html.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ mod_download_html_server <- function(id, glob){
winslash = "/", mustWork = FALSE)
fileConn<-file(tempReport)
writeLines(c("---",
"title: 'reQual report'",
"title: 'requal report'",
"output: html_document",
"---",
"```{r, echo=FALSE}",
Expand Down
2 changes: 1 addition & 1 deletion R/mod_memo.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ mod_memo_server <- function(id, glob) {
},
content = function(file) {
memos <- export_memos(glob$pool, glob$active_project)
write.csv(memos, file)
utils::write.csv(memos, file)
}
)

Expand Down
2 changes: 2 additions & 0 deletions R/mod_memo_utils_memo.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
utils::globalVariables(c("memo_title"))

# list existing memos ------
list_memo_records <- function(pool, project) {
dplyr::tbl(pool, "memos") %>%
Expand Down
2 changes: 2 additions & 0 deletions R/mod_project.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
utils::globalVariables(c("project_description"))

#' project UI Function
#'
#' @description A shiny Module.
Expand Down
4 changes: 2 additions & 2 deletions R/mod_user_manager.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ mod_user_manager_server <- function(id, glob) {

modified_permissions_df <- loc$users_permissions_df %>%
dplyr::filter(user_id %in% input$members_permissions) %>%
dplyr::mutate(across(matches("modify|view"), .fns = function(x) {
dplyr::mutate(dplyr::across(dplyr::matches("modify|view"), .fns = function(x) {
x <- 0 # reset permissions
})) %>%
dplyr::mutate(across(all_of(input$permissions_list), .fns = function(x) {
dplyr::mutate(dplyr::across(dplyr::all_of(input$permissions_list), .fns = function(x) {
x <- 1 # apply new permissions
}))

Expand Down
2 changes: 1 addition & 1 deletion R/mod_user_manager_utils_user_manager.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
utils::globalVariables(c("user", "user_mail", "value_old"))
utils::globalVariables(c("user", "user_mail", "value_old", "user_login"))

# disabled_checkbox <- function(inputId, label, value = FALSE, width = NULL){
# value <- shiny::restoreInput(id = inputId, default = value)
Expand Down
2 changes: 1 addition & 1 deletion R/mod_user_utils_user.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ permission_button <- function(class, color, title) {

transform_user_table <- function(user_table) {
user_table %>%
dplyr::mutate(across(-c(user_id, created_at, user_mail, user_name, user_login),
dplyr::mutate(dplyr::across(-c(user_id, created_at, user_mail, user_name, user_login),
.fn = function(x) {
dplyr::case_when(
x == 1 & stringr::str_detect(dplyr::cur_column(), "other_modify") ~ permission_button("fas fa-users", "black", "Can modify others"),
Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ knitr::opts_chunk$set(
)
```

# reQual
# requal

<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
Expand Down Expand Up @@ -70,7 +70,7 @@ On the first launch of the app, use the "Create" menu to set up a new project by

`requal` is designed with reproducibility, openness, and transparency in mind, and these values are most evident when it's used collaboratively. You can achieve this by self-hosting `requal` on your own server. A server instance of `requal` can support multiple users and offers fine-grained permission settings, making it easier to form diverse teams and collaborate in real time. With `requal`, you can discuss codes, evaluate agreement on codes, and estimate the sensitivity of coding to the attributes of your team members.

However, setting up a server instance is not a simple task. It requires a basic level of system administration experience. If you need assistance, the IT department at your institution should be able to help set up an `requal` server instance by following these [instructions](https://github.com/RE-QDA/requal/wiki/Server-setup). To get a sense of how `requal` operates in server mode, take a look at the public demo available on the [reQual project website](https://requal.fsv.cuni.cz/).
However, setting up a server instance is not a simple task. It requires a basic level of system administration experience. If you need assistance, the IT department at your institution should be able to help set up an `requal` server instance by following these [instructions](https://github.com/RE-QDA/requal/wiki/Server-setup). To get a sense of how `requal` operates in server mode, take a look at the public demo available on the [requal project website](https://requal.fsv.cuni.cz/).

>NOTE: It is crucial to prioritize __data security__ when hosting your `requal` instance publicly over the internet. At the very least, enabling the TLS protocol is a necessary precaution. However, be aware that this measure alone will not fully protect you from knowledgeable attackers. Consequently, it is important that you only analyze public, GDPR-compliant, and non-confidential data via `requal` in server mode. If you intend to use `requal` for collaborative work involving confidential or sensitive data, ensure this is done behind adequate firewalls or on internal networks established in secure locations. Always consult with your data stewards and/or research ethics committee to determine the appropriate level of security control for your dataset. In the future, we plan to provide support for data de-identification. This will allow you to perform de-identification locally and collaboratively analyze the de-identified dataset online.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# reQual
# requal

<!-- badges: start -->

Expand Down Expand Up @@ -88,7 +88,7 @@ assistance, the IT department at your institution should be able to help
set up an `requal` server instance by following these
[instructions](https://github.com/RE-QDA/requal/wiki/Server-setup). To
get a sense of how `requal` operates in server mode, take a look at the
public demo available on the [reQual project
public demo available on the [requal project
website](https://requal.fsv.cuni.cz/).

> NOTE: It is crucial to prioritize **data security** when hosting your
Expand All @@ -106,7 +106,7 @@ website](https://requal.fsv.cuni.cz/).
> de-identification. This will allow you to perform de-identification
> locally and collaboratively analyze the de-identified dataset online.

## Acknowledgement
## Acknowledgment

The application development has been supported by The Technology Agency
of the Czech Republic, project n. TL05000054, and CLS INFRA Fellowship
Expand Down
22 changes: 21 additions & 1 deletion inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
Acknowledgement
CLS
CMD
Coelostegus
DESC
DEV
GDPR
Lifecycle
Reproducibility
Programme
RQDA
TLS
Thuringothyris
UI
caselinkage
codebook
codebooks
codecat
colours
de
freecode
golem
magrittr
md
reproducibility
shinymanager
shinytest
2 changes: 1 addition & 1 deletion inst/test_app/tests/testthat/_snaps/app-create-codes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# {shinytest2} testing create codebook

"requal_codebook_export.csv"
"requal_codebook.csv"

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"output": {
"codebook_ui_1-codes_ui": {
"html": "<div data-code_id=\"1\" class=\"code_item\" style=\"max-width: 500px\">\n <div class=\"box box-solid collapsed-box bg-light-blue\" id=\"1\">\n <div class=\"box-header with-border\">\n <h3 class=\"box-title\">Code1<\/h3>\n <div class=\"box-tools pull-right\">\n <span class=\"label label-warning custom_label\" style=\"background-color:rgb(255, 255, 0) !important;\">code<\/span>\n <button class=\"btn btn-box-tool btn-md\" type=\"button\" data-widget=\"collapse\">\n <i class=\"fa fa-plus\" role=\"presentation\" aria-label=\"plus icon\"><\/i>\n <\/button>\n <\/div>\n <\/div>\n <div class=\"box-body\">\n Code description\n \n <\/div>\n <\/div>\n <script type=\"application/json\" data-for=\"1\">{\"title\":\"Code1\",\"solidHeader\":true,\"background\":\"light-blue\",\"collapsible\":true,\"closable\":false,\"gradient\":false}<\/script>\n<\/div>",
"html": "<div data-code_id=\"1\" class=\"code_item\" style=\"max-width: 500px\">\n <div class=\"box box-solid collapsed-box bg-light-blue\" id=\"1\">\n <div class=\"box-header with-border\">\n <h3 class=\"box-title\">Code1<\/h3>\n <div class=\"box-tools pull-right\">\n <span class=\"label label-warning custom_label\" style=\"background-color:rgb(255, 255, 0) !important;\">code<\/span>\n <button class=\"btn btn-box-tool btn-md\" type=\"button\" data-widget=\"collapse\">\n <i class=\"fas fa-plus\" role=\"presentation\" aria-label=\"plus icon\"><\/i>\n <\/button>\n <\/div>\n <\/div>\n <div class=\"box-body\">\n Code description\n \n <\/div>\n <\/div>\n <script type=\"application/json\" data-for=\"1\">{\"title\":\"Code1\",\"solidHeader\":true,\"background\":\"light-blue\",\"collapsible\":true,\"closable\":false,\"gradient\":false}<\/script>\n<\/div>",
"deps": [
{
"name": "font-awesome",
"version": "5.15.3",
"version": "6.4.2",
"src": {
"href": "font-awesome-5.15.3"
"href": "font-awesome-6.4.2"
},
"meta": null,
"script": null,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading