-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow non-standard datanames in filter data #622
Conversation
Unit Tests Summary 1 files 29 suites 23s ⏱️ Results for commit 5a6c823. ♻️ This comment has been updated with latest results. |
Unit Test Performance DifferenceAdditional test case details
Results for commit 7aeaf16 ♻️ This comment has been updated with latest results. |
Code Coverage Summary
Diff against main
Results for commit: 5a6c823 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
This comment was marked as outdated.
This comment was marked as outdated.
# Pull Request <!--- Replace `#nnn` with your issue link for reference. --> Fixes insightsengineering/teal#1366 Related: - insightsengineering/teal#1382 - insightsengineering/teal.slice#622 - #340 ### Changes description - [x] Adds support for non-standard names in code dependency - [x] Support backtick symbols in code dependency <details> <summary>Reproducible code for backtick support in code parser</summary> `%add_column%` definition is not detected ```r pkgload::load_all("teal.data") #> ℹ Loading teal.data #> Loading required package: teal.code td <- teal_data() |> within({ IRIS <- iris IRIS2 <- iris MTCARS <- mtcars `%add_column%` <- function(lhs, rhs) dplyr::bind_cols(lhs, rhs) # @ add_column <- function(lhs, rhs) dplyr::bind_cols(lhs, rhs) IRIS <- IRIS %add_column% dplyr::tibble(yada = IRIS2$Species) IRIS <- add_column(IRIS, dplyr::tibble(yada2 = IRIS2$Species)) }) td |> get_code(datanames = "IRIS") |> cat() #> IRIS <- iris #> IRIS2 <- iris #> add_column <- function(lhs, rhs) dplyr::bind_cols(lhs, rhs) #> IRIS <- IRIS %add_column% dplyr::tibble(yada = IRIS2$Species) #> IRIS <- add_column(IRIS, dplyr::tibble(yada2 = IRIS2$Species)) td2 <- td |> within({ IRIS <- `%add_column%`(IRIS, dplyr::tibble(yada2 = IRIS2$Species)) }) td2 |> get_code(datanames = "IRIS") |> cat() #> IRIS <- iris #> IRIS2 <- iris #> add_column <- function(lhs, rhs) dplyr::bind_cols(lhs, rhs) #> IRIS <- IRIS %add_column% dplyr::tibble(yada = IRIS2$Species) #> IRIS <- add_column(IRIS, dplyr::tibble(yada2 = IRIS2$Species)) #> IRIS <- IRIS %add_column% dplyr::tibble(yada2 = IRIS2$Species) ``` <sup>Created on 2024-10-15 with [reprex v2.1.1](https://reprex.tidyverse.org)</sup> </details> --------- Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
One way to solve that problem globally for The proposal in 23c2bcf would add minimal code to the existing codebase. WDYT @gogonzo ? |
An alternative to this proposal would be to identify call in the codebase that generates an id, and encode that id manually. This would add a lot of noise as well as being prone to errors. note: The proposal needs some extra tests to ensure all dataname types are working. As of now I only tested with |
I like the approach, not sure yet if we should make
There is a lot to cover and a lot to miss. I prefer to make own |
Co-authored-by: Dawid Kałędkowski <[email protected]> Signed-off-by: André Veríssimo <[email protected]>
Both have drawbacks, \1. \2. We could mitigate I tend towards |
todo: teal.slice export does not contains experiment
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.
Wonderful! 👍 (please fix the tests and let's move on)
Pull Request
Fixes insightsengineering/teal#1366
Related:
Changes description
Fix upload of snapshot file that is not compatibledata
raise warnings teal#1352