-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
FilteredData constructor #49
Conversation
I do not see a reason to abandon dispatching on If we do not let it dispatch, then This also would (fingers crossed?) let users create their own init_filtered_state dispatch that could work as an interface between their weird data and the filter panel. |
This comment was marked as outdated.
This comment was marked as outdated.
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.
Filtering parent doesn't affect the child. See efficacy app for example. get_call
in CDISCFilteredData has been modified but this call isn't executed anywhere. This means that relationship between reactive parent and child has been lost.
testthat::expect_error(isolate(datasets$get_filter_overview("AA")), "Some datasets are not available:") | ||
testthat::expect_error(isolate(datasets$get_filter_overview("")), "Some datasets are not available:") | ||
testthat::expect_error(isolate(datasets$get_filter_overview(23)), "Some datasets are not available:") | ||
}) | ||
|
||
testthat::test_that("get_filter_overview returns overview matrix for non-filtered datasets", { | ||
datasets <- get_filtered_data_object() |
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.
So this test and the following tests fail.
This is what is expected:
But we can no longer distinguish that mock_iris
is not CDISC and ADSL
is CDISC with no parent. Previously the former was DefaultFilteredDataset
and the latter CDISCFilteredDataset
. Now they are both DefaultFilteredDataset
and then either they both have subjs as this branch now creates a CDISCFilteredData object:
Or if I change the creation of datasets to use FilteredData we get neither with subjs:
Is this change of behaviour OK? More generally it seems like the design we've changed to is fighting against the dispatch mechanisms in R (we have cdisc, non cdisc and MAE data, on the dataset level we have MAE and not MAE and on the data level we have CDISC and not CDISC). I'm OK with this if it's a stepping stone to simplifying the filter panel and removing all the data but I don't really like it Especially trying to understand the logic to get the filter information - maybe this logic can be simplified?
R/FilteredData.R
Outdated
#' TODO | ||
#' @param keys TODO | ||
#' @return (`self`) invisibly this `FilteredData` | ||
set_join_keys = function(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.
this should be a private now
Code Coverage Summary
Results for commit: 783c15f Minimum allowed coverage is ♻️ This comment has been updated with latest results |
@gogonzo - your review is probably stale now :)
I guess we don't need to do this? As everything is going to be changing a lot now?
Do you think we need to do this? We could have |
What happens with MAE right now? Or are we doing it in another PR? EDIT: I think there might be a problem with mixing |
So I think it is going to go the same wrong as it would have done before this PR? Maybe an issue in the backlog? |
@@ -104,7 +134,7 @@ FilteredData <- R6::R6Class( # nolint | |||
#' @description | |||
#' Gets variable names of a given dataname for the filtering. | |||
#' | |||
#' @param dataname (`character`) name of the dataset | |||
#' @param dataname (`character(1)`) name of the dataset | |||
#' @return (`character` vector) of variable names | |||
get_filterable_varnames = function(dataname) { |
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.
Btw, what is the point of this method? XD
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.
it's overwritten in CDISCFilteredData...
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.
- in FilteredData it doesn't do anything. colnames(data) == filterable_varnames
- In CDISCFIltereData we don't want child to have duplicated columns. It's actually users request because in ADTTE there are some duplicated columns comparing to ADSL. I foreseen that in the future it might cause some confusion as we can for example build a relationship between movie <-> actor and movie.name with actor.name are duplicated names but not the same thing. Let's discuss this in some time in the future if it will be important.
…sengineering/teal.slice into 33_filteredData_constructor@main
We need the update for sure. I'll put this to sprint 60 when we have everything possibly clarified and done.
Let's create the issue but doesn't have to be taken in this increment. #53 |
@nikolas-burkoff is right. Nothing new. If the MAE users complain about this we would know. At this moment it's a gap we can ignore. |
…/insightsengineering/teal.slice into 33_filteredData_constructor@main
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.
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 have spent the morning launching the apps from the gallery and I have not noticed anything browfurrowing.
Closes #33