Skip to content

Add unit tests for amRviz package (utilities, data loading, plots, UI, network, annotations)#16

Open
eboyer221 wants to merge 3 commits into
mainfrom
add-unit-tests
Open

Add unit tests for amRviz package (utilities, data loading, plots, UI, network, annotations)#16
eboyer221 wants to merge 3 commits into
mainfrom
add-unit-tests

Conversation

@eboyer221
Copy link
Copy Markdown
Contributor

@eboyer221 eboyer221 commented Apr 10, 2026

Summary

Adds ~150 unit tests across 13 test files.

Test plan

  1. Open R in the package root directory and run the test suite:
    devtools::test()
    

You should see output ending with approximately [ FAIL 0 | WARN 3 | SKIP 1 | PASS 150 ]. The 1 skip is the interactive-only app launch test. The 3 warnings are pre-existing tidyselect deprecations in PR #20's implementation code (in enrich_with_annotations and makeCogBarChart), not caused by these tests.

Coverage

Utility & helpers:

  • normalize_species, getHoldoutsDrugChoices
  • Internal data helpers: .normalize_results_root, .read_parquet_safe

Data loading:

  • loadMLResults, loadTopFeat, listAmRmlSpeciesFolders, get_metadata_path, loadDrugClassMap

Annotation loading and enrichment:

  • load_feature_annotations, enrich_with_annotations, load_feature_name_map

Plot generation:

  • makeDatAvailabilityPlot, makeTimeSeriesAMRPlot, makeHostIsolatePlot, makeIsolationSourcesPlot, makeModelPerformancePlot, makeFeatureImportancePlot, makeCrossModelPerformancePlot, makeMetadataSankey, makeCogBarChart, makeDrugFeatureNetwork, makeFeatureEgoNetwork, makeCrossModelRidgePlot

Table formatting:

  • makeFeatureImportTable

UI modules:

  • queryDataUI, metadataUI, modelPerfUI, featureImportanceUI, crossModelComparisonUI, networkUI, launchAMRDashboard

@eboyer221 eboyer221 self-assigned this May 14, 2026
@eboyer221 eboyer221 requested review from charmvang and removed request for klterwelp May 14, 2026 17:50
@eboyer221 eboyer221 changed the title Added unit tests for utility, data loading, plot, and UI functions. Add unit tests for amRviz package (utilities, data loading, plots, UI, network, annotations) May 22, 2026
@eboyer221 eboyer221 requested review from AbhirupaGhosh and epbrenner and removed request for AbhirupaGhosh, charmvang and epbrenner May 22, 2026 20:23
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.

1 participant