From 3d91cb0e8f2c34382a2e5312969a2183cb5afd8a Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Sat, 18 Oct 2025 16:46:23 +0300 Subject: [PATCH] rename fix and build fixes --- .vscode/launch.json | 60 +++++------------- ANNOTATE/README.md | 8 +-- ANNOTATE/core/__init__.py | 2 +- ANNOTATE/core/annotation_manager.py | 2 +- ANNOTATE/core/training_simulator.py | 2 +- ANNOTATE/data/trading_system.db | Bin 0 -> 45056 bytes ANNOTATE/web/app.py | 95 ++++++++++++++++++++++------ 7 files changed, 100 insertions(+), 69 deletions(-) create mode 100644 ANNOTATE/data/trading_system.db diff --git a/.vscode/launch.json b/.vscode/launch.json index 27b00aa..9edddf6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,7 +1,6 @@ { "version": "0.2.0", "configurations": [ -<<<<<<< HEAD { "name": "๐Ÿ“Š Dashboard (Real-time + Training)", "type": "python", @@ -20,15 +19,10 @@ }, "preLaunchTask": "Kill Stale Processes" }, - -======= - ->>>>>>> d49a473ed6f4aef55bfdd47d6370e53582be6b7b { "name": "๐Ÿ”ฌ Backtest Training (30 days)", "type": "python", "request": "launch", -<<<<<<< HEAD "program": "main_backtest.py", "args": [ "--start", @@ -57,14 +51,10 @@ "--symbol", "ETH/USDT" ], -======= - "program": "run_clean_dashboard.py", ->>>>>>> d49a473ed6f4aef55bfdd47d6370e53582be6b7b "console": "integratedTerminal", "justMyCode": false, "env": { "PYTHONUNBUFFERED": "1", -<<<<<<< HEAD "CUDA_VISIBLE_DEVICES": "0" } }, @@ -89,12 +79,6 @@ "PYTHONUNBUFFERED": "1" } }, -======= - "ENABLE_REALTIME_CHARTS": "1" - } - }, - ->>>>>>> d49a473ed6f4aef55bfdd47d6370e53582be6b7b { "name": "๐Ÿ—๏ธ Python Debugger: Current File", "type": "debugpy", @@ -106,6 +90,21 @@ "PYTHONUNBUFFERED": "1" } }, + { + "name": "๐Ÿ“ ANNOTATE Manual Trade Annotation UI", + "type": "python", + "request": "launch", + "program": "ANNOTATE/web/app.py", + "console": "integratedTerminal", + "justMyCode": false, + "env": { + "PYTHONUNBUFFERED": "1", + "FLASK_ENV": "development", + "FLASK_DEBUG": "1" + }, + "cwd": "${workspaceFolder}", + "preLaunchTask": "Kill Stale Processes" + }, { "name": "๐Ÿ“ˆ COB Data Provider Dashboard", "type": "python", @@ -120,7 +119,6 @@ }, "preLaunchTask": "Kill Stale Processes" }, -<<<<<<< HEAD { "name": "๐Ÿ”ฅ Real-time RL COB Trader", "type": "python", @@ -153,9 +151,6 @@ }, "preLaunchTask": "Kill Stale Processes" }, -======= - ->>>>>>> d49a473ed6f4aef55bfdd47d6370e53582be6b7b { "name": "๐Ÿงช Run Tests", "type": "python", @@ -204,11 +199,6 @@ "order": 3 } } -<<<<<<< HEAD -======= - - ->>>>>>> d49a473ed6f4aef55bfdd47d6370e53582be6b7b ], "compounds": [ { @@ -225,36 +215,22 @@ } }, { -<<<<<<< HEAD "name": "๐Ÿ”ฅ COB Trading System", "configurations": [ "๐Ÿ“ˆ COB Data Provider Dashboard", "๐Ÿ”ฅ Real-time RL COB Trader" -======= - "name": "๐Ÿ’น Live Trading System (Dashboard + Monitor)", - "configurations": [ - "๐Ÿ’น Live Scalping Dashboard (500x Leverage)", - "๐ŸŒ™ Overnight Training Monitor (504M Model)" ->>>>>>> d49a473ed6f4aef55bfdd47d6370e53582be6b7b ], "stopAll": true, "presentation": { "hidden": false, -<<<<<<< HEAD "group": "COB", "order": 2 } - } -======= - "group": "Trading", - "order": 2 - } }, - { "name": "๐ŸŒ COBY Multi-Exchange System (Full Stack)", "configurations": [ - "๐ŸŒ COBY Multi-Exchange Data Aggregation" + "๐Ÿ”ง COBY Development Mode (Auto-reload) - main" ], "stopAll": true, "presentation": { @@ -266,7 +242,7 @@ { "name": "๐Ÿ”ง COBY Development Environment", "configurations": [ - "๐Ÿ”ง COBY Development Mode (Auto-reload)" + "๐Ÿ”ง COBY Development Mode (Auto-reload) - main" ], "stopAll": true, "presentation": { @@ -275,7 +251,5 @@ "order": 7 } } - ->>>>>>> d49a473ed6f4aef55bfdd47d6370e53582be6b7b ] } \ No newline at end of file diff --git a/ANNOTATE/README.md b/ANNOTATE/README.md index 28f463d..bcc2bde 100644 --- a/ANNOTATE/README.md +++ b/ANNOTATE/README.md @@ -44,12 +44,12 @@ ANNOTATE/ pip install dash plotly pandas numpy # Run the application -python TESTCASES/web/app.py +python ANNOTATE/web/app.py ``` ## Usage -1. **Start the application**: Run `python TESTCASES/web/app.py` +1. **Start the application**: Run `python ANNOTATE/web/app.py` 2. **Open browser**: Navigate to `http://localhost:8051` 3. **Select symbol and timeframe**: Choose trading pair and timeframes to display 4. **Navigate to time period**: Use date picker or scroll to find market conditions @@ -74,10 +74,10 @@ This sub-project is designed to be self-contained but can be integrated with the ```python # Import annotation manager in main system -from TESTCASES.core.annotation_manager import AnnotationManager +from ANNOTATE.core.annotation_manager import AnnotationManager # Import training simulator -from TESTCASES.core.training_simulator import TrainingSimulator +from ANNOTATE.core.training_simulator import TrainingSimulator # Use generated test cases in training test_cases = annotation_manager.get_test_cases() diff --git a/ANNOTATE/core/__init__.py b/ANNOTATE/core/__init__.py index f0daa1e..f4e8d36 100644 --- a/ANNOTATE/core/__init__.py +++ b/ANNOTATE/core/__init__.py @@ -1,5 +1,5 @@ """ -TESTCASES Core Module +ANNOTATE Core Module Core business logic for the Manual Trade Annotation UI """ diff --git a/ANNOTATE/core/annotation_manager.py b/ANNOTATE/core/annotation_manager.py index 10193ea..fc30013 100644 --- a/ANNOTATE/core/annotation_manager.py +++ b/ANNOTATE/core/annotation_manager.py @@ -39,7 +39,7 @@ class TradeAnnotation: class AnnotationManager: """Manages trade annotations and test case generation""" - def __init__(self, storage_path: str = "TESTCASES/data/annotations"): + def __init__(self, storage_path: str = "ANNOTATE/data/annotations"): """Initialize annotation manager""" self.storage_path = Path(storage_path) self.storage_path.mkdir(parents=True, exist_ok=True) diff --git a/ANNOTATE/core/training_simulator.py b/ANNOTATE/core/training_simulator.py index cf26372..39b63f0 100644 --- a/ANNOTATE/core/training_simulator.py +++ b/ANNOTATE/core/training_simulator.py @@ -54,7 +54,7 @@ class TrainingSimulator: self.training_sessions = {} # Storage for training results - self.results_dir = Path("TESTCASES/data/training_results") + self.results_dir = Path("ANNOTATE/data/training_results") self.results_dir.mkdir(parents=True, exist_ok=True) logger.info("TrainingSimulator initialized") diff --git a/ANNOTATE/data/trading_system.db b/ANNOTATE/data/trading_system.db new file mode 100644 index 0000000000000000000000000000000000000000..80fef86b89d9a3f3ed8a93577ca72f90a65c067b GIT binary patch literal 45056 zcmeI&?Qh#e9Ki8pYm+AJq#=az4(=U^)~#$6ns|Xkx_MI|O}act?JLW1F0EN&XSOpn zyg;f1NFe?cUh#&v{Arw>$Hq=@VXvaErL^(G-T6NE``y`Un{TR?FGbIB2Zk?>Qx8+= zbm|)+QmIr{efHI7wgvk;vmNz2z4U$E*KF#^kLM2#da3-*U#Ww?5A59c2cKpB%zd8u zboYA*nxM%VC- z{TB_b+|op)_EI|+v86=4CSpn!EpJ+F={lD!e7Uaafzy@!nDY5eEr*5HH5{JQZDSxy z!#&mVQTiq~@3dw2q$_Px>fU(Jar%pWSDKF7^>UGR7ne+m1nn-4O^X#L=SnvpWwV9X zs>!cnnw;F3Zw;j98-rn_lD!RWuau3yiAC2B#k`r)PwsBEaCDUZ^<&@Y^yTEDp>)F~ zOi@G*WTyAgDxXv}5jic2c@eW&T@@xR?X}hrXN}5fxp5)B(=J50-Ktk=s>V~T);f$W zxwvi7(#~6=R#%^PwHkl5ic6W~I^Xe)zCLti*HYo_*xvm1UTUw(?P^PW5#NA{12wAt ze<^C1=Eyb7u~2DK74vqUtZB)3f2o^}-LtwuNZz5)&~;4dd6s>t2ji>{yo7~KS1P`) zt{z=N>e(&6Xg3;aeDqf3RBN`%r)Tjr?ONqcTPrRG>`(;5QHl&}shr6a+DGYBm(va zgy~=6c!8KCnkQHL<6*McpUp8zs$QB3bT#q2mg%h&6XNk>@olqSi;QzH5BRQO*+D4I zR*gvM&EUA4IH1q=Myy-eZJqx40X0n;?{0tg_000IagfB*srAb + + ANNOTATE - Manual Trade Annotation UI + + + +
+

๐Ÿ“ ANNOTATE - Manual Trade Annotation UI

+
+

System Status

+

โœ… Annotation Manager: Active

+

โš ๏ธ Data Provider: {'Available' if self.data_provider else 'Not Available (Standalone Mode)'}

+

โš ๏ธ Trading Orchestrator: {'Available' if self.orchestrator else 'Not Available (Standalone Mode)'}

+
+
+
+

Available Features

+
    +
  • Manual trade annotation
  • +
  • Test case generation
  • +
  • Annotation export
  • +
  • Training simulation
  • +
+
+
+

API Endpoints

+
    +
  • POST /api/chart-data - Get chart data
  • +
  • POST /api/save-annotation - Save annotation
  • +
  • POST /api/delete-annotation - Delete annotation
  • +
  • POST /api/generate-test-case - Generate test case
  • +
  • POST /api/export-annotations - Export annotations
  • +
+
+
+ +
+ + + """ @self.server.route('/api/chart-data', methods=['POST']) def get_chart_data():