Skip to content

{teal} module returns a teal_report object that extends from teal_data #884

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

averissimo
Copy link
Contributor

@averissimo averissimo commented Jun 3, 2025

@averissimo averissimo marked this pull request as ready for review June 5, 2025 13:11
Copy link
Contributor

github-actions bot commented Jun 5, 2025

badge

Code Coverage Summary

Filename                      Stmts    Miss  Cover    Missing
--------------------------  -------  ------  -------  ---------------------------------------
R/tm_a_pca.R                    889     889  0.00%    139-1162
R/tm_a_regression.R             779     779  0.00%    178-1063
R/tm_data_table.R               201     201  0.00%    100-349
R/tm_file_viewer.R              172     172  0.00%    47-254
R/tm_front_page.R               144     133  7.64%    77-247
R/tm_g_association.R            342     342  0.00%    159-577
R/tm_g_bivariate.R              698     434  37.82%   331-827, 868, 979, 996, 1014, 1025-1047
R/tm_g_distribution.R          1124    1124  0.00%    156-1427
R/tm_g_response.R               370     370  0.00%    177-627
R/tm_g_scatterplot.R            735     735  0.00%    260-1100
R/tm_g_scatterplotmatrix.R      300     281  6.33%    198-535, 596, 610
R/tm_missing_data.R            1133    1133  0.00%    124-1437
R/tm_outliers.R                1044    1044  0.00%    163-1358
R/tm_t_crosstable.R             264     264  0.00%    163-475
R/tm_variable_browser.R         803     798  0.62%    89-1044, 1082-1265
R/utils.R                       149     133  10.74%   87-272, 300-332, 344-353, 358, 372-391
R/zzz.R                           2       2  0.00%    2-3
TOTAL                          9149    8834  3.44%

Diff against main

Filename                      Stmts    Miss  Cover
--------------------------  -------  ------  --------
R/tm_a_regression.R              +4      +4  +100.00%
R/tm_g_association.R             -4      -4  +100.00%
R/tm_g_distribution.R            +7      +7  +100.00%
R/tm_g_response.R                +1      +1  +100.00%
R/tm_g_scatterplot.R             +1      +1  +100.00%
R/tm_g_scatterplotmatrix.R       +3      +3  -0.06%
R/tm_missing_data.R             +14     +14  +100.00%
R/tm_outliers.R                  -1      -1  +100.00%
R/utils.R                        -2      -2  +0.14%
TOTAL                           +23     +23  -0.01%

Results for commit: f0600dc

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

github-actions bot commented Jun 5, 2025

Unit Tests Summary

  1 files  22 suites   2s ⏱️
144 tests 29 ✅ 115 💤 0 ❌
182 runs  67 ✅ 115 💤 0 ❌

Results for commit f0600dc.

♻️ This comment has been updated with latest results.

m7pr and others added 2 commits June 6, 2025 14:26
Companion to
insightsengineering/teal.reporter#334
Consequence of changing naming convention for `teal_report` object.

---------

Co-authored-by: André Veríssimo <211358+averissimo@users.noreply.github.com>
averissimo added a commit to insightsengineering/teal.code that referenced this pull request Jun 12, 2025
…l_data` (#255)

# Pull Request

Fixes:

- insightsengineering/teal#1526

Built on top of:

- insightsengineering/teal.reporter#307
    - _(#307 will be closed once this PR is stable)_

### Companion PRs:

- insightsengineering/teal#1541
- #255
- insightsengineering/teal.data#370
- insightsengineering/teal.reporter#331
- insightsengineering/teal.modules.general#884

### Changes description

- [x] Add new parameter `cache`
- Caches the result of the last evaluation in the respective `@code`
slot
    - [ ] Decide on name
- [x] Remove signature with multiple arguments to allow overriding
`eval_code` in other packages without showing a note

``` r
pkgload::load_all("teal.code")
#> ℹ Loading teal.code

q <- qenv() |> 
  eval_code(1 + 1, cache = TRUE) |> 
  eval_code(mtcars <- head(mtcars))

attr(q@code[[1]], "cache")
#> [1] 2
```

<sup>Created on 2025-06-03 with [reprex
v2.1.1](https://reprex.tidyverse.org)</sup>

---------

Co-authored-by: Dawid Kaledkowski <dawid.kaledkowski@gmail.com>
Co-authored-by: Marcin <133694481+m7pr@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
averissimo added a commit to insightsengineering/teal.data that referenced this pull request Jun 12, 2025
…l_data` (#370)

# Pull Request

Fixes:

- insightsengineering/teal#1526

Built on top of:

- insightsengineering/teal.reporter#307
    - _(#307 will be closed once this PR is stable)_

### Companion PRs:

- insightsengineering/teal#1541
- insightsengineering/teal.code#255
- #370
- insightsengineering/teal.reporter#331
- insightsengineering/teal.modules.general#884

### Changes description

- [x] Cleanup of `teal_data` class to allow for `teal_report` extension
- [x] Change the `show()` method to remove reference to `teal_data`
specifically

---------

Co-authored-by: Dawid Kaledkowski <dawid.kaledkowski@gmail.com>
Co-authored-by: Marcin <133694481+m7pr@users.noreply.github.com>
averissimo and others added 2 commits June 17, 2025 14:42
# Pull Request

- Changes from `teal_reportable` branch at `{ŧeal.report}`
- Remove old logic that was defusing the argument
Signed-off-by: Marcin <133694481+m7pr@users.noreply.github.com>
Comment on lines +293 to +294
#' @param keep_output (`character`) optional, names of the outputs to keep.
#' Default is `NULL` which won't keep any outputs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed since we have teal.reporter::eval_code,teal_report-method``

Suggested change
#' @param keep_output (`character`) optional, names of the outputs to keep.
#' Default is `NULL` which won't keep any outputs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure it's not needed to pass onto the eval_code inside the decorator?

Merging this to a feature branch. The rest can be dona as normal issues. Thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants