exness-data-preprocess 0.7.2__tar.gz → 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/.gitignore +7 -0
  2. exness_data_preprocess-1.0.0/.lint-relative-paths-results.txt +62 -0
  3. exness_data_preprocess-1.0.0/.releaserc.yml +22 -0
  4. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/CHANGELOG.md +32 -4
  5. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/CLAUDE.md +1 -1
  6. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/PKG-INFO +8 -19
  7. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/README.md +2 -2
  8. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/README.md +7 -6
  9. exness_data_preprocess-1.0.0/docs/adr/2025-12-09-codebase-pruning.md +150 -0
  10. exness_data_preprocess-1.0.0/docs/adr/2025-12-09-exness-clickhouse-migration.md +196 -0
  11. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/RESEARCH_PATTERNS_CANONICALIZATION_2025-10-17.md +2 -2
  12. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/archive/UNIFIED_DUCKDB_PLAN_v1.0.0_LEGACY.md +3 -3
  13. exness_data_preprocess-1.0.0/docs/design/2025-12-09-codebase-pruning/spec.md +93 -0
  14. exness_data_preprocess-1.0.0/docs/design/2025-12-09-exness-clickhouse-migration/spec.md +310 -0
  15. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/HYBRID_SESSION_DETECTION_ANALYSIS.md +5 -5
  16. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/02-mode-truncated-analysis.md +1 -13
  17. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/03-hurdle-model-analysis.md +1 -5
  18. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/README.md +3 -3
  19. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/02-baseline-sep2024.md +5 -15
  20. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/03-multiperiod-validation.md +7 -11
  21. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/04-discoveries-and-plan-evolution.md +1 -2
  22. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/README.md +1 -1
  23. exness_data_preprocess-1.0.0/package-lock.json +6272 -0
  24. exness_data_preprocess-1.0.0/package.json +9 -0
  25. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/pyproject.toml +9 -25
  26. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/__init__.py +27 -5
  27. exness_data_preprocess-1.0.0/src/exness_data_preprocess/clickhouse_base.py +71 -0
  28. exness_data_preprocess-1.0.0/src/exness_data_preprocess/clickhouse_client.py +170 -0
  29. exness_data_preprocess-1.0.0/src/exness_data_preprocess/clickhouse_gap_detector.py +231 -0
  30. exness_data_preprocess-1.0.0/src/exness_data_preprocess/clickhouse_manager.py +370 -0
  31. exness_data_preprocess-1.0.0/src/exness_data_preprocess/clickhouse_ohlc_generator.py +348 -0
  32. exness_data_preprocess-1.0.0/src/exness_data_preprocess/clickhouse_query_engine.py +362 -0
  33. exness_data_preprocess-0.7.2/.lychee-results.json +0 -425
  34. exness_data_preprocess-0.7.2/.lychee-results.txt +0 -144
  35. exness_data_preprocess-0.7.2/.lycheecache +0 -0
  36. exness_data_preprocess-0.7.2/src/exness_data_preprocess/api.py +0 -303
  37. exness_data_preprocess-0.7.2/src/exness_data_preprocess/cli.py +0 -251
  38. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/.cz.toml +0 -0
  39. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/.github/workflows/ci.yml +0 -0
  40. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/.github/workflows/pre-commit-autoupdate.yml +0 -0
  41. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/.github/workflows/publish.yml +0 -0
  42. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/.pre-commit-config.yaml +0 -0
  43. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/CONTRIBUTING.md +0 -0
  44. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/LICENSE +0 -0
  45. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/Makefile +0 -0
  46. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/cliff-release-notes.toml +0 -0
  47. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/cliff.toml +0 -0
  48. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/DATABASE_SCHEMA.md +0 -0
  49. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/EXNESS_DATA_SOURCES.md +0 -0
  50. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/MODULE_ARCHITECTURE.md +0 -0
  51. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/PRIORITY3_CLEANUP_PLAN.yaml +0 -0
  52. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/REPOSITORY_REFACTORING_PLAN.yaml +0 -0
  53. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/RESEARCH_PATTERNS.md +0 -0
  54. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/TRADING_HOURS_RESEARCH.md +0 -0
  55. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/UNIFIED_DUCKDB_PLAN_v2.md +0 -0
  56. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/CLAUDE_MD_AUDIT_2025-10-16_PASS2.md +0 -0
  57. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/CLAUDE_MD_VERIFICATION_CHECKLIST_2025-10-16.md +0 -0
  58. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/CLAUDE_MD_VERIFICATION_FINDINGS_2025-10-16.md +0 -0
  59. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/DOCUMENTATION_AUDIT_2025-10-15.md +0 -0
  60. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/DOCUMENTATION_AUDIT_PASS2_2025-10-15.md +0 -0
  61. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/DOCUMENTATION_BEST_PRACTICES_LINE_COUNTS.md +0 -0
  62. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/E2E_TESTING_PLAN_v1.0.0.md +0 -0
  63. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/EXCHANGE_SESSION_AUDIT_2025-10-17.md +0 -0
  64. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/FUNCTIONALITY_VALIDATION_REPORT_2025-10-15.md +0 -0
  65. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/FUNCTIONALITY_VALIDATION_REPORT_2025-10-16.md +0 -0
  66. {exness_data_preprocess-0.7.2/docs/research → exness_data_preprocess-1.0.0/docs/archive}/GAP_DETECTION_COMPARISON.md +0 -0
  67. {exness_data_preprocess-0.7.2/docs/research → exness_data_preprocess-1.0.0/docs/archive}/GAP_DETECTION_SQL_APPROACH.md +0 -0
  68. {exness_data_preprocess-0.7.2/docs/phases → exness_data_preprocess-1.0.0/docs/archive}/PHASE4_DRY_RUN_CONFIG_PLAN.yaml +0 -0
  69. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/PHASE7_v1.5.0_REFACTORING_PLAN.md +0 -0
  70. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/PHASE7_v1.6.0_REFACTORING_PROGRESS.md +0 -0
  71. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/archive/PYDANTIC_REFACTORING_PLAN_v0.2.0_COMPLETE.md +0 -0
  72. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/archive/PYDANTIC_REFACTORING_STATUS_v0.2.0_COMPLETE.md +0 -0
  73. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/REFACTORING_CHECKLIST.md +0 -0
  74. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/SCHEMA_v1.6.0_AUDIT_FINDINGS.md +0 -0
  75. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/SCHEMA_v1.6.0_MIGRATION_GUIDE.md +0 -0
  76. {exness_data_preprocess-0.7.2/docs/plans → exness_data_preprocess-1.0.0/docs/archive}/SESSION_2025-10-15_SUMMARY.md +0 -0
  77. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/archive/implementation-plan-2024-11-24.yaml +0 -0
  78. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/optimization/OPTIMIZATION_OPPORTUNITIES_2025-10-18.md +0 -0
  79. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml +0 -0
  80. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml +0 -0
  81. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/releases/RELEASE_NOTES.md +0 -0
  82. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/releases/RELEASE_NOTES_SHORT.md +0 -0
  83. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/compression-benchmarks/README.md +0 -0
  84. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/compression-benchmarks/test_all_compression_methods.py +0 -0
  85. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/compression-benchmarks/test_delta_encoding_properly.py +0 -0
  86. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/compression-benchmarks/test_parquet_compression_methods.py +0 -0
  87. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/01-methodology.md +0 -0
  88. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/04-temporal-patterns.md +0 -0
  89. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/05-final-recommendations.md +0 -0
  90. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/scripts/reproduction_guide.md +0 -0
  91. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/visualizations/hurdle-model/hurdle_decomposition.png +0 -0
  92. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/visualizations/mode-truncated/cv_mode_comparison.png +0 -0
  93. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/visualizations/mode-truncated/distribution_overlay.png +0 -0
  94. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/visualizations/mode-truncated/signal_quality_comparison.png +0 -0
  95. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/visualizations/mode-truncated/variance_decomposition.png +0 -0
  96. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/visualizations/temporal/concentration_curve.png +0 -0
  97. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-spread-analysis/visualizations/temporal/percentile_analysis.png +0 -0
  98. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/01-methodology.md +0 -0
  99. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/findings/baseline-sep2024-comprehensive-summary.md +0 -0
  100. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/findings/phase2-mean-reversion-report.md +0 -0
  101. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/findings/phase3-volatility-model-report.md +0 -0
  102. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/findings/phase4-5-statistical-tests-survivorship-report.md +0 -0
  103. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/baseline-sep2024/01_mean_reversion_analysis.py +0 -0
  104. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/baseline-sep2024/02_volatility_model_simple.py +0 -0
  105. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/baseline-sep2024/03_liquidity_crisis_detection.py +0 -0
  106. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/baseline-sep2024/04_regime_detection_analysis.py +0 -0
  107. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase1_data_validation.py +0 -0
  108. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase2_mean_reversion.py +0 -0
  109. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase3_volatility_model.py +0 -0
  110. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase4_statistical_tests.py +0 -0
  111. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase5_survivorship_bias.py +0 -0
  112. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase5_survivorship_bias_v1.0.1.py +0 -0
  113. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase6a_interval_analysis.py +0 -0
  114. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase6b_price_clustering.py +0 -0
  115. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/multiperiod-validation/phase6c_combined_pattern.py +0 -0
  116. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/reproduction_guide.md +0 -0
  117. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/visualization/diagnostic_burst_decay.py +0 -0
  118. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/visualization/generate_interactive_dashboard.py +0 -0
  119. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/visualization/generate_lightweight_dashboard.py +0 -0
  120. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/eurusd-zero-spread-deviations/scripts/visualization/prepare_visualization_data.py +0 -0
  121. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/research/gap_detection_implementation_example.py +0 -0
  122. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/setup/GITHUB_PYPI_SETUP.md +0 -0
  123. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/validation/ARCHITECTURE_AUDIT_2025-10-17.md +0 -0
  124. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/validation/ARCHITECTURE_EFFICIENCY_AUDIT_2025-10-18.md +0 -0
  125. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/validation/DOCUMENTATION_SURVEY_v1.7.0.md +0 -0
  126. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/validation/E2E_VALIDATION_RESULTS_v1.6.0.md +0 -0
  127. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md +0 -0
  128. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md +0 -0
  129. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/validation/WEEKEND_GAP_VALIDATION_SUMMARY.md +0 -0
  130. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/docs/validation/WORKSPACE_SURVEY_2025-10-17.md +0 -0
  131. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/examples/basic_usage.py +0 -0
  132. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/examples/batch_processing.py +0 -0
  133. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/config.py +0 -0
  134. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/database_manager.py +0 -0
  135. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/downloader.py +0 -0
  136. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/exchanges.py +0 -0
  137. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/gap_detector.py +0 -0
  138. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/models.py +0 -0
  139. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/ohlc_generator.py +0 -0
  140. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/processor.py +0 -0
  141. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/query_engine.py +0 -0
  142. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/schema.py +0 -0
  143. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/session_detector.py +0 -0
  144. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/src/exness_data_preprocess/tick_loader.py +0 -0
  145. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/tests/README.md +0 -0
  146. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/tests/__init__.py +0 -0
  147. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/tests/conftest.py +0 -0
  148. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/tests/test_basic.py +0 -0
  149. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/tests/test_functional_regression.py +0 -0
  150. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/tests/test_models.py +0 -0
  151. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/tests/test_processor_pydantic.py +0 -0
  152. {exness_data_preprocess-0.7.2 → exness_data_preprocess-1.0.0}/tests/test_types.py +0 -0
@@ -100,3 +100,10 @@ uv.lock
100
100
  # Pre-commit
101
101
  # .pre-commit-config.yaml should be tracked, not ignored
102
102
  .token-info.md
103
+
104
+ # Node.js (semantic-release)
105
+ node_modules/
106
+
107
+ # Link checking (lychee)
108
+ .lychee*
109
+ .lycheecache
@@ -0,0 +1,62 @@
1
+ 🔍 Scanning for non-repo-relative paths in: /Users/terryli/eon/exness-data-preprocess
2
+ Violations: paths not starting with / or http(s)
3
+
4
+ ❌ Found 141 violation(s):
5
+
6
+ /Users/terryli/eon/exness-data-preprocess/README.md:112:- **Column Definitions**: See [`schema.py`](src/exness_data_preprocess/schema.py) - Single source of truth
7
+ /Users/terryli/eon/exness-data-preprocess/README.md:113:- **Comprehensive Reference**: See [`DATABASE_SCHEMA.md`](docs/DATABASE_SCHEMA.md) - Query examples and usage patterns
8
+ /Users/terryli/eon/exness-data-preprocess/README.md:401:- Validation: [`docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md)
9
+ /Users/terryli/eon/exness-data-preprocess/README.md:409:- SSoT: [`docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml`](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)
10
+ /Users/terryli/eon/exness-data-preprocess/README.md:410:- Validation: [`docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md)
11
+ /Users/terryli/eon/exness-data-preprocess/README.md:417:- SSoT: [`docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml`](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)
12
+ /Users/terryli/eon/exness-data-preprocess/README.md:419:**Release Notes**: See [`CHANGELOG.md`](CHANGELOG.md) for complete v0.5.0 details
13
+ /Users/terryli/eon/exness-data-preprocess/README.md:485:**[📚 Complete Documentation Hub](docs/README.md)** - Organized guide from beginner to advanced (72+ documents)
14
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:7:**Full Documentation**: [`README.md`](README.md) - Installation, usage, API reference
15
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:15:- **[README.md](README.md)** - Installation, API reference, usage examples
16
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:16:- **[examples/basic_usage.py](examples/basic_usage.py)** - Download, query, coverage operations
17
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:17:- **[examples/batch_processing.py](examples/batch_processing.py)** - Multi-instrument parallel processing
18
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:21:- **[docs/README.md](docs/README.md)** - Architecture, planning, research findings
19
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:22:- **[docs/MODULE_ARCHITECTURE.md](docs/MODULE_ARCHITECTURE.md)** - Complete module documentation with SLOs (v1.7.0)
20
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:23:- **[docs/DATABASE_SCHEMA.md](docs/DATABASE_SCHEMA.md)** - Complete database schema with self-documentation
21
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:24:- **[docs/RESEARCH_PATTERNS.md](docs/RESEARCH_PATTERNS.md)** - Research lifecycle and tool selection (v1.0.0)
22
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:25:- **[docs/UNIFIED_DUCKDB_PLAN_v2.md](docs/UNIFIED_DUCKDB_PLAN_v2.md)** - v2.0.0 architecture specification
23
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:26:- **[docs/EXNESS_DATA_SOURCES.md](docs/EXNESS_DATA_SOURCES.md)** - Data source variants and URLs
24
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:27:- **[Makefile](Makefile)** - Module introspection commands (module-stats, module-complexity, module-deps)
25
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:31:- **[docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)** - SSoT plan v2.0.0 (2.2x speedup)
26
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:32:- **[docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)** - SSoT plan v2.0.0 (complete coverage)
27
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:33:- **[docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md](docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md)** - Phase 1 validation
28
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:34:- **[docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md](docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md)** - Phase 2 validation
29
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:40:- **[CONTRIBUTING.md](CONTRIBUTING.md)** - Contribution guidelines
30
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:55:**Complete Specification**: [`docs/UNIFIED_DUCKDB_PLAN_v2.md`](docs/UNIFIED_DUCKDB_PLAN_v2.md)
31
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:76:**Complete Details**: [`docs/MODULE_ARCHITECTURE.md`](docs/MODULE_ARCHITECTURE.md)
32
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:83: - SSoT: [`docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE1_2025-10-18.md)
33
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:89: - SSoT: [`docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml`](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)
34
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:90: - Validation: [`docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md)
35
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:96: - SSoT: [`docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml`](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)
36
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:109:**Complete Schema**: [`docs/DATABASE_SCHEMA.md`](docs/DATABASE_SCHEMA.md)
37
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:118:**Complete Guide**: [`docs/EXNESS_DATA_SOURCES.md`](docs/EXNESS_DATA_SOURCES.md)
38
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:128:**Complete Specification**: [`docs/RESEARCH_PATTERNS.md`](docs/RESEARCH_PATTERNS.md)
39
+ /Users/terryli/eon/exness-data-preprocess/CLAUDE.md:196:**Complete Development Guide**: [`README.md`](README.md) (Installation section)
40
+ /Users/terryli/eon/exness-data-preprocess/tests/README.md:30:- **New**: Phase7 13-column (v1.2.0) OHLC - See [`../src/exness_data_preprocess/schema.py`](../src/exness_data_preprocess/schema.py)
41
+ /Users/terryli/eon/exness-data-preprocess/docs/EXNESS_DATA_SOURCES.md:310:**Full Specification**: [`docs/research/eurusd-zero-spread-deviations/data/plan/phase7_bid_ohlc_construction_v1.1.0.md`](research/eurusd-zero-spread-deviations/data/plan/phase7_bid_ohlc_construction_v1.1.0.md)
42
+ /Users/terryli/eon/exness-data-preprocess/docs/EXNESS_DATA_SOURCES.md:386:- **Phase7 Methodology**: [`docs/research/eurusd-zero-spread-deviations/01-methodology.md`](research/eurusd-zero-spread-deviations/01-methodology.md)
43
+ /Users/terryli/eon/exness-data-preprocess/docs/EXNESS_DATA_SOURCES.md:387:- **Zero-Spread Research**: [`docs/research/eurusd-zero-spread-deviations/README.md`](research/eurusd-zero-spread-deviations/README.md)
44
+ /Users/terryli/eon/exness-data-preprocess/docs/EXNESS_DATA_SOURCES.md:391:- **Current Processor**: [`src/exness_data_preprocess/processor.py`](../src/exness_data_preprocess/processor.py) (needs refactoring)
45
+ /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:5:**Related**: [`README.md`](../README.md) - Architecture overview
46
+ /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:43:- See [`docs/validation/ARCHITECTURE_AUDIT_2025-10-17.md`](validation/ARCHITECTURE_AUDIT_2025-10-17.md) for complete audit findings
47
+ /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:964:See [`Makefile`](../Makefile) for implementation.
48
+ /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1076:- **[README.md](../README.md)** - User-facing API reference
49
+ /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1077:- **[docs/README.md](README.md)** - Documentation hub
50
+ /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1078:- **[docs/DATABASE_SCHEMA.md](DATABASE_SCHEMA.md)** - Complete database schema
51
+ /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1079:- **[docs/UNIFIED_DUCKDB_PLAN_v2.md](UNIFIED_DUCKDB_PLAN_v2.md)** - v2.0.0 architecture specification
52
+ /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1080:- **[Makefile](../Makefile)** - Module introspection commands
53
+ /Users/terryli/eon/exness-data-preprocess/docs/MODULE_ARCHITECTURE.md:1082:- **[docs/validation/ARCHITECTURE_AUDIT_2025-10-17.md](validation/ARCHITECTURE_AUDIT_2025-10-17.md)** - Complete audit findings and corrections
54
+ /Users/terryli/eon/exness-data-preprocess/docs/DATABASE_SCHEMA.md:244:**Column Definitions**: See [`../src/exness_data_preprocess/schema.py`](../src/exness_data_preprocess/schema.py) for complete column definitions with types and descriptions.
55
+ /Users/terryli/eon/exness-data-preprocess/docs/DATABASE_SCHEMA.md:258:**Architecture**: Exchange Registry Pattern (v1.6.0) - Session columns dynamically generated from centralized EXCHANGES dict in [`exchanges.py`](../src/exness_data_preprocess/exchanges.py)
56
+
57
+ ... and 91 more (showing first 50)
58
+
59
+ 📝 Fix: Convert relative paths to repo-relative paths starting with /
60
+ WRONG: [Link](../docs/foo.md)
61
+ WRONG: [Link](docs/foo.md)
62
+ RIGHT: [Link](/docs/foo.md)
@@ -0,0 +1,22 @@
1
+ # semantic-release configuration for Python project
2
+ # Uses @semantic-release/exec instead of @semantic-release/npm
3
+ branches:
4
+ - main
5
+
6
+ plugins:
7
+ - "@semantic-release/commit-analyzer"
8
+ - "@semantic-release/release-notes-generator"
9
+ - "@semantic-release/changelog"
10
+ - - "@semantic-release/exec"
11
+ - prepareCmd: |
12
+ # Update version in pyproject.toml
13
+ sed -i '' 's/^version = ".*"/version = "${nextRelease.version}"/' pyproject.toml
14
+ # Update version in __init__.py
15
+ sed -i '' 's/^__version__ = ".*"/__version__ = "${nextRelease.version}"/' src/exness_data_preprocess/__init__.py
16
+ - - "@semantic-release/git"
17
+ - assets:
18
+ - pyproject.toml
19
+ - src/exness_data_preprocess/__init__.py
20
+ - CHANGELOG.md
21
+ message: "chore(release): bump version ${lastRelease.version} → ${nextRelease.version} [skip ci]"
22
+ - "@semantic-release/github"
@@ -1,3 +1,34 @@
1
+ # [1.0.0](https://github.com/terrylica/exness-data-preprocess/compare/v0.8.0...v1.0.0) (2025-12-10)
2
+
3
+
4
+ * feat!: prune codebase - remove unused deps, archive docs, extract mixin ([e0d48b8](https://github.com/terrylica/exness-data-preprocess/commit/e0d48b8fe7ba44d2c3bc326661102a0b3d3b33b7))
5
+
6
+
7
+ ### BREAKING CHANGES
8
+
9
+ * Remove deprecated api.py and cli.py modules
10
+
11
+ Dependency cleanup:
12
+ - Remove httpx, pyarrow, polars (unused)
13
+ - Move tqdm to optional [examples] extra
14
+ - Consolidate dev dependencies to [dependency-groups]
15
+
16
+ Documentation archival:
17
+ - Archive 20 planning/research docs to docs/archive/
18
+ - Update .gitignore for node_modules, lychee patterns
19
+
20
+ Code refactoring:
21
+ - Extract ClickHouseClientMixin from 4 modules (~45 lines saved)
22
+ - Delete api.py (304 lines) and cli.py (252 lines)
23
+
24
+ ADR: docs/adr/2025-12-09-codebase-pruning.md
25
+
26
+ # [0.8.0](https://github.com/terrylica/exness-data-preprocess/compare/v0.7.2...v0.8.0) (2025-12-10)
27
+
28
+ ### Features
29
+
30
+ - add ClickHouse backend for cloud deployment ([c9b51a3](https://github.com/terrylica/exness-data-preprocess/commit/c9b51a3b374eea74375cc86afdd8cb9391fe73e8))
31
+
1
32
  # Changelog
2
33
 
3
34
  All notable changes to exness-data-preprocess will be documented in this file.
@@ -5,12 +36,10 @@ All notable changes to exness-data-preprocess will be documented in this file.
5
36
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
37
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
38
 
8
-
9
39
  ### 💅 Code Style
10
40
 
11
41
  - Format markdown files with prettier Standardized formatting for CHANGELOG.md.
12
42
 
13
-
14
43
  ### 📚 Documentation
15
44
 
16
45
  - Move test plan to docs/plans/ - Move tests/archive/E2E_TESTING_PLAN_v1.0.0.md -> docs/plans/ - Remove empty tests/archive/ directory - Consistent with docs/ organization strategy Impact: Planning docs consolidated in docs/plans/ Risk: Low (internal doc, no external references)
@@ -19,7 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
48
 
20
49
  - Remove redundant DOCUMENTATION.md - Remove DOCUMENTATION.md (content duplicates docs/README.md) - Update README.md link to point to docs/README.md - Both files serve as navigation hubs with identical purpose Impact: -1 root file, single documentation entry point Risk: Low (historical CHANGELOG references preserved, README updated)
21
50
 
22
- - Organize phase plans into docs/phases/ - Move PHASE2*.yaml, PHASE3*.yaml, PHASE4*.yaml -> docs/phases/ - Update 4 references in CLAUDE.md - Consolidate SSoT planning files in dedicated subdirectory Impact: -3 docs/ root files, improved organization Risk: Low (all references updated, git mv preserves history)
51
+ - Organize phase plans into docs/phases/ - Move PHASE2*.yaml, PHASE3*.yaml, PHASE4\*.yaml -> docs/phases/ - Update 4 references in CLAUDE.md - Consolidate SSoT planning files in dedicated subdirectory Impact: -3 docs/ root files, improved organization Risk: Low (all references updated, git mv preserves history)
23
52
 
24
53
  - Move GitHub/PyPI setup to docs/setup/ - Move GITHUB_PYPI_SETUP.md -> docs/setup/ - No active references in README.md or CONTRIBUTING.md - Historical CHANGELOG references preserved Impact: -1 root file, infrastructure docs consolidated Risk: Low (no external links, CHANGELOG preserved)
25
54
 
@@ -31,7 +60,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
31
60
 
32
61
  - Update refactoring SSoT plans to completion status - REPOSITORY_REFACTORING_PLAN.yaml: v2.0.0 -> v3.0.0 - PRIORITY3_CLEANUP_PLAN.yaml: v1.0.0 -> v2.0.0 (Completed) Combined Priority 1-3 Impact: - Root MD files: 10 -> 4 (-60%) - docs/ root files: 12 -> 8 (-33%) - Total clutter: 30 -> 12 items (-60%) Total: 11 commits, ~40 minutes, zero regressions
33
62
 
34
-
35
63
  ### 🧰 Maintenance
36
64
 
37
65
  - Untrack lychee cache files - Remove .lychee-results.json, .lychee-results.txt, .lycheecache from tracking - Files remain gitignored via .gitignore rules - Add REPOSITORY_REFACTORING_PLAN.yaml SSoT (v1.0.0) Impact: Cleaner git status, prevent cache pollution Risk: None (cache files, no external references)
@@ -56,7 +56,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
56
56
 
57
57
  ### Module Pattern (v1.7.0)
58
58
 
59
- - **Facade orchestrator** (processor.py) coordinating 7 specialized modules
59
+ - **Facade orchestrator** (processor.py) coordinating 6 module instances + 1 static utility
60
60
  - **Separation of concerns** with single-responsibility modules
61
61
  - **SLO-based design** (Availability, Correctness, Observability, Maintainability)
62
62
  - **Off-the-shelf libraries** (httpx, pandas, DuckDB, exchange_calendars)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: exness-data-preprocess
3
- Version: 0.7.2
3
+ Version: 1.0.0
4
4
  Summary: Professional Exness forex tick data preprocessing with optimal compression (Parquet Zstd-22) and DuckDB OHLC generation. Provides efficient storage (9% smaller than ZIP) with lossless precision and direct queryability.
5
5
  Project-URL: Homepage, https://github.com/terrylica/exness-data-preprocess
6
6
  Project-URL: Documentation, https://github.com/terrylica/exness-data-preprocess#readme
@@ -12,39 +12,28 @@ Author-email: Eon Labs <terry@eonlabs.com>
12
12
  Maintainer-email: Terry Li <terry@eonlabs.com>
13
13
  License: MIT
14
14
  License-File: LICENSE
15
- Keywords: backtesting,compression,data-engineering,duckdb,efficient-storage,eurusd,exness,financial-data,forex,forex-data,lossless,microstructure,ohlc,pandas,parquet,preprocessing,pyarrow,quantitative-finance,queryable,tick-data,time-series,zstd
15
+ Keywords: backtesting,compression,data-engineering,duckdb,efficient-storage,eurusd,exness,financial-data,forex,forex-data,lossless,microstructure,ohlc,pandas,parquet,preprocessing,quantitative-finance,queryable,tick-data,time-series,zstd
16
16
  Classifier: Development Status :: 3 - Alpha
17
17
  Classifier: Intended Audience :: Developers
18
18
  Classifier: Intended Audience :: Financial and Insurance Industry
19
19
  Classifier: License :: OSI Approved :: MIT License
20
20
  Classifier: Operating System :: OS Independent
21
21
  Classifier: Programming Language :: Python :: 3
22
- Classifier: Programming Language :: Python :: 3.9
23
- Classifier: Programming Language :: Python :: 3.10
24
22
  Classifier: Programming Language :: Python :: 3.11
25
23
  Classifier: Programming Language :: Python :: 3.12
26
24
  Classifier: Programming Language :: Python :: 3.13
27
25
  Classifier: Topic :: Office/Business :: Financial :: Investment
28
26
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
29
27
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
- Requires-Python: >=3.9
28
+ Requires-Python: >=3.11
29
+ Requires-Dist: clickhouse-connect>=0.7.0
31
30
  Requires-Dist: duckdb>=0.9.0
32
31
  Requires-Dist: exchange-calendars>=4.5.6
33
- Requires-Dist: httpx>=0.25.0
34
32
  Requires-Dist: pandas>=2.0.0
35
- Requires-Dist: pyarrow>=16.0.0
36
33
  Requires-Dist: pydantic>=2.0.0
37
34
  Requires-Dist: pyyaml>=6.0.0
38
- Requires-Dist: tqdm>=4.65.0
39
- Provides-Extra: dev
40
- Requires-Dist: black>=23.0.0; extra == 'dev'
41
- Requires-Dist: mypy>=1.5.0; extra == 'dev'
42
- Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
43
- Requires-Dist: pytest>=7.0.0; extra == 'dev'
44
- Requires-Dist: ruff>=0.1.0; extra == 'dev'
45
- Provides-Extra: test
46
- Requires-Dist: pytest-cov>=4.0.0; extra == 'test'
47
- Requires-Dist: pytest>=7.0.0; extra == 'test'
35
+ Provides-Extra: examples
36
+ Requires-Dist: tqdm>=4.65.0; extra == 'examples'
48
37
  Description-Content-Type: text/markdown
49
38
 
50
39
  # Exness Data Preprocess v2.0.0
@@ -455,7 +444,7 @@ Data is sourced from Exness's public tick data repository:
455
444
  - Vectorized approach: 2.69s (302K bars, 10 exchanges)
456
445
  - Combined Phase 1+2: ~16x total speedup (8.05s → 0.50s)
457
446
  - Implementation: Pre-compute trading minutes, vectorized `.isin()` lookup
458
- - SSoT: [`docs/PHASE2_SESSION_VECTORIZATION_PLAN.yaml`](docs/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)
447
+ - SSoT: [`docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml`](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)
459
448
  - Validation: [`docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md)
460
449
 
461
450
  **SQL Gap Detection** - Complete coverage with 46% code reduction:
@@ -463,7 +452,7 @@ Data is sourced from Exness's public tick data repository:
463
452
  - Bug fix: Python approach missed internal gaps (41 detected vs 42 actual)
464
453
  - SQL EXCEPT operator detects ALL gaps (before + within + after existing data)
465
454
  - Code reduced from 62 lines to 34 lines (46% reduction)
466
- - SSoT: [`docs/PHASE3_SQL_GAP_DETECTION_PLAN.yaml`](docs/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)
455
+ - SSoT: [`docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml`](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)
467
456
 
468
457
  **Release Notes**: See [`CHANGELOG.md`](CHANGELOG.md) for complete v0.5.0 details
469
458
 
@@ -406,7 +406,7 @@ Data is sourced from Exness's public tick data repository:
406
406
  - Vectorized approach: 2.69s (302K bars, 10 exchanges)
407
407
  - Combined Phase 1+2: ~16x total speedup (8.05s → 0.50s)
408
408
  - Implementation: Pre-compute trading minutes, vectorized `.isin()` lookup
409
- - SSoT: [`docs/PHASE2_SESSION_VECTORIZATION_PLAN.yaml`](docs/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)
409
+ - SSoT: [`docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml`](docs/phases/PHASE2_SESSION_VECTORIZATION_PLAN.yaml)
410
410
  - Validation: [`docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md`](docs/validation/SPIKE_TEST_RESULTS_PHASE2_2025-10-18.md)
411
411
 
412
412
  **SQL Gap Detection** - Complete coverage with 46% code reduction:
@@ -414,7 +414,7 @@ Data is sourced from Exness's public tick data repository:
414
414
  - Bug fix: Python approach missed internal gaps (41 detected vs 42 actual)
415
415
  - SQL EXCEPT operator detects ALL gaps (before + within + after existing data)
416
416
  - Code reduced from 62 lines to 34 lines (46% reduction)
417
- - SSoT: [`docs/PHASE3_SQL_GAP_DETECTION_PLAN.yaml`](docs/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)
417
+ - SSoT: [`docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml`](docs/phases/PHASE3_SQL_GAP_DETECTION_PLAN.yaml)
418
418
 
419
419
  **Release Notes**: See [`CHANGELOG.md`](CHANGELOG.md) for complete v0.5.0 details
420
420
 
@@ -55,11 +55,6 @@
55
55
 
56
56
  ### Implementation Architecture v1.7.0
57
57
 
58
- **Refactoring Plans**:
59
-
60
- - [`plans/PHASE7_v1.6.0_REFACTORING_PROGRESS.md`](plans/PHASE7_v1.6.0_REFACTORING_PROGRESS.md) - Complete refactoring progress
61
- - [`plans/REFACTORING_CHECKLIST.md`](plans/REFACTORING_CHECKLIST.md) - Quick reference checklist
62
-
63
58
  **Pattern**: Facade with 7 specialized modules
64
59
 
65
60
  **Key Modules**:
@@ -261,5 +256,11 @@ curl -s "https://ticks.ex2archive.com/ticks/" | jq -r '.[] | .name' | grep -i "E
261
256
 
262
257
  ---
263
258
 
264
- **Last Updated**: 2025-10-18
259
+ ## Archived Documentation
260
+
261
+ Historical planning, research, and completed phase documents are archived in [`archive/`](archive/).
262
+
263
+ ---
264
+
265
+ **Last Updated**: 2025-12-09
265
266
  **Maintainer**: Terry Li <terry@eonlabs.com>
@@ -0,0 +1,150 @@
1
+ ---
2
+ status: accepted
3
+ date: 2025-12-09
4
+ decision-maker: Terry Li
5
+ consulted:
6
+ [Code-Pruning-Agent, Dependency-Pruning-Agent, Documentation-Pruning-Agent]
7
+ research-method: multi-agent
8
+ clarification-iterations: 1
9
+ perspectives: [Maintainability, Technical-Debt, Developer-Experience]
10
+ ---
11
+
12
+ # Codebase Pruning: Dependencies, Documentation, and Code Cleanup
13
+
14
+ **Design Spec**: [Implementation Spec](/docs/design/2025-12-09-codebase-pruning/spec.md)
15
+
16
+ ## Context and Problem Statement
17
+
18
+ After the ClickHouse migration (v0.8.0), the codebase has accumulated:
19
+
20
+ 1. **Unused dependencies**: httpx (never imported), polars (abandoned experiment), pyarrow (research-only)
21
+ 2. **Orphaned documentation**: 18 planning documents from completed Oct 2025 phases
22
+ 3. **Code duplication**: 60+ lines of repeated client lifecycle code across ClickHouse modules
23
+ 4. **Deprecated API layer**: 304-line api.py marked for removal
24
+
25
+ This technical debt increases install size by 80+ MB, confuses navigation, and violates DRY principles.
26
+
27
+ ## Decision Drivers
28
+
29
+ - **Install size**: 200 MB → 120 MB (40% reduction)
30
+ - **Codebase clarity**: Remove orphaned files that confuse AI assistants
31
+ - **DRY compliance**: Eliminate duplicate ClickHouse client lifecycle code
32
+ - **Breaking change acceptance**: User approved api.py removal
33
+
34
+ ## Considered Options
35
+
36
+ 1. **Quick wins only**: Dependencies + documentation archival
37
+ 2. **Quick wins + code refactoring**: Above + ClickHouseClientMixin
38
+ 3. **Full pruning** (SELECTED): All above + remove deprecated api.py
39
+
40
+ ## Decision Outcome
41
+
42
+ **Chosen option**: Full pruning including api.py removal
43
+
44
+ ### Consequences
45
+
46
+ **Good**:
47
+
48
+ - 80+ MB smaller install size
49
+ - 400+ lines of code removed
50
+ - Cleaner documentation structure
51
+ - DRY-compliant ClickHouse modules
52
+
53
+ **Bad**:
54
+
55
+ - api.py removal is breaking change for any external consumers
56
+ - Research scripts in docs/research/ will need manual pyarrow install
57
+
58
+ ## Architecture
59
+
60
+ ### Before/After Diagram
61
+
62
+ <!-- graph-easy source:
63
+ [ pyproject.toml ] -- httpx (unused) --> [ 1 MB waste ]
64
+
65
+ [ pyproject.toml ] -- polars (unused) --> [ 50 MB waste ]
66
+ [ pyproject.toml ] -- pyarrow (research) --> [ 30 MB waste ]
67
+ [ docs/plans/ ] -- 15 orphaned files --> [ 7,405 lines ]
68
+ [ clickhouse_*.py (4) ] -- duplicate lifecycle --> [ 60 lines ]
69
+ [ api.py ] -- deprecated --> [ 304 lines ]
70
+ -->
71
+
72
+ ```
73
+ +------------------+ httpx (unused) +-------------+
74
+ | pyproject.toml | ----------------------> | 1 MB waste |
75
+ +------------------+ +-------------+
76
+ |
77
+ | polars (unused) +-------------+
78
+ +-------------------------------> | 50 MB waste |
79
+ | +-------------+
80
+ |
81
+ | pyarrow (research) +-------------+
82
+ +-------------------------------> | 30 MB waste |
83
+ +-------------+
84
+
85
+ +------------------+ 15 orphaned files +-------------+
86
+ | docs/plans/ | ----------------------> | 7,405 lines |
87
+ +------------------+ +-------------+
88
+
89
+ +------------------+ duplicate lifecycle +-------------+
90
+ |clickhouse_*.py(4)| ----------------------> | 60 lines |
91
+ +------------------+ +-------------+
92
+
93
+ +------------------+ deprecated +-------------+
94
+ | api.py | ----------------------> | 304 lines |
95
+ +------------------+ +-------------+
96
+ ```
97
+
98
+ ### After Pruning
99
+
100
+ <!-- graph-easy source:
101
+ [ pyproject.toml ] -- clean deps --> [ 120 MB install ]
102
+
103
+ [ docs/archive/ ] -- preserved --> [ Historical context ]
104
+ [ clickhouse_base.py ] -- mixin --> [ DRY code ]
105
+ [ api.py ] -- removed --> [ Breaking change logged ]
106
+ -->
107
+
108
+ ```
109
+ +------------------+ clean deps +----------------+
110
+ | pyproject.toml | ----------------------> | 120 MB install |
111
+ +------------------+ +----------------+
112
+
113
+ +------------------+ preserved +------------------+
114
+ | docs/archive/ | ----------------------> | Historical ctxt |
115
+ +------------------+ +------------------+
116
+
117
+ +--------------------+ mixin +----------+
118
+ | clickhouse_base.py | --------------------> | DRY code |
119
+ +--------------------+ +----------+
120
+
121
+ +------------------+ removed +-------------------+
122
+ | api.py | ----------------------> | Breaking chg log |
123
+ +------------------+ +-------------------+
124
+ ```
125
+
126
+ ## Implementation Details
127
+
128
+ ### Phase A: Dependency Cleanup
129
+
130
+ - Remove: httpx, pyarrow, polars
131
+ - Move: tqdm to `[project.optional-dependencies] examples`
132
+ - Consolidate: dev dependencies to `[dependency-groups]`
133
+
134
+ ### Phase B: Documentation Cleanup
135
+
136
+ - Update .gitignore: node_modules/, .lychee\*, .token-info.md
137
+ - Archive: 18 planning documents to docs/archive/
138
+ - Update: docs/README.md
139
+
140
+ ### Phase C: Code Cleanup
141
+
142
+ - Create: `clickhouse_base.py` with `ClickHouseClientMixin`
143
+ - Refactor: 4 ClickHouse modules to use mixin
144
+ - Delete: `api.py` (304 lines)
145
+ - Update: `__init__.py` exports
146
+
147
+ ## More Information
148
+
149
+ - Related: [ClickHouse Migration ADR](/docs/adr/2025-12-09-exness-clickhouse-migration.md)
150
+ - Source Plan: `~/.claude/plans/lively-splashing-steele.md`
@@ -0,0 +1,196 @@
1
+ ---
2
+ status: accepted
3
+ date: 2025-12-09
4
+ decision-maker: Terry Li
5
+ consulted:
6
+ [
7
+ ZSTD-vs-LZ4-Codec-Agent,
8
+ Delta-Gorilla-Corruption-Agent,
9
+ Dictionary-vs-JOIN-Agent,
10
+ AI-Schema-Documentation-Agent,
11
+ ClickHouse-Architect-Skill-Agent,
12
+ ]
13
+ research-method: 9-agent-parallel-dctl
14
+ clarification-iterations: 4
15
+ perspectives:
16
+ [Performance, Simplicity, AICodeGeneration, DataModeling, FutureScalability]
17
+ ---
18
+
19
+ # ADR: Exness Data Preprocess DuckDB to ClickHouse Migration
20
+
21
+ **Design Spec**: [Implementation Spec](/docs/design/2025-12-09-exness-clickhouse-migration/spec.md)
22
+
23
+ ## Context and Problem Statement
24
+
25
+ The exness-data-preprocess project currently uses embedded DuckDB for storing forex tick data and OHLC bars. While DuckDB works well for single-file analytics, the project needs to migrate to ClickHouse to:
26
+
27
+ 1. **Unify infrastructure** with other ClickHouse-based projects (deribit data, MLflow tracking)
28
+ 2. **Support future scale** (100+ instruments, multi-terabyte datasets)
29
+ 3. **Enable real-time dashboards** with sub-second query latency
30
+ 4. **Leverage ClickHouse-native features** (ReplacingMergeTree, parameterized views, compression codecs)
31
+
32
+ The migration must preserve all existing functionality while adopting ClickHouse-native patterns validated through independent research.
33
+
34
+ ### Before/After
35
+
36
+ ```
37
+ ┌────────────┐ ┌────────────┐
38
+ │ DuckDB │ migrate │ ClickHouse │
39
+ │ (embedded) │ ─────────> │ (local) │
40
+ └────────────┘ └────────────┘
41
+ ```
42
+
43
+ <details>
44
+ <summary>graph-easy source</summary>
45
+
46
+ ```
47
+ graph { flow: east; }
48
+ [duckdb] { label: "DuckDB\n(embedded)"; }
49
+ [clickhouse] { label: "ClickHouse\n(local)"; }
50
+ [duckdb] -- migrate --> [clickhouse]
51
+ ```
52
+
53
+ </details>
54
+
55
+ ## Research Summary
56
+
57
+ Five independent research agents validated the ClickHouse Architect skill's recommendations:
58
+
59
+ | Agent Perspective | Key Finding | Confidence |
60
+ | -------------------------- | --------------------------------------------------------------------------------- | ---------- |
61
+ | ZSTD-vs-LZ4-Codec | DoubleDelta + LZ4 is 1.76x faster for timestamps; ZSTD provides no benefit | High |
62
+ | Delta-Gorilla-Corruption | Bug fixed in v23.2 (PR #45615); combination is redundant, not dangerous | High |
63
+ | Dictionary-vs-JOIN | Dictionaries only benefit >364 rows; standard tables + JOINs better for <100 rows | High |
64
+ | AI-Schema-Documentation | COMMENT statements provide 20-27% AI accuracy improvement (AtScale 2025 study) | High |
65
+ | ClickHouse-Architect-Skill | Skill already updated with PR #45615 fix documentation | Medium |
66
+
67
+ ## Decision Log
68
+
69
+ | Decision Area | Options Evaluated | Chosen | Rationale |
70
+ | -------------------- | ----------------------------- | ------------------- | ------------------------------------------------------------------------------- |
71
+ | Timestamp codec | ZSTD, LZ4 | LZ4 | 1.76x faster decompression; ZSTD provides no additional benefit for DoubleDelta |
72
+ | Lookup tables | Dictionaries, Standard tables | Standard tables | <364 rows threshold; v24.4 optimizer handles small JOINs efficiently |
73
+ | Float codec | LZ4, ZSTD | ZSTD | ZSTD(1) optimal for Gorilla-encoded floats |
74
+ | Schema documentation | None, Comments | COMMENT statements | 20-27% AI accuracy improvement |
75
+ | Data access pattern | Repository, Views | Parameterized Views | ClickHouse-native OLAP pattern |
76
+
77
+ ### Trade-offs Accepted
78
+
79
+ | Trade-off | Choice | Accepted Cost |
80
+ | --------------------------- | --------------------------------- | ----------------------------------------------------------- |
81
+ | Simplicity vs Complexity | Standard tables over Dictionaries | Marginally slower JOINs (unmeasurable for 10-20 rows) |
82
+ | LZ4 vs ZSTD for timestamps | LZ4 | Slightly worse compression ratio (unnoticeable in practice) |
83
+ | Full rewrite vs incremental | Full rewrite in 3 batches | Higher initial effort, cleaner final architecture |
84
+
85
+ ## Decision Drivers
86
+
87
+ - **Research validation**: All recommendations independently verified before adoption
88
+ - **ClickHouse v25.11.2 compatibility**: Ensure patterns work with installed version
89
+ - **AI code generation**: Schema must be understandable by AI coding agents
90
+ - **Operational simplicity**: Standard SQL patterns over specialized ClickHouse features where equivalent
91
+ - **Future scalability**: Design for 100+ instruments even if starting with 2
92
+
93
+ ## Considered Options
94
+
95
+ - **Option A**: Direct port (keep DuckDB patterns, just change connection)
96
+ - **Option B**: ClickHouse Architect skill recommendations (Dictionaries, ZSTD everywhere)
97
+ - **Option C**: Research-validated hybrid (standard tables, LZ4 for timestamps, ZSTD for floats) <- Selected
98
+
99
+ ## Decision Outcome
100
+
101
+ Chosen option: **Option C (Research-validated hybrid)**, because independent agent research proved that:
102
+
103
+ 1. **Dictionaries are overkill** for <364 row lookup tables
104
+ 2. **DoubleDelta + LZ4** outperforms DoubleDelta + ZSTD by 1.76x
105
+ 3. **COMMENT statements** provide measurable AI accuracy improvements
106
+ 4. The Delta+Gorilla corruption warning is **outdated** (fixed 3 years ago)
107
+
108
+ ## Synthesis
109
+
110
+ **Convergent findings**: All agents agreed on:
111
+
112
+ - ReplacingMergeTree for deduplication
113
+ - LowCardinality(String) for instrument column
114
+ - PARTITION BY toYYYYMM() for monthly partitions
115
+ - Never use FINAL (100x slower)
116
+
117
+ **Divergent findings**: ClickHouse Architect skill vs independent research:
118
+
119
+ - Skill recommended Dictionaries; research showed they're overkill for small tables
120
+ - Skill recommended ZSTD everywhere; research showed LZ4 better for DoubleDelta
121
+ - Skill had outdated corruption warning; research confirmed it's fixed in v23.2+
122
+
123
+ **Resolution**: User selected research-validated recommendations over skill defaults where they diverged.
124
+
125
+ ## Consequences
126
+
127
+ ### Positive
128
+
129
+ - Unified infrastructure with other ClickHouse projects
130
+ - 70% storage reduction with LowCardinality instrument column
131
+ - 15-50x compression with optimized codec selection
132
+ - AI-friendly schema with comprehensive COMMENT statements
133
+ - Simpler architecture without unnecessary Dictionaries
134
+
135
+ ### Negative
136
+
137
+ - Full rewrite required (7 modules)
138
+ - Testing overhead (validate each batch)
139
+ - Documentation updates needed
140
+ - Temporary loss of backward compatibility during migration
141
+
142
+ ## Architecture
143
+
144
+ ```
145
+ ┌──────────────────────────────┐
146
+ │ Application Code │
147
+ └──────────────────────────────┘
148
+ │
149
+ │
150
+ ∨
151
+ ┌──────────────────────────────────────┐ ┌──────────────────────────────┐ ┌────────────────────────────────────┐
152
+ │ raw_spread_ticks(ReplacingMergeTree) │ <────── │ Parameterized Views │ ──────> │ standard_ticks(ReplacingMergeTree) │
153
+ └──────────────────────────────────────┘ └──────────────────────────────┘ └────────────────────────────────────┘
154
+ │
155
+ │
156
+ ∨
157
+ ┌──────────────────────────────────────┐ JOIN ┌──────────────────────────────┐
158
+ │ holidays(MergeTree) │ <────── │ ohlc_1m(ReplacingMergeTree) │
159
+ └──────────────────────────────────────┘ └──────────────────────────────┘
160
+ │
161
+ │ JOIN
162
+ ∨
163
+ ┌──────────────────────────────┐
164
+ │ exchange_sessions(MergeTree) │
165
+ └──────────────────────────────┘
166
+ ```
167
+
168
+ <details>
169
+ <summary>graph-easy source</summary>
170
+
171
+ ```
172
+ graph { flow: south; }
173
+ [ Application Code ]
174
+ [ Parameterized Views ]
175
+ [ raw_spread_ticks ] { label: "raw_spread_ticks(ReplacingMergeTree)"; }
176
+ [ standard_ticks ] { label: "standard_ticks(ReplacingMergeTree)"; }
177
+ [ ohlc_1m ] { label: "ohlc_1m(ReplacingMergeTree)"; }
178
+ [ exchange_sessions ] { label: "exchange_sessions(MergeTree)"; }
179
+ [ holidays ] { label: "holidays(MergeTree)"; }
180
+
181
+ [ Application Code ] -> [ Parameterized Views ]
182
+ [ Parameterized Views ] -> [ raw_spread_ticks ]
183
+ [ Parameterized Views ] -> [ standard_ticks ]
184
+ [ Parameterized Views ] -> [ ohlc_1m ]
185
+ [ ohlc_1m ] -- JOIN --> [ exchange_sessions ]
186
+ [ ohlc_1m ] -- JOIN --> [ holidays ]
187
+ ```
188
+
189
+ </details>
190
+
191
+ ## References
192
+
193
+ - [Migration Plan](/docs/design/2025-12-09-exness-clickhouse-migration/spec.md)
194
+ - [ClickHouse Architect Skill](/Users/terryli/.claude/plugins/marketplaces/cc-skills/plugins/quality-tools/skills/clickhouse-architect/SKILL.md)
195
+ - [PR #45615: Delta+Gorilla fix](https://github.com/ClickHouse/ClickHouse/pull/45615)
196
+ - [PR #45652: Safety guardrail](https://github.com/ClickHouse/ClickHouse/pull/45652)