-
Notifications
You must be signed in to change notification settings - Fork 3
chore: dead code cleanup - remove ~2,450 lines of commented code #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add pytest --debug-prints flag and debug_print fixture for controllable debug output in tests. This enables preserving valuable debug prints while keeping normal test output clean. Usage: pytest tests/ # Silent pytest tests/ --debug-prints -s # With debug output Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 2 of dead code cleanup. These pdb imports were added for debugging but never used (all had `# noqa: F401` to silence flake8 warnings). Files modified across: plotting/, fitfunctions/, core/, solar_activity/, instabilities/, tools/, and root __init__.py Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 3 of dead code cleanup. This file contained legacy implementations of AggPlot, Hist1D, Hist2D, and GridHist2D classes that were fully commented out. The actual implementations now live in their own modules (agg_plot.py, hist1d.py, hist2d.py). File reduced from 1,845 lines to 15 lines (99% reduction). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 4 of dead code cleanup. Removed commented-out implementations, debug prints, and memory profiling code. Files cleaned: - plasma.py: -235 lines (commented algorithms, debug prints) - base.py: -153 lines (old clip_data, Plot2D class) - spiral.py: -90 lines (timing/debug code) - hist2d.py: -92 lines (old implementations) - orbits.py: -14 lines (memory profiling) Preserved all TODO comments as active work items. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Claude finished @blalterman's task —— View job PR Code Review: Dead Code CleanupTodo List:
🟢 APPROVED - Excellent Dead Code CleanupThis is a comprehensive and well-executed dead code cleanup that significantly improves codebase maintainability. All requested review areas have been thoroughly evaluated: 📋 Code Quality & Best PracticesExcellent - Strategic cleanup following clear principles:
🔍 Potential Bugs/IssuesNone detected - Changes are purely subtractive:
⚡ Performance ConsiderationsPositive impact:
🔒 Security ConcernsNone - This is a pure cleanup operation with no security implications. 🧪 Test CoverageMaintained - Per PR description:
💯 Final RecommendationMERGE IMMEDIATELY - This PR exemplifies excellent software maintenance:
The transformation of |
SolarWindPy Documentation Validation - Python 3.11✅ Status: PASSED Essential Metrics:
🎉 All essential documentation examples working! |
Summary
debug_printpytest fixture for toggleable test outputChanges by Phase
Phase 1: Test Infrastructure
debug_printfixture totests/conftest.pypytest --debug-prints -senables debug outputPhase 2: Import Cleanup (35 files)
import pdb # noqa: F401statementsPhase 3: histograms.py (1,830 lines removed)
agg_plot.py,hist1d.py,hist2d.pyPhase 4: 5 Source Files (584 lines removed)
plasma.py: Removed commented algorithms and debug printsbase.py: Removed old clip_data and Plot2D classspiral.py: Removed timing/debug codehist2d.py: Removed old implementationsorbits.py: Removed memory profiling codePreserved
Test plan
🤖 Generated with Claude Code