Skip to content

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

Merged
averissimo merged 12 commits into
mainfrom
teal_reportable
Jun 12, 2025
Merged

{teal} module returns a teal_report object that extends from teal_data#370
averissimo merged 12 commits into
mainfrom
teal_reportable

Conversation

@averissimo

@averissimo averissimo commented Jun 3, 2025

Copy link
Copy Markdown
Contributor

I've suggested "code verified/unverified" because:
1. It's concise and clear
2. It focuses on what's actually being verified (the code that created
the data)
3. It removes the redundant "teal_data object" since this is already
known from the context
@averissimo averissimo marked this pull request as ready for review June 5, 2025 13:11
@github-actions

github-actions Bot commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

badge

Code Coverage Summary

Filename                     Stmts    Miss  Cover    Missing
-------------------------  -------  ------  -------  -------------------
R/cdisc_data.R                   1       0  100.00%
R/deprecated.R                  18       0  100.00%
R/dummy_function.R               2       2  0.00%    14-15
R/formatters_var_labels.R       61       0  100.00%
R/join_key.R                    38       0  100.00%
R/join_keys-c.R                 12       0  100.00%
R/join_keys-extract.R          128       0  100.00%
R/join_keys-names.R             15       0  100.00%
R/join_keys-parents.R           30       0  100.00%
R/join_keys-print.R             45       0  100.00%
R/join_keys-utils.R             73       3  95.89%   35-38
R/join_keys.R                   21       0  100.00%
R/teal_data-class.R             36       6  83.33%   50-52, 59, 104-105
R/teal_data-constructor.R       11       2  81.82%   49, 52
R/teal_data-extract.R            3       0  100.00%
R/teal_data-get_code.R          13       8  38.46%   114-120, 124
R/teal_data-names.R              8       1  87.50%   42
R/teal_data-show.R               5       5  0.00%    14-20
R/topological_sort.R            32       0  100.00%
R/verify.R                      42      11  73.81%   67, 97-101, 104-108
TOTAL                          594      38  93.60%

Diff against main

Filename               Stmts    Miss  Cover
-------------------  -------  ------  -------
R/teal_data-class.R       -1      +3  -8.56%
TOTAL                     -1      +3  -0.51%

Results for commit: 02eba68

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions

github-actions Bot commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

Unit Tests Summary

  1 files   15 suites   1s ⏱️
163 tests 163 ✅ 0 💤 0 ❌
218 runs  218 ✅ 0 💤 0 ❌

Results for commit 02eba68.

♻️ This comment has been updated with latest results.

@gogonzo gogonzo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@averissimo averissimo enabled auto-merge (squash) June 12, 2025 14:43
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 averissimo merged commit f843f10 into main Jun 12, 2025
26 of 28 checks passed
@averissimo averissimo deleted the teal_reportable branch June 12, 2025 14:50
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants