Add Phase 9: Migration & backward compatibility#7
Merged
Conversation
- Archive original monolithic scripts (10,200 lines) to legacy/ for reference - Convert root-level pt_*.py files to thin wrappers that delegate to the new modular src/powertrader/ package (preserves CLI interface for Hub subprocess spawning and coin-subfolder trainer copies) - Add migration checker (scripts/migrate.py) that validates package imports, entry points, legacy backups, thin wrappers, and data path resolution - Add behavioral comparison tool (scripts/compare_outputs.py) with 19 checks covering signal format, config parsing, pattern distance, entry/DCA/exit decisions, and symbol conversion — all passing - Migrate test_dca_engine.py from monolithic pt_trader imports to the extracted DCAEngine class (560 tests passing, 0 failures) - Add legacy/ to ruff exclude in pyproject.toml https://claude.ai/code/session_01RRYFBk1mpQir3m1NfJC23q
Ibrahim-3d
added a commit
that referenced
this pull request
Mar 28, 2026
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.
new modular src/powertrader/ package (preserves CLI interface for Hub
subprocess spawning and coin-subfolder trainer copies)
entry points, legacy backups, thin wrappers, and data path resolution
covering signal format, config parsing, pattern distance, entry/DCA/exit
decisions, and symbol conversion — all passing
extracted DCAEngine class (560 tests passing, 0 failures)
https://claude.ai/code/session_01RRYFBk1mpQir3m1NfJC23q