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

Remove evaluation recording from riskmetric assessments #810

Merged
merged 3 commits into from
Aug 5, 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
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 14 additions & 1 deletion R/utils_insert_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading