-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
43 decouple@main #78
43 decouple@main #78
Conversation
Code Coverage Summary
Results for commit: 2ca8d9a Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Do we want to transfer TealReportCard to teal here too (here remove it), as we talked. |
Co-authored-by: Mahmoud Hallal <86970066+mhallal1@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with the decoupling, I will approve it if @kpagacz has no additional comments.
@@ -15,7 +15,7 @@ ReportCard <- R6::R6Class( # nolint: object_name_linter. | |||
#' | |||
initialize = function() { | |||
private$content <- list() | |||
private$chr_converters <- list() | |||
private$metadata <- list() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this have duplicated keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, because of key %in% names(private$metadata)
append_metadata = function(key, value) {
checkmate::assert_character(key, min.len = 0, max.len = 1)
checkmate::assert_false(key %in% names(private$metadata))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
closes #43
Decouple metadata in the ReportCard. It is needed e.g. to support the new format method in the FilteredData class.
append_fs is expected to consume a FilteredData object now. Thus we could use the new format method.
I do not want to add teal.slice dependency so I created an artificial object for test/example purposes.