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 #241

Merged
merged 26 commits into from
Oct 13, 2023

Conversation

kartikeyakirar
Copy link
Contributor

this PR fixes #240

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

@kartikeyakirar kartikeyakirar marked this pull request as draft October 4, 2023 13:45
@kartikeyakirar kartikeyakirar marked this pull request as ready for review October 5, 2023 21:03
@kartikeyakirar
Copy link
Contributor Author

CMD checks are failing because of mcr package is archived from CRAN

@m7pr
Copy link
Contributor

m7pr commented Oct 6, 2023

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

1 similar comment
@m7pr
Copy link
Contributor

m7pr commented Oct 6, 2023

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

@kartikeyakirar
Copy link
Contributor Author

please take out card_template and move it to teal.reporter.

Within this package, there is an additional common section that can be utilized in templates. Consequently, I am maintaining "card_template" as a wrapper for "teal.reporter::card_template."

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.

please append teal:: before report_card_template so it's easier for debugging in the future

R/tm_g_gh_boxplot.R Outdated Show resolved Hide resolved
R/utils.R Outdated
#' @return (`TealReportCard`) populated with a title, description, and filter state
#'
#' @keywords internal
report_card_template <- function(title,
Copy link
Contributor

Choose a reason for hiding this comment

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

@kartikeyakirar this is not a good idea to have the same name of the function in 2 packages. Please rename to report_card_template_goshawk

@kartikeyakirar
Copy link
Contributor Author

@m7pr there is no namesapce call because its internal function I have defined report_card_template here in the utils, and it makes use of teal::report_card_template. https://github.com/insightsengineering/teal.goshawk/blob/198_card_labels%40main/R/utils.R#L35-L79

@m7pr
Copy link
Contributor

m7pr commented Oct 12, 2023

CMD checks are failing because of mcr package is archived from CRAN
Is back on CRAN

kartikeyakirar and others added 2 commits October 12, 2023 15:50
Merge branch '198_card_labels@main' of https://github.com/insightsengineering/teal.goshawk into 198_card_labels@main

# Conflicts:
#	R/utils.R
@github-actions
Copy link
Contributor

github-actions bot commented Oct 12, 2023

badge

Code Coverage Summary

Filename                                 Stmts    Miss  Cover    Missing
-------------------------------------  -------  ------  -------  ---------
R/tm_g_gh_boxplot.R                        353     353  0.00%    216-636
R/tm_g_gh_correlationplot.R                556     556  0.00%    282-944
R/tm_g_gh_density_distribution_plot.R      277     277  0.00%    161-487
R/tm_g_gh_lineplot.R                       563     563  0.00%    184-841
R/tm_g_gh_scatterplot.R                    239     239  0.00%    167-457
R/tm_g_gh_spaghettiplot.R                  291     291  0.00%    230-587
R/toggleable_slider.R                      154     154  0.00%    82-253
R/utils-arbitrary_lines.r                  121     121  0.00%    19-172
R/utils-data_constraints.r                 186     186  0.00%    2-255
R/utils-keep_range_slider_updated.r         23      23  0.00%    8-38
R/utils-maptrt.r                             9       9  0.00%    25-37
R/utils-templ_ui.r                          48      48  0.00%    2-73
R/utils.R                                   39      39  0.00%    12-83
R/zzz.R                                      1       1  0.00%    2
TOTAL                                     2860    2860  0.00%

Diff against main

Filename                                 Stmts    Miss  Cover
-------------------------------------  -------  ------  --------
R/tm_g_gh_boxplot.R                         +4      +4  +100.00%
R/tm_g_gh_correlationplot.R                 +4      +4  +100.00%
R/tm_g_gh_density_distribution_plot.R       +3      +3  +100.00%
R/tm_g_gh_lineplot.R                        +4      +4  +100.00%
R/tm_g_gh_scatterplot.R                     +4      +4  +100.00%
R/tm_g_gh_spaghettiplot.R                   +3      +3  +100.00%
R/utils.R                                  +22     +22  +100.00%
TOTAL                                      +44     +44  +100.00%

Results for commit: b10f687

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@m7pr
Copy link
Contributor

m7pr commented Oct 12, 2023

#241 (comment)

@m7pr m7pr self-requested a review October 12, 2023 13:14
R/utils.R Outdated Show resolved Hide resolved
@m7pr
Copy link
Contributor

m7pr commented Oct 13, 2023

Hey @kartikeyakirar looks like this staged deps cyclic error does not appear on this PR anymore. You are good to merge.
Just add .lintr indentaion = NULL so that lintr tests are fixed

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 enabled auto-merge (squash) October 13, 2023 09:49
@kartikeyakirar kartikeyakirar merged commit 81ae566 into main Oct 13, 2023
22 checks passed
@kartikeyakirar kartikeyakirar deleted the 198_card_labels@main branch October 13, 2023 09:57
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
2 participants