Skip to content

Add modular pipeline vignette - #250

Open
Melkiades wants to merge 3 commits into
mainfrom
249_modular_pipeline_vignette@main
Open

Add modular pipeline vignette#250
Melkiades wants to merge 3 commits into
mainfrom
249_modular_pipeline_vignette@main

Conversation

@Melkiades

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Reference GitHub issue associated with pull request.
closes #249


Covers:

  • The three layers using tbl_coxph() as primary example
  • Where digits/formatting are set at each layer and how to change them
  • Other modular components: add_grade_column(), add_forest(), tbl_with_pools()
  • How to swap layers (bring your own data frame, custom .tbl_fun, gtsummary post-processing)

Pre-review checklist

  • PR branch is up to date with main
  • Documentation is complete
  • Tests pass locally
  • NEWS entry (not needed — vignette only)

Covers the compute → tabulate → customize pattern using tbl_coxph()
as the primary example. Documents where digits are set at each layer
and shows how the pattern applies to other crane components.
@Melkiades
Melkiades marked this pull request as ready for review August 21, 2026 09:31
@Melkiades

Melkiades commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

@mhallal1 this is a bit of an idea on how to make code more intuitive and explicit (also against the overly wrapping tern counterpart). I think we can merge it as is and follow-up if ever it gets any attention. Our user documentation must be in tlg-catalog mainly. This vignette is a bit more for {crane} devs or {crane} enthusiasts

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Unit Tests Summary

  1 files  299 suites   1m 41s ⏱️
299 tests 298 ✅ 0 💤 1 ❌
869 runs  868 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 2ada3df.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Unit Test Performance Difference

Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
add_blank_rows 💚 $5.89$ $-1.76$ add_blank_rows_works
add_forest 💔 $1.68$ $+3.74$ add_forest_table_engine_flextable_works
add_grade_column 💚 $16.17$ $-9.83$ add_grade_column_works_on_a_standalone_tbl_hierarchical_rate_by_grade
add_hierarchical_count_row 💚 $3.05$ $-1.27$ add_hierarchical_count_row_works
annotate_gg 💚 $7.89$ $-5.80$ annotate_lineplot_df_warns_if_plot_is_not_generated_by_gg_lineplot
annotate_gg_km 💚 $3.50$ $-2.54$ annotate_riskdf_handles_all_branches_and_inputs
gg_km 💔 $0.63$ $+2.19$ gg_km_works_and_handles_annotations_correctly
gg_utils 💚 $1.58$ $-1.57$ df2gg_aligned_input_validation_and_error_handling_works
tbl_baseline_chg 💚 $18.70$ $-7.84$ tbl_baseline_chg_works
tbl_coxph 💚 $3.25$ $-1.50$ tbl_coxph_errors_on_invalid_inputs
tbl_hierarchical_incidence_rate 💚 $18.44$ $-9.76$ tbl_hierarchical_incidence_rate_runs_with_minimum_arguments
tbl_hierarchical_rate_and_count 💚 $20.89$ $-12.23$ tbl_hierarchical_rate_and_count_works
tbl_mmrm 💚 $6.45$ $-2.71$ se_calculates_standard_error_correctly
tbl_rmpt 💚 $13.15$ $-11.09$ tbl_rmpt_works_with_default_parameters_Example_1_
tbl_roche_subgroups 💚 $11.86$ $-4.57$ tbl_roche_subgroups_time_to_event_NULL_works
tbl_roche_summary 💚 $5.83$ $-1.89$ tbl_roche_summary_works
tbl_shift 💚 $5.26$ $-3.87$ tbl_shift_strata_location_
tbl_with_pools 💚 $12.11$ $-5.98$ tbl_with_pools_validates_inputs_correctly
theme_gtsummary_roche 💚 $6.52$ $-2.30$ theme_gtsummary_roche_works

Results for commit 9c73400

♻️ This comment has been updated with latest results.

@github-actions

Copy link
Copy Markdown
Contributor

badge

Code Coverage Summary

Filename                                 Stmts    Miss  Cover    Missing
-------------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------
R/add_blank_rows.R                          63       0  100.00%
R/add_difference_row.R                     101       0  100.00%
R/add_forest_utils.R                        97      10  89.69%   76-79, 94-100
R/add_forest.R                             139       0  100.00%
R/add_hierarchical_count_row.R              33       0  100.00%
R/adjust_stat_columns_wrap.R                29       1  96.55%   59
R/annotate_gg_km.R                         141       0  100.00%
R/annotate_gg_pkc.R                        100       0  100.00%
R/annotate_gg.R                             83       0  100.00%
R/ard_tabulate_abnormal_by_baseline.R       65       0  100.00%
R/crane-package.R                            2       2  0.00%    26-27
R/deprecated.R                              21      21  0.00%    18-54
R/df_add_poolings.R                         41       0  100.00%
R/get_cox_pairwise_df.R                    163       0  100.00%
R/gg_km_utils.R                             39      14  64.10%   20-37
R/gg_km.R                                  143      37  74.13%   55-58, 75, 102, 176-181, 184-187, 197-199, 204-205, 239-241, 248-251, 255, 266-270, 283, 285-287
R/gg_lineplot.R                             94       0  100.00%
R/gg_mmrm_lineplot.R                       102       1  99.02%   106
R/gg_pkc_lineplot.R                         98       0  100.00%
R/gg_utils.R                               222       0  100.00%
R/label_roche.R                             72       0  100.00%
R/modify_header_rm_md.R                     18       2  88.89%   35-36
R/modify_split_caption.R                    26       0  100.00%
R/modify_zero_recode.R                      20       1  95.00%   64
R/pk_helper.R                              499       0  100.00%
R/reverse_difference_ci.R                   33       0  100.00%
R/tbl_baseline_chg.R                       188       0  100.00%
R/tbl_coxph.R                               90       1  98.89%   229
R/tbl_hierarchical_incidence_rate.R        291       4  98.63%   430-433
R/tbl_hierarchical_rate_and_count.R        339      13  96.17%   343, 425, 446-456
R/tbl_hierarchical_rate_by_grade.R         317       3  99.05%   169-171
R/tbl_listing.R                             35       0  100.00%
R/tbl_mmrm.R                               254       1  99.61%   393
R/tbl_null_report.R                         10       0  100.00%
R/tbl_rmpt.R                               157      12  92.36%   299-304, 316-321
R/tbl_roche_subgroups.R                    155       0  100.00%
R/tbl_roche_summary.R                       64       0  100.00%
R/tbl_shift.R                              116       0  100.00%
R/tbl_survfit_quantiles.R                  154       0  100.00%
R/tbl_survfit_times.R                       92       0  100.00%
R/tbl_with_pools.R                          79       1  98.73%   317
R/theme_gtsummary_roche.R                   87       1  98.85%   61
R/utils.R                                   42       0  100.00%
TOTAL                                     4914     125  97.46%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: c365a4f

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add vignette: modular TLG pipeline (compute → tabulate → customize)

1 participant