Skip to content
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

198 Include user's card labels when generating the report #336

Merged
merged 12 commits into from
Oct 13, 2023

Conversation

kartikeyakirar
Copy link
Contributor

this PR fixes #335

this is follow-up after insightsengineering/teal.reporter#219

@kartikeyakirar kartikeyakirar marked this pull request as draft October 4, 2023 13:06
@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

badge

Code Coverage Summary

Filename              Stmts    Miss  Cover    Missing
------------------  -------  ------  -------  -------------------------------------------------------------------------------------------------------------------------------
R/adtteSpec.R           168     121  27.98%   252-397
R/assaySpec.R            53      39  26.42%   109-151
R/barplot.R             171     138  19.30%   40-64, 123-261
R/boxplot.R             174     146  16.09%   41-65, 119-262
R/checkmate.R            18       9  50.00%   110-118
R/experimentSpec.R       89      56  37.08%   97, 215-282
R/forestplot.R          199     174  12.56%   60-91, 147-314
R/geneSpec.R            256     153  40.23%   154-169, 298-482
R/km.R                  191     160  16.23%   63-92, 153-309
R/pca.R                 357     274  23.25%   35-55, 163-466
R/quality.R             300     230  23.33%   18-109, 203-433
R/sampleVarSpec.R       236     104  55.93%   295, 314-323, 329-336, 338, 346-358, 360-361, 363, 366, 374-378, 380-395, 400-424, 427-431, 433, 440-450, 452-453, 461, 506-523
R/scatterplot.R         169     139  17.75%   40-64, 122-260
R/utils.R                16       0  100.00%
R/volcanoplot.R         195     165  15.38%   35-56, 111-282
R/zzz.R                   1       1  0.00%    2
TOTAL                  2593    1909  26.38%

Diff against main

Filename           Stmts    Miss  Cover
---------------  -------  ------  -------
R/barplot.R           +2      +2  -0.23%
R/boxplot.R           +2      +2  -0.19%
R/forestplot.R        +2      +2  -0.13%
R/km.R                +2      +2  -0.17%
R/pca.R               +2      +2  -0.13%
R/quality.R           +2      +2  -0.16%
R/scatterplot.R       +2      +2  -0.21%
R/volcanoplot.R       +2      +2  -0.16%
TOTAL                +16     +16  -0.16%

Results for commit: 068f65a

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

Unit Tests Summary

  1 files  15 suites   9s ⏱️
56 tests 43 ✔️ 13 💤 0
94 runs  81 ✔️ 13 💤 0

Results for commit 068f65a.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@danielinteractive danielinteractive left a comment

Choose a reason for hiding this comment

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

Thanks @kartikeyakirar that is nice! is there something that should go into the shiny tests accordingly?

@kartikeyakirar kartikeyakirar marked this pull request as ready for review October 5, 2023 11:50
@kartikeyakirar
Copy link
Contributor Author

kartikeyakirar commented Oct 5, 2023

is there something that should go into the shiny tests accordingly?

@danielinteractive I haven't made any specific changes for shinytest, but I've included a test for card_template().

Copy link
Collaborator

@danielinteractive danielinteractive left a comment

Choose a reason for hiding this comment

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

Thanks @kartikeyakirar , nice, please see last comments below, afterwards good to merge!

R/utils.R Outdated
#' @param filter_panel_api (`FilterPanelAPI`) object with API that allows the generation
#' of the filter state in the report
#'
#' @return (`TealReportCard`) populated with a title, description and filter state
#'
#' @keywords internal
card_template <- function(title, label, description = NULL, with_filter, filter_panel_api) {
card_template <- function(title, label, description = NULL, filter_panel_api) {
checkmate::assert_string(title)
Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry can we please take out the checkmate:: name space thing since we import the whole of it?

Copy link
Contributor

Choose a reason for hiding this comment

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

putting package name in front of package function improves the process of debugging if you debug the function interactively

Copy link
Contributor

Choose a reason for hiding this comment

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

teal is also imported as a whole but we do put :: in front of teal function names https://github.com/search?q=repo%3Ainsightsengineering%2Fteal.modules.hermes%20%3A%3A&type=code

teal::module(

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah we should also take out the teal:: bits please. thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

@kartikeyakirar have you seen this conversation about teal

Copy link
Contributor Author

@kartikeyakirar kartikeyakirar Oct 12, 2023

Choose a reason for hiding this comment

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

Okay, I will take out teal:: call as well.

Edit : Namespace calls are throughout the package, and it's not within the scope of this task to eliminate all of them. However, I will remove teal::report_card_template. As for the rest, I will put the task to handle them separately .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here is task : #337

tests/testthat/test-utils.R Outdated Show resolved Hide resolved
@m7pr
Copy link
Contributor

m7pr commented Oct 6, 2023

@kartikeyakirar please take out card_template and move it to teal.reporter. Move the test as well
insightsengineering/teal.modules.general#584 (comment)

Copy link
Contributor

@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.

Copy link
Contributor

@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.

Hey @kartikeyakirar looks like this staged deps cyclic error does not appear on this PR anymore. You are good to merge

kartikeyakirar added a commit to insightsengineering/teal that referenced this pull request Oct 13, 2023
#933)

this PR is extension to
insightsengineering/teal.reporter#198

Here I have added card_template() function that generates a report card
with a title,
an optional description, and the option to append the filter state list.
and is been used in
insightsengineering/teal.modules.general#584
insightsengineering/teal.modules.clinical#835
insightsengineering/teal.modules.hermes#336
insightsengineering/teal.osprey#229
insightsengineering/teal.goshawk#241

ref issues and discussion:
insightsengineering/teal.reporter#226

---------

Signed-off-by: kartikeya kirar <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marcin <[email protected]>
Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
@kartikeyakirar kartikeyakirar merged commit d71a227 into main Oct 13, 2023
20 checks passed
@kartikeyakirar kartikeyakirar deleted the 198_card_labels@main branch October 13, 2023 09:45
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.

[Feature Request]: Rewrite modules so they include user's card labels when generating the report
3 participants