mcli-framework 7.2.0__py3-none-any.whl → 7.3.1__py3-none-any.whl

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.

Potentially problematic release.


This version of mcli-framework might be problematic. Click here for more details.

Files changed (85) hide show
  1. mcli/__init__.py +160 -0
  2. mcli/__main__.py +14 -0
  3. mcli/app/__init__.py +23 -0
  4. mcli/app/model/__init__.py +0 -0
  5. mcli/app/video/__init__.py +5 -0
  6. mcli/chat/__init__.py +34 -0
  7. mcli/lib/__init__.py +0 -0
  8. mcli/lib/api/__init__.py +0 -0
  9. mcli/lib/auth/__init__.py +1 -0
  10. mcli/lib/config/__init__.py +1 -0
  11. mcli/lib/erd/__init__.py +25 -0
  12. mcli/lib/files/__init__.py +0 -0
  13. mcli/lib/fs/__init__.py +1 -0
  14. mcli/lib/logger/__init__.py +3 -0
  15. mcli/lib/performance/__init__.py +17 -0
  16. mcli/lib/pickles/__init__.py +1 -0
  17. mcli/lib/shell/__init__.py +0 -0
  18. mcli/lib/toml/__init__.py +1 -0
  19. mcli/lib/watcher/__init__.py +0 -0
  20. mcli/ml/__init__.py +16 -0
  21. mcli/ml/api/__init__.py +30 -0
  22. mcli/ml/api/routers/__init__.py +27 -0
  23. mcli/ml/api/schemas.py +2 -2
  24. mcli/ml/auth/__init__.py +45 -0
  25. mcli/ml/auth/models.py +2 -2
  26. mcli/ml/backtesting/__init__.py +39 -0
  27. mcli/ml/cli/__init__.py +5 -0
  28. mcli/ml/cli/main.py +1 -1
  29. mcli/ml/config/__init__.py +33 -0
  30. mcli/ml/configs/__init__.py +16 -0
  31. mcli/ml/dashboard/__init__.py +12 -0
  32. mcli/ml/dashboard/app_integrated.py +23 -6
  33. mcli/ml/dashboard/components/__init__.py +7 -0
  34. mcli/ml/dashboard/pages/__init__.py +6 -0
  35. mcli/ml/dashboard/pages/predictions_enhanced.py +20 -6
  36. mcli/ml/dashboard/pages/test_portfolio.py +373 -0
  37. mcli/ml/dashboard/pages/trading.py +714 -0
  38. mcli/ml/dashboard/utils.py +154 -0
  39. mcli/ml/data_ingestion/__init__.py +39 -0
  40. mcli/ml/database/__init__.py +47 -0
  41. mcli/ml/experimentation/__init__.py +29 -0
  42. mcli/ml/features/__init__.py +39 -0
  43. mcli/ml/mlops/__init__.py +33 -0
  44. mcli/ml/models/__init__.py +94 -0
  45. mcli/ml/monitoring/__init__.py +25 -0
  46. mcli/ml/optimization/__init__.py +27 -0
  47. mcli/ml/predictions/__init__.py +5 -0
  48. mcli/ml/preprocessing/__init__.py +28 -0
  49. mcli/ml/scripts/__init__.py +1 -0
  50. mcli/ml/trading/__init__.py +60 -0
  51. mcli/ml/trading/alpaca_client.py +353 -0
  52. mcli/ml/trading/migrations.py +164 -0
  53. mcli/ml/trading/models.py +418 -0
  54. mcli/ml/trading/paper_trading.py +326 -0
  55. mcli/ml/trading/risk_management.py +370 -0
  56. mcli/ml/trading/trading_service.py +480 -0
  57. mcli/ml/training/__init__.py +10 -0
  58. mcli/mygroup/__init__.py +3 -0
  59. mcli/public/__init__.py +1 -0
  60. mcli/public/commands/__init__.py +2 -0
  61. mcli/self/__init__.py +3 -0
  62. mcli/self/self_cmd.py +260 -0
  63. mcli/workflow/__init__.py +0 -0
  64. mcli/workflow/daemon/__init__.py +15 -0
  65. mcli/workflow/daemon/daemon.py +21 -3
  66. mcli/workflow/dashboard/__init__.py +5 -0
  67. mcli/workflow/docker/__init__.py +0 -0
  68. mcli/workflow/file/__init__.py +0 -0
  69. mcli/workflow/gcloud/__init__.py +1 -0
  70. mcli/workflow/git_commit/__init__.py +0 -0
  71. mcli/workflow/interview/__init__.py +0 -0
  72. mcli/workflow/politician_trading/__init__.py +4 -0
  73. mcli/workflow/registry/__init__.py +0 -0
  74. mcli/workflow/repo/__init__.py +0 -0
  75. mcli/workflow/scheduler/__init__.py +25 -0
  76. mcli/workflow/search/__init__.py +0 -0
  77. mcli/workflow/sync/__init__.py +5 -0
  78. mcli/workflow/videos/__init__.py +1 -0
  79. mcli/workflow/wakatime/__init__.py +80 -0
  80. {mcli_framework-7.2.0.dist-info → mcli_framework-7.3.1.dist-info}/METADATA +3 -1
  81. {mcli_framework-7.2.0.dist-info → mcli_framework-7.3.1.dist-info}/RECORD +85 -13
  82. {mcli_framework-7.2.0.dist-info → mcli_framework-7.3.1.dist-info}/WHEEL +0 -0
  83. {mcli_framework-7.2.0.dist-info → mcli_framework-7.3.1.dist-info}/entry_points.txt +0 -0
  84. {mcli_framework-7.2.0.dist-info → mcli_framework-7.3.1.dist-info}/licenses/LICENSE +0 -0
  85. {mcli_framework-7.2.0.dist-info → mcli_framework-7.3.1.dist-info}/top_level.txt +0 -0
mcli/__init__.py ADDED
@@ -0,0 +1,160 @@
1
+ # logger.info("I am in mcli.__init__.py")
2
+ import sys
3
+
4
+ try:
5
+ from mcli.app import main
6
+
7
+ # from mcli.public import *
8
+ # from mcli.private import *
9
+ # Import the complete Click superset decorators
10
+ from mcli.lib.api.mcli_decorators import BOOL # mcli.BOOL - Click BOOL type
11
+ from mcli.lib.api.mcli_decorators import FLOAT # mcli.FLOAT - Click FLOAT type
12
+ from mcli.lib.api.mcli_decorators import INT # mcli.INT - Click INT type
13
+ from mcli.lib.api.mcli_decorators import STRING # mcli.STRING - Click STRING type
14
+ from mcli.lib.api.mcli_decorators import UNPROCESSED # mcli.UNPROCESSED - Click UNPROCESSED
15
+ from mcli.lib.api.mcli_decorators import UUID # mcli.UUID - Click UUID type
16
+ from mcli.lib.api.mcli_decorators import Abort # mcli.Abort - Click Abort
17
+ from mcli.lib.api.mcli_decorators import BadParameter # mcli.BadParameter - Click BadParameter
18
+ from mcli.lib.api.mcli_decorators import Choice # mcli.Choice - Click Choice type
19
+ from mcli.lib.api.mcli_decorators import File # mcli.File - Click File type
20
+ from mcli.lib.api.mcli_decorators import FloatRange # mcli.FloatRange - Click FloatRange type
21
+ from mcli.lib.api.mcli_decorators import IntRange # mcli.IntRange - Click IntRange type
22
+ from mcli.lib.api.mcli_decorators import ParamType # mcli.ParamType - Click ParamType
23
+ from mcli.lib.api.mcli_decorators import Path # mcli.Path - Click Path type
24
+ from mcli.lib.api.mcli_decorators import UsageError # mcli.UsageError - Click UsageError
25
+ from mcli.lib.api.mcli_decorators import api # @mcli.api - Legacy API decorator
26
+ from mcli.lib.api.mcli_decorators import (
27
+ api_command, # @mcli.api_command - Convenience for API endpoints
28
+ )
29
+ from mcli.lib.api.mcli_decorators import argument # @mcli.argument - Click argument decorator
30
+ from mcli.lib.api.mcli_decorators import (
31
+ background, # @mcli.background - Legacy background decorator
32
+ )
33
+ from mcli.lib.api.mcli_decorators import (
34
+ background_command, # @mcli.background_command - Convenience for background
35
+ )
36
+ from mcli.lib.api.mcli_decorators import clear # mcli.clear - Click clear
37
+ from mcli.lib.api.mcli_decorators import (
38
+ cli_with_api, # @mcli.cli_with_api - Legacy combined decorator
39
+ )
40
+ from mcli.lib.api.mcli_decorators import (
41
+ command, # @mcli.command - Complete Click command with API/background
42
+ )
43
+ from mcli.lib.api.mcli_decorators import confirm # mcli.confirm - Click confirmation
44
+ from mcli.lib.api.mcli_decorators import echo # mcli.echo - Click echo function
45
+ from mcli.lib.api.mcli_decorators import edit # mcli.edit - Click editor
46
+ from mcli.lib.api.mcli_decorators import (
47
+ format_filename, # mcli.format_filename - Click filename
48
+ )
49
+ from mcli.lib.api.mcli_decorators import get_app # mcli.get_app - Click app
50
+ from mcli.lib.api.mcli_decorators import get_app_dir # mcli.get_app_dir - Click app directory
51
+ from mcli.lib.api.mcli_decorators import (
52
+ get_binary_stream, # mcli.get_binary_stream - Click binary stream
53
+ )
54
+ from mcli.lib.api.mcli_decorators import (
55
+ get_current_context, # mcli.get_current_context - Click context
56
+ )
57
+ from mcli.lib.api.mcli_decorators import (
58
+ get_network_credentials, # mcli.get_network_credentials - Click network
59
+ )
60
+ from mcli.lib.api.mcli_decorators import get_os_args # mcli.get_os_args - Click OS args
61
+ from mcli.lib.api.mcli_decorators import (
62
+ get_terminal_size, # mcli.get_terminal_size - Click terminal size
63
+ )
64
+ from mcli.lib.api.mcli_decorators import (
65
+ get_text_stream, # mcli.get_text_stream - Click text stream
66
+ )
67
+ from mcli.lib.api.mcli_decorators import getchar # mcli.getchar - Click character input
68
+ from mcli.lib.api.mcli_decorators import (
69
+ group, # @mcli.group - Complete Click group with API support
70
+ )
71
+ from mcli.lib.api.mcli_decorators import launch # mcli.launch - Click launch
72
+ from mcli.lib.api.mcli_decorators import open_file # mcli.open_file - Click file operations
73
+ from mcli.lib.api.mcli_decorators import option # @mcli.option - Click option decorator
74
+ from mcli.lib.api.mcli_decorators import pause # mcli.pause - Click pause
75
+ from mcli.lib.api.mcli_decorators import progressbar # mcli.progressbar - Click progress bar
76
+ from mcli.lib.api.mcli_decorators import prompt # mcli.prompt - Click prompt
77
+ from mcli.lib.api.mcli_decorators import secho # mcli.secho - Click styled echo
78
+ from mcli.lib.api.mcli_decorators import style # mcli.style - Click styling
79
+ from mcli.lib.api.mcli_decorators import unstyle # mcli.unstyle - Click unstyle
80
+ from mcli.lib.api.mcli_decorators import ( # Core decorators (complete Click superset); Click re-exports (complete subsume); Click types (complete subsume); Convenience decorators; Legacy decorators (for backward compatibility); Server management; Configuration; Convenience functions
81
+ disable_api_server,
82
+ enable_api_server,
83
+ get_api_config,
84
+ health_check,
85
+ is_background_available,
86
+ is_server_running,
87
+ start_server,
88
+ status_check,
89
+ stop_server,
90
+ )
91
+
92
+ # Make everything available at the top level (complete Click subsume)
93
+ __all__ = [
94
+ "main",
95
+ # Core decorators (complete Click superset)
96
+ "command",
97
+ "group",
98
+ # Click re-exports (complete subsume)
99
+ "option",
100
+ "argument",
101
+ "echo",
102
+ "get_current_context",
103
+ "get_app",
104
+ "launch",
105
+ "open_file",
106
+ "get_os_args",
107
+ "get_binary_stream",
108
+ "get_text_stream",
109
+ "format_filename",
110
+ "getchar",
111
+ "pause",
112
+ "clear",
113
+ "style",
114
+ "unstyle",
115
+ "secho",
116
+ "edit",
117
+ "confirm",
118
+ "prompt",
119
+ "progressbar",
120
+ "get_terminal_size",
121
+ "get_app_dir",
122
+ "get_network_credentials",
123
+ # Click types (complete subsume)
124
+ "Path",
125
+ "Choice",
126
+ "IntRange",
127
+ "FloatRange",
128
+ "UNPROCESSED",
129
+ "STRING",
130
+ "INT",
131
+ "FLOAT",
132
+ "BOOL",
133
+ "UUID",
134
+ "File",
135
+ "ParamType",
136
+ "BadParameter",
137
+ "UsageError",
138
+ "Abort",
139
+ # Convenience decorators
140
+ "api_command",
141
+ "background_command",
142
+ # Legacy decorators (for backward compatibility)
143
+ "api",
144
+ "background",
145
+ "cli_with_api",
146
+ # Server management
147
+ "start_server",
148
+ "stop_server",
149
+ "is_server_running",
150
+ "is_background_available",
151
+ "get_api_config",
152
+ "enable_api_server",
153
+ "disable_api_server",
154
+ "health_check",
155
+ "status_check",
156
+ ]
157
+
158
+ except ImportError:
159
+ # from .app import main
160
+ sys.exit(1)
mcli/__main__.py ADDED
@@ -0,0 +1,14 @@
1
+ # logger.info("I am in mcli.__init__.py")
2
+
3
+ try:
4
+ from mcli.app.main import main as main_func
5
+
6
+ # from mcli.public import *
7
+ # from mcli.private import *
8
+ except ImportError:
9
+ from .app.main import main as main_func
10
+
11
+ __all__ = ["main_func"]
12
+
13
+ if __name__ == "__main__":
14
+ main_func()
mcli/app/__init__.py ADDED
@@ -0,0 +1,23 @@
1
+ # src/mcli/app/__init__.py
2
+ import importlib
3
+ from pathlib import Path
4
+
5
+ from mcli.lib.logger.logger import get_logger
6
+
7
+ logger = get_logger(__name__)
8
+
9
+ logger.info("Initializing mcli.app package")
10
+
11
+ # Import main function
12
+ try:
13
+ from .main import main
14
+
15
+ logger.info("Successfully imported main from .main")
16
+ except ImportError as e:
17
+ logger.error(f"Failed to import main: {e}")
18
+ import traceback
19
+
20
+ logger.error(f"Traceback: {traceback.format_exc()}")
21
+ raise
22
+
23
+ __all__ = ["main"]
File without changes
@@ -0,0 +1,5 @@
1
+ """
2
+ Video processing commands for mcli.
3
+ """
4
+
5
+ from .video import *
mcli/chat/__init__.py ADDED
@@ -0,0 +1,34 @@
1
+ """
2
+ MCLI Chat System
3
+ Real-time system control and interaction capabilities for MCLI chat
4
+ """
5
+
6
+ from .system_controller import (
7
+ SystemController,
8
+ control_app,
9
+ execute_system_command,
10
+ open_file_or_url,
11
+ open_textedit_and_write,
12
+ system_controller,
13
+ take_screenshot,
14
+ )
15
+ from .system_integration import (
16
+ ChatSystemIntegration,
17
+ chat_system_integration,
18
+ get_system_capabilities,
19
+ handle_system_request,
20
+ )
21
+
22
+ __all__ = [
23
+ "SystemController",
24
+ "system_controller",
25
+ "ChatSystemIntegration",
26
+ "chat_system_integration",
27
+ "handle_system_request",
28
+ "get_system_capabilities",
29
+ "open_textedit_and_write",
30
+ "control_app",
31
+ "execute_system_command",
32
+ "take_screenshot",
33
+ "open_file_or_url",
34
+ ]
mcli/lib/__init__.py ADDED
File without changes
File without changes
@@ -0,0 +1 @@
1
+ from .auth import *
@@ -0,0 +1 @@
1
+ from .config import *
@@ -0,0 +1,25 @@
1
+ """
2
+ Entity Relationship Diagram (ERD) package.
3
+
4
+ This package provides utilities for generating Entity Relationship Diagrams from MCLI type metadata.
5
+ """
6
+
7
+ # Import and export all public functions from erd.py
8
+ from .erd import (
9
+ analyze_graph_for_hierarchical_exports,
10
+ create_merged_erd,
11
+ do_erd,
12
+ find_top_nodes_in_graph,
13
+ generate_erd_for_top_nodes,
14
+ generate_merged_erd_for_types,
15
+ )
16
+
17
+ # Define __all__ to control exports
18
+ __all__ = [
19
+ "do_erd",
20
+ "create_merged_erd",
21
+ "generate_merged_erd_for_types",
22
+ "find_top_nodes_in_graph",
23
+ "generate_erd_for_top_nodes",
24
+ "analyze_graph_for_hierarchical_exports",
25
+ ]
File without changes
@@ -0,0 +1 @@
1
+ from .fs import *
@@ -0,0 +1,3 @@
1
+ from .logger import get_logger
2
+
3
+ __all__ = ["get_logger"]
@@ -0,0 +1,17 @@
1
+ """
2
+ Performance optimization utilities for mcli
3
+ """
4
+
5
+ from .uvloop_config import (
6
+ configure_event_loop_for_performance,
7
+ get_event_loop_info,
8
+ install_uvloop,
9
+ should_use_uvloop,
10
+ )
11
+
12
+ __all__ = [
13
+ "install_uvloop",
14
+ "should_use_uvloop",
15
+ "get_event_loop_info",
16
+ "configure_event_loop_for_performance",
17
+ ]
@@ -0,0 +1 @@
1
+ from .pickles import ObjectCache
File without changes
@@ -0,0 +1 @@
1
+ from .toml import read_from_toml
File without changes
mcli/ml/__init__.py ADDED
@@ -0,0 +1,16 @@
1
+ """MCLI Machine Learning Module for Stock Recommendation System"""
2
+
3
+ from .configs.dvc_config import get_dvc_config, setup_dvc
4
+ from .configs.mlflow_config import get_mlflow_config, setup_mlflow
5
+ from .configs.mlops_manager import MLOpsManager, get_mlops_manager
6
+
7
+ __version__ = "0.1.0"
8
+
9
+ __all__ = [
10
+ "get_mlops_manager",
11
+ "MLOpsManager",
12
+ "get_mlflow_config",
13
+ "setup_mlflow",
14
+ "get_dvc_config",
15
+ "setup_dvc",
16
+ ]
@@ -0,0 +1,30 @@
1
+ """API routes and endpoints for ML system"""
2
+
3
+ from .app import create_app, get_application
4
+ from .routers import (
5
+ admin_router,
6
+ auth_router,
7
+ backtest_router,
8
+ data_router,
9
+ model_router,
10
+ monitoring_router,
11
+ portfolio_router,
12
+ prediction_router,
13
+ trade_router,
14
+ websocket_router,
15
+ )
16
+
17
+ __all__ = [
18
+ "auth_router",
19
+ "model_router",
20
+ "prediction_router",
21
+ "portfolio_router",
22
+ "data_router",
23
+ "trade_router",
24
+ "backtest_router",
25
+ "monitoring_router",
26
+ "admin_router",
27
+ "websocket_router",
28
+ "create_app",
29
+ "get_application",
30
+ ]
@@ -0,0 +1,27 @@
1
+ """API routers"""
2
+
3
+ from . import (
4
+ admin_router,
5
+ auth_router,
6
+ backtest_router,
7
+ data_router,
8
+ model_router,
9
+ monitoring_router,
10
+ portfolio_router,
11
+ prediction_router,
12
+ trade_router,
13
+ websocket_router,
14
+ )
15
+
16
+ __all__ = [
17
+ "auth_router",
18
+ "model_router",
19
+ "prediction_router",
20
+ "portfolio_router",
21
+ "data_router",
22
+ "trade_router",
23
+ "backtest_router",
24
+ "monitoring_router",
25
+ "admin_router",
26
+ "websocket_router",
27
+ ]
mcli/ml/api/schemas.py CHANGED
@@ -32,7 +32,7 @@ class ModelResponse(BaseModel):
32
32
  updated_at: datetime
33
33
 
34
34
  class Config:
35
- orm_mode = True
35
+ from_attributes = True
36
36
 
37
37
 
38
38
  class ModelMetrics(BaseModel):
@@ -69,4 +69,4 @@ class PredictionResponse(BaseModel):
69
69
  model_name: str
70
70
 
71
71
  class Config:
72
- orm_mode = True
72
+ from_attributes = True
@@ -0,0 +1,45 @@
1
+ """Authentication and authorization system"""
2
+
3
+ from .auth_manager import (
4
+ AuthManager,
5
+ create_access_token,
6
+ get_current_active_user,
7
+ get_current_user,
8
+ hash_password,
9
+ require_role,
10
+ verify_access_token,
11
+ verify_password,
12
+ )
13
+ from .models import (
14
+ PasswordChange,
15
+ PasswordReset,
16
+ TokenResponse,
17
+ UserCreate,
18
+ UserLogin,
19
+ UserResponse,
20
+ )
21
+ from .permissions import (
22
+ Permission,
23
+ check_permission,
24
+ has_permission,
25
+ )
26
+
27
+ __all__ = [
28
+ "AuthManager",
29
+ "create_access_token",
30
+ "verify_access_token",
31
+ "get_current_user",
32
+ "get_current_active_user",
33
+ "require_role",
34
+ "hash_password",
35
+ "verify_password",
36
+ "UserCreate",
37
+ "UserLogin",
38
+ "UserResponse",
39
+ "TokenResponse",
40
+ "PasswordReset",
41
+ "PasswordChange",
42
+ "Permission",
43
+ "check_permission",
44
+ "has_permission",
45
+ ]
mcli/ml/auth/models.py CHANGED
@@ -10,7 +10,7 @@ from pydantic import BaseModel, EmailStr, Field, validator
10
10
  class UserCreate(BaseModel):
11
11
  """User registration model"""
12
12
 
13
- username: str = Field(..., min_length=3, max_length=50, regex="^[a-zA-Z0-9_-]+$")
13
+ username: str = Field(..., min_length=3, max_length=50, pattern="^[a-zA-Z0-9_-]+$")
14
14
  email: EmailStr
15
15
  password: str = Field(..., min_length=8, max_length=100)
16
16
  first_name: Optional[str] = Field(None, max_length=50)
@@ -52,7 +52,7 @@ class UserResponse(BaseModel):
52
52
  last_login_at: Optional[datetime]
53
53
 
54
54
  class Config:
55
- orm_mode = True
55
+ from_attributes = True
56
56
 
57
57
 
58
58
  class TokenResponse(BaseModel):
@@ -0,0 +1,39 @@
1
+ """Backtesting framework for trading strategies"""
2
+
3
+ from .backtest_engine import (
4
+ BacktestConfig,
5
+ BacktestEngine,
6
+ BacktestResult,
7
+ PositionManager,
8
+ TradingStrategy,
9
+ )
10
+ from .performance_metrics import (
11
+ PerformanceAnalyzer,
12
+ PortfolioMetrics,
13
+ RiskMetrics,
14
+ plot_performance,
15
+ )
16
+ from .trading_simulator import (
17
+ MarketSimulator,
18
+ Order,
19
+ Portfolio,
20
+ Position,
21
+ TradingSimulator,
22
+ )
23
+
24
+ __all__ = [
25
+ "BacktestEngine",
26
+ "BacktestConfig",
27
+ "BacktestResult",
28
+ "TradingStrategy",
29
+ "PositionManager",
30
+ "PerformanceAnalyzer",
31
+ "PortfolioMetrics",
32
+ "RiskMetrics",
33
+ "plot_performance",
34
+ "TradingSimulator",
35
+ "Order",
36
+ "Position",
37
+ "Portfolio",
38
+ "MarketSimulator",
39
+ ]
@@ -0,0 +1,5 @@
1
+ """CLI interface for ML system"""
2
+
3
+ from .main import app
4
+
5
+ __all__ = ["app"]
mcli/ml/cli/main.py CHANGED
@@ -377,6 +377,7 @@ def config(
377
377
  debug: Optional[bool] = typer.Option(None, "--debug", help="Set debug mode"),
378
378
  ):
379
379
  """Manage system configuration"""
380
+ global settings
380
381
 
381
382
  if show:
382
383
  console.print(f"[bold blue]Current Configuration[/bold blue]")
@@ -399,7 +400,6 @@ def config(
399
400
  raise typer.Exit(1)
400
401
 
401
402
  # Update environment
402
- global settings
403
403
  settings = create_settings(environment)
404
404
  console.print(f"[green]✓ Environment set to: {environment}[/green]")
405
405
 
@@ -0,0 +1,33 @@
1
+ """Configuration management for ML system"""
2
+
3
+ from .settings import (
4
+ APISettings,
5
+ DatabaseSettings,
6
+ DataSettings,
7
+ MLflowSettings,
8
+ ModelSettings,
9
+ MonitoringSettings,
10
+ RedisSettings,
11
+ SecuritySettings,
12
+ Settings,
13
+ create_settings,
14
+ get_settings,
15
+ settings,
16
+ update_settings,
17
+ )
18
+
19
+ __all__ = [
20
+ "Settings",
21
+ "DatabaseSettings",
22
+ "RedisSettings",
23
+ "MLflowSettings",
24
+ "ModelSettings",
25
+ "DataSettings",
26
+ "APISettings",
27
+ "MonitoringSettings",
28
+ "SecuritySettings",
29
+ "settings",
30
+ "get_settings",
31
+ "update_settings",
32
+ "create_settings",
33
+ ]
@@ -0,0 +1,16 @@
1
+ """ML Configuration Module"""
2
+
3
+ from .dvc_config import DVCConfig, get_dvc_config, setup_dvc
4
+ from .mlflow_config import MLflowConfig, get_mlflow_config, setup_mlflow
5
+ from .mlops_manager import MLOpsManager, get_mlops_manager
6
+
7
+ __all__ = [
8
+ "MLflowConfig",
9
+ "get_mlflow_config",
10
+ "setup_mlflow",
11
+ "DVCConfig",
12
+ "get_dvc_config",
13
+ "setup_dvc",
14
+ "MLOpsManager",
15
+ "get_mlops_manager",
16
+ ]
@@ -0,0 +1,12 @@
1
+ """ML Dashboard for real-time monitoring"""
2
+
3
+ from .app import main
4
+ from .cli import app as cli_app
5
+
6
+
7
+ def main():
8
+ """Main entry point for dashboard CLI"""
9
+ cli_app()
10
+
11
+
12
+ __all__ = ["main", "cli_app"]
@@ -47,20 +47,25 @@ except ImportError:
47
47
 
48
48
  # Add new dashboard pages
49
49
  try:
50
- from pages.cicd import show_cicd_dashboard
51
- from pages.workflows import show_workflows_dashboard
52
- from pages.predictions_enhanced import show_predictions_enhanced
53
- from pages.scrapers_and_logs import show_scrapers_and_logs
50
+ from mcli.ml.dashboard.pages.cicd import show_cicd_dashboard
51
+ from mcli.ml.dashboard.pages.workflows import show_workflows_dashboard
52
+ from mcli.ml.dashboard.pages.predictions_enhanced import show_predictions_enhanced
53
+ from mcli.ml.dashboard.pages.scrapers_and_logs import show_scrapers_and_logs
54
+ from mcli.ml.dashboard.pages.trading import show_trading_dashboard
55
+ from mcli.ml.dashboard.pages.test_portfolio import show_test_portfolio
54
56
 
55
57
  HAS_EXTENDED_PAGES = True
56
58
  HAS_SCRAPERS_PAGE = True
57
- except ImportError:
59
+ except ImportError as e:
60
+ print(f"Import error: {e}") # Debug print
58
61
  HAS_EXTENDED_PAGES = False
59
62
  HAS_SCRAPERS_PAGE = False
60
63
  show_cicd_dashboard = None
61
64
  show_workflows_dashboard = None
62
65
  show_predictions_enhanced = None
63
66
  show_scrapers_and_logs = None
67
+ show_trading_dashboard = None
68
+ show_test_portfolio = None
64
69
 
65
70
  # Page config
66
71
  st.set_page_config(
@@ -820,6 +825,8 @@ def main():
820
825
  "Model Performance",
821
826
  "Model Training & Evaluation",
822
827
  "Predictions",
828
+ "Trading Dashboard",
829
+ "Test Portfolio",
823
830
  "LSH Jobs",
824
831
  "System Health",
825
832
  ]
@@ -831,7 +838,7 @@ def main():
831
838
  # Add extended pages if available
832
839
  if HAS_EXTENDED_PAGES:
833
840
  pages.extend(["CI/CD Pipelines", "Workflows"])
834
-
841
+
835
842
  page = st.sidebar.selectbox(
836
843
  "Choose a page",
837
844
  pages,
@@ -880,6 +887,16 @@ def main():
880
887
  show_predictions_enhanced()
881
888
  else:
882
889
  show_predictions()
890
+ elif page == "Trading Dashboard":
891
+ if HAS_EXTENDED_PAGES and show_trading_dashboard:
892
+ show_trading_dashboard()
893
+ else:
894
+ st.warning("Trading dashboard not available")
895
+ elif page == "Test Portfolio":
896
+ if HAS_EXTENDED_PAGES and show_test_portfolio:
897
+ show_test_portfolio()
898
+ else:
899
+ st.warning("Test portfolio not available")
883
900
  elif page == "LSH Jobs":
884
901
  show_lsh_jobs()
885
902
  elif page == "System Health":