Skip to content

Conversation

@m7pr m7pr added the core label Jul 11, 2025
@m7pr m7pr marked this pull request as ready for review July 11, 2025 09:49
@m7pr m7pr changed the title WIP - rewrite code in modules rewrite code in modules Jul 11, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 11, 2025

badge

Code Coverage Summary

Filename                    Stmts    Miss  Cover    Missing
------------------------  -------  ------  -------  --------------
R/tm_g_ae_oview.R             234     234  0.00%    84-347
R/tm_g_ae_sub.R               297     297  0.00%    60-389
R/tm_g_butterfly.R            374     374  0.00%    125-537
R/tm_g_decorate.R              47      47  0.00%    17-96
R/tm_g_events_term_id.R       280     280  0.00%    63-375
R/tm_g_heat_bygrade.R         302     302  0.00%    136-469
R/tm_g_patient_profile.R      700     700  0.00%    159-922
R/tm_g_spiderplot.R           327     327  0.00%    100-469
R/tm_g_swimlane.R             354     354  0.00%    127-534
R/tm_g_waterfall.R            438     438  0.00%    109-600
R/utils.R                      85      80  5.88%    31-73, 107-240
R/zzz.R                         3       3  0.00%    4-7
TOTAL                        3441    3436  0.15%

Diff against main

Filename                    Stmts    Miss  Cover
------------------------  -------  ------  --------
R/tm_g_ae_oview.R             -13     -13  +100.00%
R/tm_g_ae_sub.R               -13     -13  +100.00%
R/tm_g_butterfly.R            -10     -10  +100.00%
R/tm_g_events_term_id.R       -14     -14  +100.00%
R/tm_g_heat_bygrade.R         -14     -14  +100.00%
R/tm_g_patient_profile.R      -13     -13  +100.00%
R/tm_g_spiderplot.R           -11     -11  +100.00%
R/tm_g_swimlane.R             -15     -15  +100.00%
R/tm_g_waterfall.R             -3      -3  +100.00%
R/utils.R                     +50     +50  -8.40%
TOTAL                         -56     -56  +0.00%

Results for commit: dd96ec0

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Jul 11, 2025

Unit Tests Summary

 1 files   1 suites   0s ⏱️
 4 tests  4 ✅ 0 💤 0 ❌
13 runs  13 ✅ 0 💤 0 ❌

Results for commit dd96ec0.

♻️ This comment has been updated with latest results.

@m7pr m7pr changed the title rewrite code in modules 📑 Reporter Refactor: Adds support for new teal_report and teal_card class Aug 27, 2025
Copy link
Contributor Author

@m7pr m7pr left a comment

Choose a reason for hiding this comment

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

There are 3 modules that uses srv_g_decorate and pws is handled there. Unsure if we also need to use set_chunks_dims for those modules. Plots looked good without it

@m7pr m7pr requested a review from Copilot September 11, 2025 11:47
Copy link
Contributor

Copilot AI left a 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 refactors the reporter functionality to support new teal_report and teal_card classes in the teal framework. The changes remove old "Add to reporter" implementations and replace them with a new unified reporting system.

  • Adds utility functions for setting chunk attributes and dimensions on teal cards
  • Refactors all module server functions to return teal_report objects with embedded teal_cards
  • Removes legacy reporter button UI elements and server-side implementations

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.

File Description
R/utils.R Added utility functions for teal_card attribute management
man/ Documentation for new utility functions
R/tm_*.R Removed old reporter implementation and integrated new teal_card system
DESCRIPTION Updated dependencies for new teal and teal.reporter versions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@averissimo averissimo left a comment

Choose a reason for hiding this comment

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

Awesome! 💯

But there's always the 1, I believe tm_g_heat_bygrade (where there's a comment) is not setting the dimensions

All others are added to report with code and figures!

@m7pr m7pr requested a review from averissimo September 11, 2025 13:59
Copy link
Contributor

@averissimo averissimo left a comment

Choose a reason for hiding this comment

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

  • I believe there's a missing option that is no longer displayed in the reporter.
  • Can we use teal.code::eval_code(q, "library(dplyr)") without surrounding dplyr with quotes? The code is more natural this way.
  • Please fix linter errors

edit: All figures and tables are added to report as they should! Once the issues here are fixed I think we are ready to merge

@m7pr m7pr requested a review from averissimo September 15, 2025 10:20
Copy link
Contributor

@averissimo averissimo left a comment

Choose a reason for hiding this comment

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

Awesome! Let's go! 💯

But before, please fix linter errors 🙏

@m7pr m7pr enabled auto-merge (squash) September 16, 2025 07:12
@m7pr m7pr merged commit 74c81d9 into main Sep 16, 2025
28 of 29 checks passed
@m7pr m7pr deleted the teal_reportable branch September 16, 2025 07:18
@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 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