Skip to content

update, remove fda02 table - #363

Merged
shajoezhu merged 7 commits into
mainfrom
drop_make_fda2_function
Sep 4, 2026
Merged

update, remove fda02 table#363
shajoezhu merged 7 commits into
mainfrom
drop_make_fda2_function

Conversation

@shajoezhu

Copy link
Copy Markdown
Collaborator

Pull Request

GitHub Issue

Closes #nnn

Include a Screenshot of the TLG

Screenshot of TLG template from source document (e.g. FDA integrated guide)

TODO: Add screenshot here

Developer To-Dos

  • Add quarto file quarto/catalog/[TLG-ID]/index.qmd with your TLG template.
  • Ensure that the title, subtitle, and categories fields at the top of the TLG template are correct.
  • Add a screenshot of your TLG named result.png to the quarto/catalog/[TLG-ID] folder.
  • Branch has all updates from the main branch.
  • Request a reviewer.

Reviewer To-Dos

  • Confirm that all GitHub CI/CD pipelines pass with a ✅.
  • Confirm that the TLG screenshot above matches the template output screenshot (result.png).
  • Confirm that branch has all updates from the main branch.
  • Approve PR once all of the above have been confirmed.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The PR description still contains required-review placeholders/TODOs (issue link and screenshot), and the namespace now contains a stale import that should be cleaned up via roxygen regeneration.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR removes the public make_table_02() API (FDA Table 2 helper) from the package by deleting its implementation, namespace export/imports, and generated documentation, while keeping an archived implementation under R/archive. It also includes a no-op-ish snapshot update (trailing blank line) for the fda-table_02 template test output.

Changes:

  • Removed make_table_02() implementation and its generated Rd documentation.
  • Updated NAMESPACE to drop the export and related imports tied to make_table_02().
  • Renamed the archived gtsummary helper in R/archive/fda-table_02.R to make_table_02() and updated the snapshot file formatting.
File summaries
File Description
tests/testthat/_snaps/fda-table_02.md Adds a trailing blank line in the snapshot output.
R/fda-table_02.R Deletes the exported make_table_02() implementation entirely.
R/archive/fda-table_02.R Renames the archived gtsummary implementation function to make_table_02().
NAMESPACE Removes export(make_table_02) and related imports previously needed by the deleted function.
man/make_table_02.Rd Removes generated documentation for make_table_02().
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread NAMESPACE
Comment thread NAMESPACE
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Unit Tests Summary

 1 files  30 suites   22s ⏱️
42 tests 15 ✅ 27 💤 0 ❌
53 runs  26 ✅ 27 💤 0 ❌

Results for commit af576f9.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

badge

Code Coverage Summary

Filename            Stmts    Miss  Cover    Missing
----------------  -------  ------  -------  ---------
R/cardinalfda.R         5       5  0.00%    18-22
R/run_template.R        5       0  100.00%
R/utils.R              40       0  100.00%
TOTAL                  50       5  90.00%

Diff against main

Filename            Stmts    Miss  Cover
----------------  -------  ------  --------
R/cardinalfda.R        +5      +5  +100.00%
R/run_template.R        0      -1  +20.00%
R/utils.R               0     -40  +100.00%
TOTAL                  +5     -36  +84.29%

Results for commit: af576f9

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
run_template 👶 $+1.39$ $+4$ $0$ $0$ $0$
utils 👶 $+0.47$ $+21$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
run_template 👶 $+0.68$ run_template_does_not_leak_objects_into_the_caller
run_template 👶 $+0.03$ run_template_errors_for_an_unknown_template
run_template 👶 $+0.68$ run_template_sources_a_template_and_returns_its_environment
utils 👶 $+0.01$ alt_counts_df_preproc_errors_when_required_variables_are_missing
utils 👶 $+0.32$ alt_counts_df_preproc_filters_to_the_safety_population
utils 👶 $+0.01$ alt_counts_df_preproc_returns_NULL_when_input_is_NULL
utils 👶 $+0.01$ alt_counts_df_preproc_validates_the_flag_variable
utils 👶 $+0.01$ alt_counts_df_preproc_works_without_a_safety_flag
utils 👶 $+0.01$ assert_flag_variables_accepts_a_custom_na_level
utils 👶 $+0.03$ assert_flag_variables_accepts_valid_flag_values
utils 👶 $+0.01$ assert_flag_variables_errors_on_invalid_values
utils 👶 $+0.03$ basic_table_annot_returns_a_layout_with_and_without_annotations
utils 👶 $+0.02$ split_cols_by_arm_splits_with_and_without_an_overall_column
utils 👶 $+0.02$ split_cols_by_arm_supports_risk_difference_columns

Results for commit a437903

♻️ This comment has been updated with latest results.

Comment thread R/cardinalfda.R Outdated
#' @keywords internal
#' @importFrom cards ard_continuous
#' @importFrom cardx ard_continuous_ci
#' @importFrom crane tbl_demographics

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

tbl_roche_summary?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@copilot change tbl_demographics to tbl_roche_summary in this file

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.

Done — replaced tbl_demographics with tbl_roche_summary in both R/cardinalfda.R and NAMESPACE, and removed the stale gtsummary::tbl_summary import.

…NAMESPACE

Co-authored-by: shajoezhu <3692541+shajoezhu@users.noreply.github.com>
shajoezhu and others added 2 commits September 4, 2026 21:03
gtsummary was in Depends but not imported, which trips the CI
note-blocklist. Add it to the ignore_unused_imports() shim and
NAMESPACE alongside the other Depends packages used by inst/templates.
Also correct the crane import to tbl_listing (the symbol actually used;
tbl_roche_summary was never called) and refresh the stale make_table_02
NEWS entry.
Comment thread R/cardinalfda.R

@Melkiades Melkiades left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm!! I added a couple of minor fixes ;)

@shajoezhu
shajoezhu merged commit 0ff116e into main Sep 4, 2026
26 of 27 checks passed
@shajoezhu
shajoezhu deleted the drop_make_fda2_function branch September 4, 2026 15:20
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.

4 participants