Document utils_/plots_ helpers and simplify code#34
Merged
Conversation
eboyer221
requested review from
AbhirupaGhosh,
amcim,
charmvang,
epbrenner and
jananiravi
June 18, 2026 18:05
amcim
approved these changes
Jun 23, 2026
amcim
left a comment
Contributor
There was a problem hiding this comment.
This is great. Especially great job with the simplifications. Approved for merge if CI passes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation + simplification pass on core helpers
Adds roxygen documentation and simplifications to the code across the core
utils_*andplots_*helper files.These changes intentionally do not touch
app.R(separate app.R refactor in progress) or the export feature (PR #32).Documentation
@param/@return+@keywords internal+@noRd).@noRdmeans no man pages are generated and no new R CMD checkobligations - NAMESPACE is unchanged (only
launchAMRDashboardexported).Simplifications
utils_data.R: collapsed the near-identicalloadMLResults/loadTopFeatbodies into a shared.load_species_results(); extracted the duplicated subdir search into.find_file_in_subdirs().utils_annotation.R: both annotation lookups now reuse.find_file_in_subdirs(); removed deadcwd/commented code inloadDrugClassMap().plots_modelperf.R: duplicated scale-label/color block →.scale_label_map().plots_featureimportance.R: two identical rank-and-matrix blocks →.vi_matrix(); the two link-builders →.link_ids(); removed deadmax_val/min_val.plots_crossmodel.R: removed two more deadmax_val/min_valpairs..data$deprecation (the 5select()warnings are gone) by switching to quoted column names.Testing
R CMD INSTALLclean; roxygen regen produces no NAMESPACE/man changes.FAIL 0 | WARN 0 | PASS 168FAIL 0 | WARN 0 | PASS 20Notes for reviewer
plots_crossmodel.Randplots_featureimportance.R- a clean.vi_heatmap()extraction, but it adds cross-file coupling so I left it.plots_metadata.Rhas a few plots with very similar (but not identical) theme styling. I left them as separate copies rather than merging into one helper, since the small differences would make a shared version messier.species_codeis accepted but unused inload_feature_name_mapand load_feature_annotations;annotated_diris unused inmakeCrossModelFeatureImportancePlot;styledBox()computes and discards adiv`. Flagging in case these are real bugs.