Skip to content

Reorganize utils#33

Merged
eboyer221 merged 2 commits into
mainfrom
reorg-utils
Jun 12, 2026
Merged

Reorganize utils#33
eboyer221 merged 2 commits into
mainfrom
reorg-utils

Conversation

@eboyer221

Copy link
Copy Markdown
Contributor

Reorganize utils.R into themed files

What

Splits the single R/utils.R into 11 files, to make the codebase easier to read and review ahead of Bioconductor submission. The split follows the pattern: plot builders grouped by feature, with generic helpers in topic-based utils_* files.

File Holds
plots_metadata.R Metadata tab plots + quick stats
plots_modelperf.R Model performance plots
plots_featureimportance.R Feature-importance plot / table / COG bar chart
plots_crossmodel.R Cross-model holdout plots
plots_network.R Drug–feature + ego networks
utils_data.R Data loaders + species/file discovery
utils_annotation.R Cluster/COG + drug-class annotation lookups
utils_colors.R Palettes + meta_palette()
utils_misc.R normalize_species, choice helpers, species regex
utils_ui.R amr_button / styledBox / amr_select
imports.R Package-level @importFrom block

No logic changed - functions were only relocated. Verified:

  • All 38 functions present exactly once across the new files (no drops/dupes).
  • devtools::test() passes with zero edits to the test files (148 pass / 0 fail / 2 skip).
  • Package installs and the shinytest2 app tests pass (20 / 0).

Notes

@amcim amcim left a comment

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.

Tests work and app works. And I love the organization of utils and plots files.

As a note, we can organize app in a similar way, but this will require refactoring that code more extensively. We can and probably should do this before submission.

@eboyer221 eboyer221 merged commit f0f1459 into main Jun 12, 2026
7 checks passed
@eboyer221 eboyer221 deleted the reorg-utils branch June 12, 2026 17:28
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.

2 participants