From 1c4451e8f91b675114ac2106a87bf1ed22d5a79f Mon Sep 17 00:00:00 2001 From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com> Date: Fri, 2 Aug 2024 14:01:50 -0400 Subject: [PATCH 1/2] Remove evaluation recording from riskmetric assessments --- R/utils_insert_db.R | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/R/utils_insert_db.R b/R/utils_insert_db.R index 3b9f9cb1..3b25f4da 100644 --- a/R/utils_insert_db.R +++ b/R/utils_insert_db.R @@ -183,7 +183,20 @@ insert_riskmetric_to_db <- function(pkg_name, pkg_version = "", loggit::loggit("WARN", paste("Package", pkg_name, "not found.")) return() } - + + riskmetric_assess <- + lapply(riskmetric_assess[-(1:3)], \(x) { + out <- + list( + structure( + x[[1]], + .recording = NULL, + class = setdiff(class(x[[1]]), "with_eval_recording") + ) + ) + attributes(out) <- attributes(x) + out + }) assessment_serialized <- data.frame(pkg_assess = I(lapply(riskmetric_assess, serialize, connection = NULL))) # Insert all the metrics (columns of class "pkg_score") into the db. From dcb0728a429a44dc8cbe5088f370015a1e1b8445 Mon Sep 17 00:00:00 2001 From: Jeff Thompson <160783290+jthompson-arcus@users.noreply.github.com> Date: Mon, 5 Aug 2024 08:45:56 -0400 Subject: [PATCH 2/2] Update NEWS --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 678888e2..2389cf67 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,7 @@ * 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) * Fixed bug that kept full list of available packages from populating (#776) +* Removed `.recording` attribute from `riskmetric` assessments for storage purposes # riskassessment 3.1.0