Skip to content

Add true end-to-end integration tests across all training pipelines - #187

Merged
ch55secake merged 7 commits into
mainfrom
copilot/add-end-to-end-integration-test
Apr 20, 2026
Merged

Add true end-to-end integration tests across all training pipelines#187
ch55secake merged 7 commits into
mainfrom
copilot/add-end-to-end-integration-test

Conversation

Copilot AI commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Description

Adds true end-to-end integration tests covering all three training pipeline classes and all registered trading strategies. Each pipeline is exercised through the complete sequence: read_tickers → download_data → prepare_features → train → simulate, with StockDataDownloader mocked so no network calls are made. Two pre-existing bugs in SingleModelTrainingPipeline were also fixed as a prerequisite for testing it.

Changes in this pull request

  • Added tests/integration/__init__.py and tests/integration/test_full_pipeline.py with 24 end-to-end assertions
  • StackedModelTrainingPipeline: tested through train → simulate → rank_and_allocate; simulate() runs all 13 registered strategies
  • SingleModelTrainingPipeline: added TestSinglePipelineAlignment and TestSinglePipelineSimulate test classes; fixed two pre-existing bugs — _test_results was never stored after evaluate(), and simulate() was not implemented (leaving the class un-instantiable as an ABC)
  • TimeSeriesStackedModelTrainingPipeline: added TestTSStackedPipelineAlignment and TestTSStackedPipelineSimulate test classes; uses a single ticker because TimeSeriesStacker splits on the DataFrame index and duplicate timestamps from multiple tickers cause length mismatches
  • Added fast_cat_params() helper in tests/helpers.py for minimal CatBoost parameters in tests
  • All 13 registered strategies (adaptive, bb_reversion, coinflip, contrarian, directional, ema_cross, hold_days, hybrid_trend_ml, momentum, sltp, sma_trend, time_stop, volatility_adjusted) are exercised in each pipeline's simulate() call
  • Replaced traceback.print_exc() with logger.error(..., exc_info=True) in SingleModelTrainingPipeline to comply with project logging guidelines

Comment thread tests/integration/test_full_pipeline.py
Comment thread tests/integration/test_full_pipeline.py Outdated
@ch55secake
ch55secake marked this pull request as ready for review April 20, 2026 09:17
Copilot AI changed the title [WIP] Add true end-to-end integration test across the full pipeline Add true end-to-end integration tests across all training pipelines Apr 20, 2026
Copilot AI requested a review from ch55secake April 20, 2026 09:34
@ch55secake
ch55secake merged commit 165923a into main Apr 20, 2026
8 checks passed
@ch55secake
ch55secake deleted the copilot/add-end-to-end-integration-test branch April 20, 2026 19:52
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.

Testing: Add true end-to-end integration test across the full pipeline

2 participants