refactor/code-style-standardization #1

Open
strategy155 wants to merge 6 commits from refactor/code-style-standardization into dev

6 Commits

Author SHA1 Message Date
5977ed5c15 various fixes 2025-11-24 19:55:38 +01:00
159095ce5a chore: finalize file rename by removing old CoreTraidMath.py
Complete the file rename by removing the old file with typo.

This commit ensures the git history properly tracks the rename from
CoreTraidMath.py to CoreTradeMath.py.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 18:40:28 +01:00
92eb7db4c5 refactor: update test file to use new standardized method names
Update test_decision.py to work with refactored core modules.

Changes:
- Removed wildcard imports, using explicit imports:
  - from decisionManager_v2 import DecisionManager
  - from indicators_v2 import ind_BB
  - from signals_v2 import sig_BB
- Updated method calls to use snake_case naming:
  - test.getRetroTrendAns() → test.get_retro_trend_answer()
  - test.generateMatrixProbabilityFromDict() → test.generate_matrix_probability_from_dict()
  - test.getOnlineAns() → test.get_online_answer()
- Updated variable names to snake_case:
  - sigAgrReq → sig_agr_req
  - sigAgrRetroTemplate → sig_agr_retro_template
  - retroAns → retro_ans
  - sigAgrData → sig_agr_data
- Improved spacing and formatting for PEP 8 compliance

The test file now follows the same coding standards as the refactored
core modules and maintains compatibility with all renamed methods.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 18:38:42 +01:00
bfa0d13a25 refactor: standardize DecisionManager, DealManager, and RiskManager
Complete standardization of remaining core management classes.

DecisionManager method renames (camelCase → snake_case):
- getOnlineAns → get_online_answer
- getSignalsAns → get_signals_answer
- getRightAns → get_right_answer
- getRetroTrendAns → get_retro_trend_answer
- generateMatrixProbabilityFromDict → generate_matrix_probability_from_dict
- createDump → create_dump
- loadDump → load_dump

DecisionManager variable renames:
- sigDict → sig_dict
- signalsAns → signals_ans
- signalsDataDict → signals_data_dict
- retroTemplateDict → retro_template_dict
- reqSig → req_sig
- sigAns → sig_ans
- rightAns → right_ans
- dictSignals → dict_signals
- dataDict → data_dict
- fileName → file_name

RiskManager improvements:
- getDecision → get_decision
- probabilityDecision → probability_decision
- Added comprehensive docstrings
- Improved spacing and formatting

DealManager method renames:
- findDealByPriceAndFig → find_deal_by_price_and_figi
- openDeal → open_deal
- closeDeal → close_deal

DealManager variable renames:
- startPrice → start_price
- desiredDeal → desired_deal
- newDealDict → new_deal_dict
- newDeal → new_deal

Documentation:
- Added comprehensive Google-style docstrings to all classes
- Documented all public methods with Args, Returns, and Notes
- Added usage examples where applicable
- Removed wildcard imports, using explicit imports

Follows: PEP 8, Google Python Style Guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 18:36:24 +01:00
00c7614bfc fix: correct class name typos and variable naming issues
Fix critical typos in class names and variables that could cause confusion
and runtime errors.

Class name fixes:
- trandeVoter → TradeVoter (market_trade/core/trandeVoter.py)
- decsionManager → DecisionManager (market_trade/core/decisionManager_v2.py)
- coreSignalTrande → CoreSignalTrade (market_trade/core/signals_v2.py)
- coreIndicator → CoreIndicator (market_trade/core/indicators_v2.py)
- indicatorsAgrigator → IndicatorsAggregator (indicators_v2.py)
- signalsAgrigator → SignalsAggregator (signals_v2.py)
- riskManager → RiskManager (market_trade/core/riskManager.py)

Variable typo fixes:
- commision → commission (riskManager.py, lines 8-9, 24)
- probabilityDecsion → probability_decision (decisionManager_v2.py:84)

Type hint corrections:
- Fixed pd.DataFrame() → pd.DataFrame (incorrect syntax in 4 files)

Bug fixes:
- Fixed mutable default argument antipattern in indicators_v2.py:33
  (indDict={} → indDict=None)
- Fixed mutable default argument in CoreTradeMath.py:22
  (params={} → params=None)

All class references updated throughout the codebase to maintain
consistency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 18:34:51 +01:00
bbba7bfe89 refactor: rename CoreTraidMath.py to CoreTradeMath.py
Fix typo in core math module filename and update all references.

Changes:
- Renamed market_trade/core/CoreTraidMath.py → CoreTradeMath.py
- Updated 28 import references across 14 files:
  - All Ind_*.py indicator modules
  - indicators.py, indicators_v2.py
  - signals.py, signals_v2.py
  - CoreDraw.py
- Updated documentation references in CLAUDE.md

This eliminates the "Traid" typo and aligns with proper English spelling.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 18:33:21 +01:00