Skip to content

Commit

Permalink
Merge pull request #806 from pharmaR/jt-805-zero_dependencies
Browse files Browse the repository at this point in the history
Correctly parse `riskmetric` dependency assessment
  • Loading branch information
aclark02-arcus authored Jul 10, 2024
2 parents bd8001c + d2c3900 commit 39eed4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Added navigation controls in Function Explorer tab (#644)
* Fixed bug that crashed the Package Dependencies page for pkgs without any dependency info available (#802)
* Fixed bug that incorrectly displayed 0 dependencies as 1 (#805)

# riskassessment 3.1.0

Expand Down
2 changes: 1 addition & 1 deletion R/utils_insert_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ insert_riskmetric_to_db <- function(pkg_name, pkg_version = "",

metric_value <- case_when(
"pkg_metric_error" %in% class(riskmetric_assess[[metric$name]][[1]]) ~ "pkg_metric_error",
metric$name == "dependencies" ~ as.character(length(unlist(as.vector(riskmetric_assess[[metric$name]][[1]][1])))),
metric$name == "dependencies" ~ as.character(NROW(riskmetric_assess[[metric$name]][[1]])),
metric$name == "reverse_dependencies" ~ as.character(length(as.vector(riskmetric_assess[[metric$name]][[1]]))),
metric$is_perc == 1L ~ as.character(round(riskmetric_score[[metric$name]]*100, 2)[[1]]),
TRUE ~ as.character(riskmetric_assess[[metric$name]][[1]][1:length(riskmetric_assess[[metric$name]])])
Expand Down
6 changes: 3 additions & 3 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4367,7 +4367,7 @@
"Maintainer": "Kevin Ushey <[email protected]>",
"Repository": "RSPM",
"Date/Publication": "2024-02-29 01:10:07 UTC",
"Built": "R 4.3.3; ; 2024-07-09 14:01:48 UTC; unix"
"Built": "R 4.3.3; ; 2024-07-09 17:38:19 UTC; unix"
}
},
"reprex": {
Expand Down Expand Up @@ -6463,7 +6463,7 @@
"checksum": "97d1232340e04c53088bc8f814133dcd"
},
"NEWS.md": {
"checksum": "72bdae63c42eb2750d86e97fc0996a79"
"checksum": "2273640b8da14304bc919f4fc83a58d7"
},
"R/app_config.R": {
"checksum": "c2b61f270b86b6833f0ee39c44a1a440"
Expand Down Expand Up @@ -6574,7 +6574,7 @@
"checksum": "6c0e6fb4b3716cdd0c0d2953a1cf4393"
},
"R/utils_insert_db.R": {
"checksum": "2c02e4eab4d9262ef8c8e64eb0f1b4f5"
"checksum": "5eaa94311e33014f000eb3cc5aec8282"
},
"R/utils_startup.R": {
"checksum": "b689ee96f0761480ac65ca22cbbb4980"
Expand Down

0 comments on commit 39eed4d

Please sign in to comment.