perf: reduce unit test runtime from 82s to 28s#322
Merged
Conversation
Move 17 aggregator tests to autogalaxy_workspace_test as integration scripts. Monkeypatch plt.tight_layout and plt.colorbar in plot_patch fixture to skip expensive matplotlib internals. Reduce interferometer grid sizes (51x51→31x31), UV wavelengths (7→3), and MGE test gaussian counts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Reduce unit test suite runtime by 66% (81.56s → ~28s) through three strategies:
autogalaxy_workspace_testas integration scripts (saves ~30s)plt.tight_layoutandplt.colorbarinplot_patchfixture to skip expensive matplotlib internals (saves ~12s)All 17 aggregator tests are preserved with identical assertions in the new
autogalaxy_workspace_testrepo underscripts/database/scrape/.API Changes
None — internal test changes only.
Test Plan
Full API Changes (for automation & release notes)
No public API changes. All modifications are to test files and test configuration only:
Removed (from unit tests — moved to autogalaxy_workspace_test)
test_autogalaxy/aggregator/— entire directory (17 tests across 8 files)Changed (test parameters only)
test_autogalaxy/interferometer/test_simulate_and_fit_interferometer.py— grid 51×51→31×31, UV wavelengths 7→3, mesh 7×7→5×5test_autogalaxy/interferometer/test_simulator.py— UV wavelengths 7→3test_autogalaxy/analysis/test_model_util.py— total_gaussians 10→3, 5→2test_autogalaxy/conftest.py— added tight_layout and colorbar monkeypatches to plot_patch fixture🤖 Generated with Claude Code