mcli-framework 7.0.0__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 (186) hide show
  1. mcli/app/chat_cmd.py +42 -0
  2. mcli/app/commands_cmd.py +226 -0
  3. mcli/app/completion_cmd.py +216 -0
  4. mcli/app/completion_helpers.py +288 -0
  5. mcli/app/cron_test_cmd.py +697 -0
  6. mcli/app/logs_cmd.py +419 -0
  7. mcli/app/main.py +492 -0
  8. mcli/app/model/model.py +1060 -0
  9. mcli/app/model_cmd.py +227 -0
  10. mcli/app/redis_cmd.py +269 -0
  11. mcli/app/video/video.py +1114 -0
  12. mcli/app/visual_cmd.py +303 -0
  13. mcli/chat/chat.py +2409 -0
  14. mcli/chat/command_rag.py +514 -0
  15. mcli/chat/enhanced_chat.py +652 -0
  16. mcli/chat/system_controller.py +1010 -0
  17. mcli/chat/system_integration.py +1016 -0
  18. mcli/cli.py +25 -0
  19. mcli/config.toml +20 -0
  20. mcli/lib/api/api.py +586 -0
  21. mcli/lib/api/daemon_client.py +203 -0
  22. mcli/lib/api/daemon_client_local.py +44 -0
  23. mcli/lib/api/daemon_decorator.py +217 -0
  24. mcli/lib/api/mcli_decorators.py +1032 -0
  25. mcli/lib/auth/auth.py +85 -0
  26. mcli/lib/auth/aws_manager.py +85 -0
  27. mcli/lib/auth/azure_manager.py +91 -0
  28. mcli/lib/auth/credential_manager.py +192 -0
  29. mcli/lib/auth/gcp_manager.py +93 -0
  30. mcli/lib/auth/key_manager.py +117 -0
  31. mcli/lib/auth/mcli_manager.py +93 -0
  32. mcli/lib/auth/token_manager.py +75 -0
  33. mcli/lib/auth/token_util.py +1011 -0
  34. mcli/lib/config/config.py +47 -0
  35. mcli/lib/discovery/__init__.py +1 -0
  36. mcli/lib/discovery/command_discovery.py +274 -0
  37. mcli/lib/erd/erd.py +1345 -0
  38. mcli/lib/erd/generate_graph.py +453 -0
  39. mcli/lib/files/files.py +76 -0
  40. mcli/lib/fs/fs.py +109 -0
  41. mcli/lib/lib.py +29 -0
  42. mcli/lib/logger/logger.py +611 -0
  43. mcli/lib/performance/optimizer.py +409 -0
  44. mcli/lib/performance/rust_bridge.py +502 -0
  45. mcli/lib/performance/uvloop_config.py +154 -0
  46. mcli/lib/pickles/pickles.py +50 -0
  47. mcli/lib/search/cached_vectorizer.py +479 -0
  48. mcli/lib/services/data_pipeline.py +460 -0
  49. mcli/lib/services/lsh_client.py +441 -0
  50. mcli/lib/services/redis_service.py +387 -0
  51. mcli/lib/shell/shell.py +137 -0
  52. mcli/lib/toml/toml.py +33 -0
  53. mcli/lib/ui/styling.py +47 -0
  54. mcli/lib/ui/visual_effects.py +634 -0
  55. mcli/lib/watcher/watcher.py +185 -0
  56. mcli/ml/api/app.py +215 -0
  57. mcli/ml/api/middleware.py +224 -0
  58. mcli/ml/api/routers/admin_router.py +12 -0
  59. mcli/ml/api/routers/auth_router.py +244 -0
  60. mcli/ml/api/routers/backtest_router.py +12 -0
  61. mcli/ml/api/routers/data_router.py +12 -0
  62. mcli/ml/api/routers/model_router.py +302 -0
  63. mcli/ml/api/routers/monitoring_router.py +12 -0
  64. mcli/ml/api/routers/portfolio_router.py +12 -0
  65. mcli/ml/api/routers/prediction_router.py +267 -0
  66. mcli/ml/api/routers/trade_router.py +12 -0
  67. mcli/ml/api/routers/websocket_router.py +76 -0
  68. mcli/ml/api/schemas.py +64 -0
  69. mcli/ml/auth/auth_manager.py +425 -0
  70. mcli/ml/auth/models.py +154 -0
  71. mcli/ml/auth/permissions.py +302 -0
  72. mcli/ml/backtesting/backtest_engine.py +502 -0
  73. mcli/ml/backtesting/performance_metrics.py +393 -0
  74. mcli/ml/cache.py +400 -0
  75. mcli/ml/cli/main.py +398 -0
  76. mcli/ml/config/settings.py +394 -0
  77. mcli/ml/configs/dvc_config.py +230 -0
  78. mcli/ml/configs/mlflow_config.py +131 -0
  79. mcli/ml/configs/mlops_manager.py +293 -0
  80. mcli/ml/dashboard/app.py +532 -0
  81. mcli/ml/dashboard/app_integrated.py +738 -0
  82. mcli/ml/dashboard/app_supabase.py +560 -0
  83. mcli/ml/dashboard/app_training.py +615 -0
  84. mcli/ml/dashboard/cli.py +51 -0
  85. mcli/ml/data_ingestion/api_connectors.py +501 -0
  86. mcli/ml/data_ingestion/data_pipeline.py +567 -0
  87. mcli/ml/data_ingestion/stream_processor.py +512 -0
  88. mcli/ml/database/migrations/env.py +94 -0
  89. mcli/ml/database/models.py +667 -0
  90. mcli/ml/database/session.py +200 -0
  91. mcli/ml/experimentation/ab_testing.py +845 -0
  92. mcli/ml/features/ensemble_features.py +607 -0
  93. mcli/ml/features/political_features.py +676 -0
  94. mcli/ml/features/recommendation_engine.py +809 -0
  95. mcli/ml/features/stock_features.py +573 -0
  96. mcli/ml/features/test_feature_engineering.py +346 -0
  97. mcli/ml/logging.py +85 -0
  98. mcli/ml/mlops/data_versioning.py +518 -0
  99. mcli/ml/mlops/experiment_tracker.py +377 -0
  100. mcli/ml/mlops/model_serving.py +481 -0
  101. mcli/ml/mlops/pipeline_orchestrator.py +614 -0
  102. mcli/ml/models/base_models.py +324 -0
  103. mcli/ml/models/ensemble_models.py +675 -0
  104. mcli/ml/models/recommendation_models.py +474 -0
  105. mcli/ml/models/test_models.py +487 -0
  106. mcli/ml/monitoring/drift_detection.py +676 -0
  107. mcli/ml/monitoring/metrics.py +45 -0
  108. mcli/ml/optimization/portfolio_optimizer.py +834 -0
  109. mcli/ml/preprocessing/data_cleaners.py +451 -0
  110. mcli/ml/preprocessing/feature_extractors.py +491 -0
  111. mcli/ml/preprocessing/ml_pipeline.py +382 -0
  112. mcli/ml/preprocessing/politician_trading_preprocessor.py +569 -0
  113. mcli/ml/preprocessing/test_preprocessing.py +294 -0
  114. mcli/ml/scripts/populate_sample_data.py +200 -0
  115. mcli/ml/tasks.py +400 -0
  116. mcli/ml/tests/test_integration.py +429 -0
  117. mcli/ml/tests/test_training_dashboard.py +387 -0
  118. mcli/public/oi/oi.py +15 -0
  119. mcli/public/public.py +4 -0
  120. mcli/self/self_cmd.py +1246 -0
  121. mcli/workflow/daemon/api_daemon.py +800 -0
  122. mcli/workflow/daemon/async_command_database.py +681 -0
  123. mcli/workflow/daemon/async_process_manager.py +591 -0
  124. mcli/workflow/daemon/client.py +530 -0
  125. mcli/workflow/daemon/commands.py +1196 -0
  126. mcli/workflow/daemon/daemon.py +905 -0
  127. mcli/workflow/daemon/daemon_api.py +59 -0
  128. mcli/workflow/daemon/enhanced_daemon.py +571 -0
  129. mcli/workflow/daemon/process_cli.py +244 -0
  130. mcli/workflow/daemon/process_manager.py +439 -0
  131. mcli/workflow/daemon/test_daemon.py +275 -0
  132. mcli/workflow/dashboard/dashboard_cmd.py +113 -0
  133. mcli/workflow/docker/docker.py +0 -0
  134. mcli/workflow/file/file.py +100 -0
  135. mcli/workflow/gcloud/config.toml +21 -0
  136. mcli/workflow/gcloud/gcloud.py +58 -0
  137. mcli/workflow/git_commit/ai_service.py +328 -0
  138. mcli/workflow/git_commit/commands.py +430 -0
  139. mcli/workflow/lsh_integration.py +355 -0
  140. mcli/workflow/model_service/client.py +594 -0
  141. mcli/workflow/model_service/download_and_run_efficient_models.py +288 -0
  142. mcli/workflow/model_service/lightweight_embedder.py +397 -0
  143. mcli/workflow/model_service/lightweight_model_server.py +714 -0
  144. mcli/workflow/model_service/lightweight_test.py +241 -0
  145. mcli/workflow/model_service/model_service.py +1955 -0
  146. mcli/workflow/model_service/ollama_efficient_runner.py +425 -0
  147. mcli/workflow/model_service/pdf_processor.py +386 -0
  148. mcli/workflow/model_service/test_efficient_runner.py +234 -0
  149. mcli/workflow/model_service/test_example.py +315 -0
  150. mcli/workflow/model_service/test_integration.py +131 -0
  151. mcli/workflow/model_service/test_new_features.py +149 -0
  152. mcli/workflow/openai/openai.py +99 -0
  153. mcli/workflow/politician_trading/commands.py +1790 -0
  154. mcli/workflow/politician_trading/config.py +134 -0
  155. mcli/workflow/politician_trading/connectivity.py +490 -0
  156. mcli/workflow/politician_trading/data_sources.py +395 -0
  157. mcli/workflow/politician_trading/database.py +410 -0
  158. mcli/workflow/politician_trading/demo.py +248 -0
  159. mcli/workflow/politician_trading/models.py +165 -0
  160. mcli/workflow/politician_trading/monitoring.py +413 -0
  161. mcli/workflow/politician_trading/scrapers.py +966 -0
  162. mcli/workflow/politician_trading/scrapers_california.py +412 -0
  163. mcli/workflow/politician_trading/scrapers_eu.py +377 -0
  164. mcli/workflow/politician_trading/scrapers_uk.py +350 -0
  165. mcli/workflow/politician_trading/scrapers_us_states.py +438 -0
  166. mcli/workflow/politician_trading/supabase_functions.py +354 -0
  167. mcli/workflow/politician_trading/workflow.py +852 -0
  168. mcli/workflow/registry/registry.py +180 -0
  169. mcli/workflow/repo/repo.py +223 -0
  170. mcli/workflow/scheduler/commands.py +493 -0
  171. mcli/workflow/scheduler/cron_parser.py +238 -0
  172. mcli/workflow/scheduler/job.py +182 -0
  173. mcli/workflow/scheduler/monitor.py +139 -0
  174. mcli/workflow/scheduler/persistence.py +324 -0
  175. mcli/workflow/scheduler/scheduler.py +679 -0
  176. mcli/workflow/sync/sync_cmd.py +437 -0
  177. mcli/workflow/sync/test_cmd.py +314 -0
  178. mcli/workflow/videos/videos.py +242 -0
  179. mcli/workflow/wakatime/wakatime.py +11 -0
  180. mcli/workflow/workflow.py +37 -0
  181. mcli_framework-7.0.0.dist-info/METADATA +479 -0
  182. mcli_framework-7.0.0.dist-info/RECORD +186 -0
  183. mcli_framework-7.0.0.dist-info/WHEEL +5 -0
  184. mcli_framework-7.0.0.dist-info/entry_points.txt +7 -0
  185. mcli_framework-7.0.0.dist-info/licenses/LICENSE +21 -0
  186. mcli_framework-7.0.0.dist-info/top_level.txt +1 -0
mcli/app/visual_cmd.py ADDED
@@ -0,0 +1,303 @@
1
+ """
2
+ 🎨 Visual Effects and Enhancement Commands for MCLI
3
+ Showcase stunning visual elements and interactive features
4
+ """
5
+
6
+ import time
7
+
8
+ import click
9
+
10
+ from mcli.lib.logger.logger import get_logger
11
+
12
+ logger = get_logger(__name__)
13
+
14
+
15
+ @click.group()
16
+ def visual():
17
+ """🎨 Visual effects and enhancements showcase"""
18
+ pass
19
+
20
+
21
+ @visual.command()
22
+ @click.option(
23
+ "--demo-type",
24
+ type=click.Choice(["all", "banners", "tables", "animations", "progress"]),
25
+ default="all",
26
+ help="Type of visual demo to run",
27
+ )
28
+ def demo(demo_type: str):
29
+ """🎭 Demonstrate MCLI's visual capabilities"""
30
+ try:
31
+ from rich.rule import Rule
32
+ from rich.text import Text
33
+
34
+ from mcli.lib.ui.styling import celebrate
35
+ from mcli.lib.ui.visual_effects import (
36
+ AnimatedSpinner,
37
+ ColorfulOutput,
38
+ MCLIBanner,
39
+ MCLIProgressBar,
40
+ StartupSequence,
41
+ VisualTable,
42
+ console,
43
+ demo_visual_effects,
44
+ )
45
+
46
+ console.clear()
47
+
48
+ if demo_type in ["all", "banners"]:
49
+ console.print(Rule("🎨 Banner Showcase", style="bright_magenta"))
50
+ console.print()
51
+
52
+ MCLIBanner.show_main_banner("Visual Demo Mode")
53
+ time.sleep(1)
54
+
55
+ MCLIBanner.show_performance_banner()
56
+ time.sleep(1)
57
+
58
+ MCLIBanner.show_rust_banner()
59
+ time.sleep(1)
60
+
61
+ if demo_type in ["all", "animations"]:
62
+ console.print(Rule("⚡ Animation Showcase", style="bright_yellow"))
63
+ console.print()
64
+
65
+ # Spinner demos
66
+ spinner_types = ["rocket", "gears", "rust", "lightning", "dots"]
67
+ for spinner_type in spinner_types:
68
+ spinner = AnimatedSpinner(spinner_type, 0.15)
69
+ spinner.start(f"Testing {spinner_type} spinner...")
70
+ time.sleep(2)
71
+ spinner.stop()
72
+ ColorfulOutput.success(f"{spinner_type.title()} spinner complete!")
73
+ time.sleep(0.5)
74
+
75
+ if demo_type in ["all", "progress"]:
76
+ console.print(Rule("📊 Progress Bar Showcase", style="bright_cyan"))
77
+ console.print()
78
+
79
+ # Fancy progress demo
80
+ progress = MCLIProgressBar.create_fancy_progress()
81
+
82
+ with progress:
83
+ tasks = [
84
+ ("🚀 Initializing systems", 20),
85
+ ("🔧 Loading components", 15),
86
+ ("⚡ Optimizing performance", 25),
87
+ ("🎨 Applying visual effects", 18),
88
+ ("✨ Finalizing setup", 12),
89
+ ]
90
+
91
+ for task_name, duration in tasks:
92
+ task = progress.add_task(task_name, total=duration)
93
+
94
+ for i in range(duration):
95
+ progress.update(task, advance=1)
96
+ time.sleep(0.1)
97
+
98
+ progress.remove_task(task)
99
+
100
+ if demo_type in ["all", "tables"]:
101
+ console.print(Rule("📋 Table Showcase", style="bright_green"))
102
+ console.print()
103
+
104
+ # Sample data for tables
105
+ sample_perf_data = {
106
+ "uvloop": {"success": True, "reason": "Loaded successfully"},
107
+ "rust": {
108
+ "success": True,
109
+ "extensions": {
110
+ "tfidf": True,
111
+ "file_watcher": True,
112
+ "command_matcher": True,
113
+ "process_manager": True,
114
+ },
115
+ },
116
+ "redis": {"success": False, "reason": "Redis server not available"},
117
+ "python": {"success": True, "optimizations": {"gc_tuned": True}},
118
+ }
119
+
120
+ perf_table = VisualTable.create_performance_table(sample_perf_data)
121
+ console.print(perf_table)
122
+ console.print()
123
+
124
+ rust_extensions = {
125
+ "tfidf": True,
126
+ "file_watcher": True,
127
+ "command_matcher": False,
128
+ "process_manager": True,
129
+ }
130
+ rust_table = VisualTable.create_rust_extensions_table(rust_extensions)
131
+ console.print(rust_table)
132
+
133
+ # Final celebration
134
+ console.print()
135
+ celebrate("Visual Demo Complete - MCLI looks amazing!")
136
+
137
+ ColorfulOutput.info("Ready to experience the enhanced MCLI interface!")
138
+
139
+ except ImportError as e:
140
+ click.echo(f"❌ Visual effects not available: {e}")
141
+ click.echo("💡 Try installing rich: pip install rich")
142
+
143
+
144
+ @visual.command()
145
+ def startup():
146
+ """🚀 Show the full startup animation sequence"""
147
+ try:
148
+ from mcli.lib.ui.visual_effects import StartupSequence
149
+
150
+ StartupSequence.run_startup_animation()
151
+
152
+ except ImportError as e:
153
+ click.echo(f"❌ Visual effects not available: {e}")
154
+
155
+
156
+ @visual.command()
157
+ @click.option(
158
+ "--spinner-type",
159
+ type=click.Choice(["rocket", "gears", "rust", "lightning", "dots", "arrows"]),
160
+ default="rocket",
161
+ help="Type of spinner to show",
162
+ )
163
+ @click.option("--duration", default=5, help="Duration in seconds")
164
+ @click.option("--message", default="Processing...", help="Loading message")
165
+ def spinner(spinner_type: str, duration: int, message: str):
166
+ """⚡ Show an animated spinner"""
167
+ try:
168
+ from mcli.lib.ui.visual_effects import AnimatedSpinner
169
+
170
+ spinner = AnimatedSpinner(spinner_type, 0.1)
171
+ spinner.start(message)
172
+ time.sleep(duration)
173
+ spinner.stop()
174
+
175
+ click.echo("✅ Spinner demo complete!")
176
+
177
+ except ImportError as e:
178
+ click.echo(f"❌ Visual effects not available: {e}")
179
+
180
+
181
+ @visual.command()
182
+ def performance():
183
+ """📊 Show enhanced performance summary"""
184
+ try:
185
+ from mcli.lib.performance.rust_bridge import print_performance_summary
186
+
187
+ print_performance_summary()
188
+
189
+ except ImportError as e:
190
+ click.echo(f"❌ Performance summary not available: {e}")
191
+
192
+
193
+ @visual.command()
194
+ @click.option(
195
+ "--style",
196
+ type=click.Choice(["success", "error", "warning", "info", "celebrate"]),
197
+ default="info",
198
+ help="Message style to demo",
199
+ )
200
+ @click.argument("message", default="This is a test message!")
201
+ def message(style: str, message: str):
202
+ """💬 Show styled message examples"""
203
+ try:
204
+ from mcli.lib.ui.styling import celebrate
205
+ from mcli.lib.ui.visual_effects import ColorfulOutput
206
+
207
+ if style == "success":
208
+ ColorfulOutput.success(message)
209
+ elif style == "error":
210
+ ColorfulOutput.error(message)
211
+ elif style == "warning":
212
+ ColorfulOutput.warning(message)
213
+ elif style == "info":
214
+ ColorfulOutput.info(message)
215
+ elif style == "celebrate":
216
+ celebrate(message)
217
+
218
+ except ImportError as e:
219
+ click.echo(f"❌ Visual effects not available: {e}")
220
+
221
+
222
+ @visual.command()
223
+ def banner():
224
+ """🎯 Show all available banners"""
225
+ try:
226
+ from mcli.lib.ui.visual_effects import MCLIBanner
227
+
228
+ MCLIBanner.show_main_banner("Banner Showcase")
229
+ time.sleep(1)
230
+
231
+ MCLIBanner.show_performance_banner()
232
+ time.sleep(1)
233
+
234
+ MCLIBanner.show_rust_banner()
235
+
236
+ except ImportError as e:
237
+ click.echo(f"❌ Visual effects not available: {e}")
238
+
239
+
240
+ @visual.command()
241
+ def interactive():
242
+ """🎮 Interactive visual experience"""
243
+ try:
244
+ import random
245
+
246
+ from rich.panel import Panel
247
+ from rich.prompt import Confirm, Prompt
248
+ from rich.text import Text
249
+
250
+ from mcli.lib.ui.visual_effects import AnimatedSpinner, ColorfulOutput, MCLIBanner, console
251
+
252
+ console.clear()
253
+
254
+ # Welcome
255
+ MCLIBanner.show_main_banner("Interactive Mode")
256
+
257
+ # User interaction
258
+ name = Prompt.ask("🎨 What's your name?", default="Developer")
259
+
260
+ # Personalized greeting
261
+ greeting = f"Welcome to MCLI, {name}! 🚀"
262
+ ColorfulOutput.success(greeting)
263
+
264
+ # Interactive spinner choice
265
+ spinner_types = ["rocket", "gears", "rust", "lightning", "dots"]
266
+ chosen_spinner = Prompt.ask(
267
+ "Choose your favorite spinner", choices=spinner_types, default="rocket"
268
+ )
269
+
270
+ # Show chosen spinner
271
+ spinner = AnimatedSpinner(chosen_spinner, 0.12)
272
+ spinner.start(f"Loading {name}'s personalized experience...")
273
+ time.sleep(3)
274
+ spinner.stop()
275
+
276
+ # Random fun fact
277
+ fun_facts = [
278
+ "MCLI is powered by Rust for maximum performance! 🦀",
279
+ "The visual effects use Rich library for stunning output! 🎨",
280
+ "You can customize all visual elements! ⚙️",
281
+ "MCLI supports multiple themes and styles! 🌈",
282
+ "Performance optimizations give 10-100x speedup! ⚡",
283
+ ]
284
+
285
+ fact = random.choice(fun_facts)
286
+ panel = Panel(f"💡 Fun Fact: {fact}", title="Did You Know?", border_style="bright_blue")
287
+ console.print(panel)
288
+
289
+ # Final interaction
290
+ if Confirm.ask("🎭 Would you like to see the full demo?"):
291
+ from mcli.lib.ui.visual_effects import demo_visual_effects
292
+
293
+ demo_visual_effects()
294
+
295
+ ColorfulOutput.success(f"Thanks for exploring MCLI visuals, {name}! 🎉")
296
+
297
+ except ImportError as e:
298
+ click.echo(f"❌ Interactive mode not available: {e}")
299
+
300
+
301
+ # Add visual command group to main CLI
302
+ if __name__ == "__main__":
303
+ visual()