-
-
Notifications
You must be signed in to change notification settings - Fork 50
Always keeps some R code in reports #1611
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
Conversation
Code Coverage SummaryDiff against mainResults for commit: c8f555b Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 27 suites 2m 20s ⏱️ Results for commit c8f555b. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit c7cff71 ♻️ This comment has been updated with latest results. |
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.
Pull Request Overview
This PR modifies the teal.reporter to always preserve certain R code sections in reports, specifically "Data pre-processing" and "Filtering" sections, even when users choose to remove R code from reports. This ensures that important contextual information about data transformation and filtering states remains visible in generated reports.
Key changes:
- Adds
always_keep = TRUEparameter to code chunks for data filtering - Marks data preparation code chunks as always kept using the
always_keepattribute - Updates code chunk merging logic to preserve the
always_keepattribute when combining chunks
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| R/teal_data_utils.R | Adds always_keep = TRUE to filtering code chunks and updates merge logic to preserve this attribute |
| R/module_init_data.R | Marks all data preparation code chunks with always_keep = TRUE attribute |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
From the code's perspective, all looks good
|
Thanks @m7pr for following up on this one. My comments on the inclusion/exclusion:
|
What if
How important filter state is? Please give us more background what is the meaning of having information which IMO is incomplete. Let's discuss how final report should look like. |
|
Hey @gogonzo we decided together with team today during a catch-up that if code is not showed we will add a small note below the Filter State, that says "further data manipulations and filtering could be applied with transformers for which you did not want to see the code". Stuff like that that suggests that there might be more manipulations. And when code is included, then this message is not shown. The motivation for Filter State is that people tend to recognize/differentiate various report cards based on the Filter State. |
|
We decided to do this other way. Thanks @averissimo |



Pull Request
Module's Codesection teal.reporter#400Companion to
code_chunksteal.reporter#414Open questions
To @donyunardi and @kumamiao
Context:
Previous filter state
Changes description