Skip to content

Commit

Permalink
Merge pull request #814 from pharmaR/dev
Browse files Browse the repository at this point in the history
Next Release: `v3.1.2`
  • Loading branch information
aclark02-arcus authored Jan 27, 2025
2 parents b91c6e3 + b582c47 commit 7165440
Show file tree
Hide file tree
Showing 14 changed files with 272 additions and 247 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'renv'
use-public-rspm: true
use-public-rspm: false
- uses: r-lib/actions/setup-renv@v2

- name: Install riskassessment
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
use-public-rspm: false
r-version: 'renv'

- uses: r-lib/actions/setup-renv@v2
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: riskassessment
Title: A web app designed to interface with the `riskmetric` package
Version: 3.1.1
Version: 3.1.2
Authors@R: c(
person("Aaron", "Clark", role = c("aut", "cre"), email = "[email protected]"),
person("Jeff", "Thompson", role = c("aut"), email = "[email protected]", comment = "Co-Lead"),
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# riskassessment 3.1.2

Mostly minor changes here!

* Can now Open hyperlinks in a **new tab** from cards.
* Added `inherits` to list of used configs
* Fixed bug causing app to crash with `ELSE` condition in rules
* Fixed bug where 'Decision Automation' header would disappear when non-risk decision automation rules existed but failed to include any that were based on the pkg risk score.
* Incorporate newer version of `riskmetric` for dependency assessment

# riskassessment 3.1.1

* Added navigation controls in Function Explorer tab (#644)
Expand Down
2 changes: 1 addition & 1 deletion R/mod_decision_automation.R
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ mod_decision_automation_server <- function(id, user, credentials){
),
uiOutput(ns("empty_auto")),
)
} else if (!rlang::is_empty(auto_decision_initial)) {
} else if (!rlang::is_empty(risk_rule_update())) {
tagList(
br(),br(),
hr(),
Expand Down
3 changes: 2 additions & 1 deletion R/mod_decision_automation_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ assign_decisions <- function(rule_list, package, db_name = golem::get_golem_opti
if (!is.na(decision)) break
rule <- rule_list[[i]]

fn <- purrr::possibly(rule$mapper, otherwise = FALSE)
if (rlang::is_function(rule$mapper) || rlang::is_formula(rule$mapper))
fn <- purrr::possibly(rule$mapper, otherwise = FALSE)
if (rule$type == "overall_score") {
decision <- if (fn(get_pkg_info(package)$score)) rule$decision else NA_character_
log_message <- glue::glue("Decision for the package {package} was assigned {decision} because the risk score returned TRUE for `{rule$condition}`")
Expand Down
2 changes: 1 addition & 1 deletion R/mod_metricBox.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ metricBoxServer <- function(id, title, desc, value, score = "NULL",
} else if (is_url) {
value <- a(ifelse(nchar(value) <= val_max_nchar, value,
glue::glue("{stringr::str_sub(value, 1, (val_max_nchar - 3))}...")
), href = value)
), target = "_blank", href = value)
} # unfortunately, adding the href can sometimes force the footer to fall
# outside the card when val_max_nchar is too large.
else if (value %in% c("TRUE", "FALSE")) {
Expand Down
4 changes: 3 additions & 1 deletion R/utils_startup.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ initialize_raa <- function(assess_db, cred_db, configuration) {
if (isTRUE(getOption("shiny.testmode"))) return(NULL)

db_config <- if(missing(configuration)) get_db_config(NULL) else configuration
used_configs <- c("assessment_db", "credential_db", "decisions", "credentials", "loggit_json", "metric_weights", "report_prefs", "package_repo", "use_shinymanager")
used_configs <- c("assessment_db", "credential_db", "decisions", "credentials",
"loggit_json", "metric_weights", "report_prefs",
"package_repo", "use_shinymanager", "inherits")
if (any(!names(db_config) %in% used_configs)) {
names(db_config) %>%
`[`(!. %in% used_configs) %>%
Expand Down
2 changes: 1 addition & 1 deletion inst/report_downloads/reportHtml.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ createCard <- function(title, desc, value, score = "NULL",
else if(is_url)
value <- a(ifelse(nchar(value) <= val_max_nchar, value,
glue::glue('{stringr::str_sub(value, 1, (val_max_nchar - 3))}...')
), href = value)
), target = "_blank", href = value)
# unfortunately, adding the href can sometimes force the footer to fall
# outside the card when val_max_nchar is too large.
else if(value %in% c('TRUE', 'FALSE'))
Expand Down
Loading

0 comments on commit 7165440

Please sign in to comment.