mcli-framework 7.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.

Potentially problematic release.


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

Files changed (264) hide show
  1. mcli_framework-7.0.0/.github/dependabot.yml +51 -0
  2. mcli_framework-7.0.0/.github/workflows/build.yml +102 -0
  3. mcli_framework-7.0.0/.github/workflows/ci.yml +246 -0
  4. mcli_framework-7.0.0/.github/workflows/ml-pipeline.yml +324 -0
  5. mcli_framework-7.0.0/.github/workflows/publish-self-hosted.yml +241 -0
  6. mcli_framework-7.0.0/.github/workflows/publish.yml +189 -0
  7. mcli_framework-7.0.0/.github/workflows/release.yml +91 -0
  8. mcli_framework-7.0.0/.github/workflows/security.yml +114 -0
  9. mcli_framework-7.0.0/.github/workflows/test.yml +149 -0
  10. mcli_framework-7.0.0/LICENSE +21 -0
  11. mcli_framework-7.0.0/MANIFEST.in +41 -0
  12. mcli_framework-7.0.0/PERFORMANCE_OPTIMIZATIONS.md +484 -0
  13. mcli_framework-7.0.0/PKG-INFO +479 -0
  14. mcli_framework-7.0.0/README.md +332 -0
  15. mcli_framework-7.0.0/mcli_rust/Cargo.toml +27 -0
  16. mcli_framework-7.0.0/mcli_rust/src/command_parser.rs +456 -0
  17. mcli_framework-7.0.0/mcli_rust/src/file_watcher.rs +303 -0
  18. mcli_framework-7.0.0/mcli_rust/src/lib.rs +20 -0
  19. mcli_framework-7.0.0/mcli_rust/src/process_manager.rs +458 -0
  20. mcli_framework-7.0.0/mcli_rust/src/tfidf.rs +268 -0
  21. mcli_framework-7.0.0/pyproject.toml +386 -0
  22. mcli_framework-7.0.0/setup.cfg +150 -0
  23. mcli_framework-7.0.0/src/mcli/app/chat_cmd.py +42 -0
  24. mcli_framework-7.0.0/src/mcli/app/commands_cmd.py +226 -0
  25. mcli_framework-7.0.0/src/mcli/app/completion_cmd.py +216 -0
  26. mcli_framework-7.0.0/src/mcli/app/completion_helpers.py +288 -0
  27. mcli_framework-7.0.0/src/mcli/app/cron_test_cmd.py +697 -0
  28. mcli_framework-7.0.0/src/mcli/app/logs_cmd.py +419 -0
  29. mcli_framework-7.0.0/src/mcli/app/main.py +492 -0
  30. mcli_framework-7.0.0/src/mcli/app/model/model.py +1060 -0
  31. mcli_framework-7.0.0/src/mcli/app/model_cmd.py +227 -0
  32. mcli_framework-7.0.0/src/mcli/app/redis_cmd.py +269 -0
  33. mcli_framework-7.0.0/src/mcli/app/video/video.py +1114 -0
  34. mcli_framework-7.0.0/src/mcli/app/visual_cmd.py +303 -0
  35. mcli_framework-7.0.0/src/mcli/chat/chat.py +2409 -0
  36. mcli_framework-7.0.0/src/mcli/chat/command_rag.py +514 -0
  37. mcli_framework-7.0.0/src/mcli/chat/enhanced_chat.py +652 -0
  38. mcli_framework-7.0.0/src/mcli/chat/system_controller.py +1010 -0
  39. mcli_framework-7.0.0/src/mcli/chat/system_integration.py +1016 -0
  40. mcli_framework-7.0.0/src/mcli/cli.py +25 -0
  41. mcli_framework-7.0.0/src/mcli/config.toml +20 -0
  42. mcli_framework-7.0.0/src/mcli/lib/api/api.py +586 -0
  43. mcli_framework-7.0.0/src/mcli/lib/api/daemon_client.py +203 -0
  44. mcli_framework-7.0.0/src/mcli/lib/api/daemon_client_local.py +44 -0
  45. mcli_framework-7.0.0/src/mcli/lib/api/daemon_decorator.py +217 -0
  46. mcli_framework-7.0.0/src/mcli/lib/api/mcli_decorators.py +1032 -0
  47. mcli_framework-7.0.0/src/mcli/lib/auth/auth.py +85 -0
  48. mcli_framework-7.0.0/src/mcli/lib/auth/aws_manager.py +85 -0
  49. mcli_framework-7.0.0/src/mcli/lib/auth/azure_manager.py +91 -0
  50. mcli_framework-7.0.0/src/mcli/lib/auth/credential_manager.py +192 -0
  51. mcli_framework-7.0.0/src/mcli/lib/auth/gcp_manager.py +93 -0
  52. mcli_framework-7.0.0/src/mcli/lib/auth/key_manager.py +117 -0
  53. mcli_framework-7.0.0/src/mcli/lib/auth/mcli_manager.py +93 -0
  54. mcli_framework-7.0.0/src/mcli/lib/auth/token_manager.py +75 -0
  55. mcli_framework-7.0.0/src/mcli/lib/auth/token_util.py +1011 -0
  56. mcli_framework-7.0.0/src/mcli/lib/config/config.py +47 -0
  57. mcli_framework-7.0.0/src/mcli/lib/discovery/__init__.py +1 -0
  58. mcli_framework-7.0.0/src/mcli/lib/discovery/command_discovery.py +274 -0
  59. mcli_framework-7.0.0/src/mcli/lib/erd/erd.py +1345 -0
  60. mcli_framework-7.0.0/src/mcli/lib/erd/generate_graph.py +453 -0
  61. mcli_framework-7.0.0/src/mcli/lib/files/files.py +76 -0
  62. mcli_framework-7.0.0/src/mcli/lib/fs/fs.py +109 -0
  63. mcli_framework-7.0.0/src/mcli/lib/lib.py +29 -0
  64. mcli_framework-7.0.0/src/mcli/lib/logger/logger.py +611 -0
  65. mcli_framework-7.0.0/src/mcli/lib/performance/optimizer.py +409 -0
  66. mcli_framework-7.0.0/src/mcli/lib/performance/rust_bridge.py +502 -0
  67. mcli_framework-7.0.0/src/mcli/lib/performance/uvloop_config.py +154 -0
  68. mcli_framework-7.0.0/src/mcli/lib/pickles/pickles.py +50 -0
  69. mcli_framework-7.0.0/src/mcli/lib/search/cached_vectorizer.py +479 -0
  70. mcli_framework-7.0.0/src/mcli/lib/services/data_pipeline.py +460 -0
  71. mcli_framework-7.0.0/src/mcli/lib/services/lsh_client.py +441 -0
  72. mcli_framework-7.0.0/src/mcli/lib/services/redis_service.py +387 -0
  73. mcli_framework-7.0.0/src/mcli/lib/shell/shell.py +137 -0
  74. mcli_framework-7.0.0/src/mcli/lib/toml/toml.py +33 -0
  75. mcli_framework-7.0.0/src/mcli/lib/ui/styling.py +47 -0
  76. mcli_framework-7.0.0/src/mcli/lib/ui/visual_effects.py +634 -0
  77. mcli_framework-7.0.0/src/mcli/lib/watcher/watcher.py +185 -0
  78. mcli_framework-7.0.0/src/mcli/ml/api/app.py +215 -0
  79. mcli_framework-7.0.0/src/mcli/ml/api/middleware.py +224 -0
  80. mcli_framework-7.0.0/src/mcli/ml/api/routers/admin_router.py +12 -0
  81. mcli_framework-7.0.0/src/mcli/ml/api/routers/auth_router.py +244 -0
  82. mcli_framework-7.0.0/src/mcli/ml/api/routers/backtest_router.py +12 -0
  83. mcli_framework-7.0.0/src/mcli/ml/api/routers/data_router.py +12 -0
  84. mcli_framework-7.0.0/src/mcli/ml/api/routers/model_router.py +302 -0
  85. mcli_framework-7.0.0/src/mcli/ml/api/routers/monitoring_router.py +12 -0
  86. mcli_framework-7.0.0/src/mcli/ml/api/routers/portfolio_router.py +12 -0
  87. mcli_framework-7.0.0/src/mcli/ml/api/routers/prediction_router.py +267 -0
  88. mcli_framework-7.0.0/src/mcli/ml/api/routers/trade_router.py +12 -0
  89. mcli_framework-7.0.0/src/mcli/ml/api/routers/websocket_router.py +76 -0
  90. mcli_framework-7.0.0/src/mcli/ml/api/schemas.py +64 -0
  91. mcli_framework-7.0.0/src/mcli/ml/auth/auth_manager.py +425 -0
  92. mcli_framework-7.0.0/src/mcli/ml/auth/models.py +154 -0
  93. mcli_framework-7.0.0/src/mcli/ml/auth/permissions.py +302 -0
  94. mcli_framework-7.0.0/src/mcli/ml/backtesting/backtest_engine.py +502 -0
  95. mcli_framework-7.0.0/src/mcli/ml/backtesting/performance_metrics.py +393 -0
  96. mcli_framework-7.0.0/src/mcli/ml/cache.py +400 -0
  97. mcli_framework-7.0.0/src/mcli/ml/cli/main.py +398 -0
  98. mcli_framework-7.0.0/src/mcli/ml/config/settings.py +394 -0
  99. mcli_framework-7.0.0/src/mcli/ml/configs/dvc_config.py +230 -0
  100. mcli_framework-7.0.0/src/mcli/ml/configs/mlflow_config.py +131 -0
  101. mcli_framework-7.0.0/src/mcli/ml/configs/mlops_manager.py +293 -0
  102. mcli_framework-7.0.0/src/mcli/ml/dashboard/app.py +532 -0
  103. mcli_framework-7.0.0/src/mcli/ml/dashboard/app_integrated.py +738 -0
  104. mcli_framework-7.0.0/src/mcli/ml/dashboard/app_supabase.py +560 -0
  105. mcli_framework-7.0.0/src/mcli/ml/dashboard/app_training.py +615 -0
  106. mcli_framework-7.0.0/src/mcli/ml/dashboard/cli.py +51 -0
  107. mcli_framework-7.0.0/src/mcli/ml/data_ingestion/api_connectors.py +501 -0
  108. mcli_framework-7.0.0/src/mcli/ml/data_ingestion/data_pipeline.py +567 -0
  109. mcli_framework-7.0.0/src/mcli/ml/data_ingestion/stream_processor.py +512 -0
  110. mcli_framework-7.0.0/src/mcli/ml/database/migrations/env.py +94 -0
  111. mcli_framework-7.0.0/src/mcli/ml/database/models.py +667 -0
  112. mcli_framework-7.0.0/src/mcli/ml/database/session.py +200 -0
  113. mcli_framework-7.0.0/src/mcli/ml/experimentation/ab_testing.py +845 -0
  114. mcli_framework-7.0.0/src/mcli/ml/features/ensemble_features.py +607 -0
  115. mcli_framework-7.0.0/src/mcli/ml/features/political_features.py +676 -0
  116. mcli_framework-7.0.0/src/mcli/ml/features/recommendation_engine.py +809 -0
  117. mcli_framework-7.0.0/src/mcli/ml/features/stock_features.py +573 -0
  118. mcli_framework-7.0.0/src/mcli/ml/features/test_feature_engineering.py +346 -0
  119. mcli_framework-7.0.0/src/mcli/ml/logging.py +85 -0
  120. mcli_framework-7.0.0/src/mcli/ml/mlops/data_versioning.py +518 -0
  121. mcli_framework-7.0.0/src/mcli/ml/mlops/experiment_tracker.py +377 -0
  122. mcli_framework-7.0.0/src/mcli/ml/mlops/model_serving.py +481 -0
  123. mcli_framework-7.0.0/src/mcli/ml/mlops/pipeline_orchestrator.py +614 -0
  124. mcli_framework-7.0.0/src/mcli/ml/models/base_models.py +324 -0
  125. mcli_framework-7.0.0/src/mcli/ml/models/ensemble_models.py +675 -0
  126. mcli_framework-7.0.0/src/mcli/ml/models/recommendation_models.py +474 -0
  127. mcli_framework-7.0.0/src/mcli/ml/models/test_models.py +487 -0
  128. mcli_framework-7.0.0/src/mcli/ml/monitoring/drift_detection.py +676 -0
  129. mcli_framework-7.0.0/src/mcli/ml/monitoring/metrics.py +45 -0
  130. mcli_framework-7.0.0/src/mcli/ml/optimization/portfolio_optimizer.py +834 -0
  131. mcli_framework-7.0.0/src/mcli/ml/preprocessing/data_cleaners.py +451 -0
  132. mcli_framework-7.0.0/src/mcli/ml/preprocessing/feature_extractors.py +491 -0
  133. mcli_framework-7.0.0/src/mcli/ml/preprocessing/ml_pipeline.py +382 -0
  134. mcli_framework-7.0.0/src/mcli/ml/preprocessing/politician_trading_preprocessor.py +569 -0
  135. mcli_framework-7.0.0/src/mcli/ml/preprocessing/test_preprocessing.py +294 -0
  136. mcli_framework-7.0.0/src/mcli/ml/scripts/populate_sample_data.py +200 -0
  137. mcli_framework-7.0.0/src/mcli/ml/tasks.py +400 -0
  138. mcli_framework-7.0.0/src/mcli/ml/tests/test_integration.py +429 -0
  139. mcli_framework-7.0.0/src/mcli/ml/tests/test_training_dashboard.py +387 -0
  140. mcli_framework-7.0.0/src/mcli/public/oi/oi.py +15 -0
  141. mcli_framework-7.0.0/src/mcli/public/public.py +4 -0
  142. mcli_framework-7.0.0/src/mcli/self/self_cmd.py +1246 -0
  143. mcli_framework-7.0.0/src/mcli/workflow/daemon/api_daemon.py +800 -0
  144. mcli_framework-7.0.0/src/mcli/workflow/daemon/async_command_database.py +681 -0
  145. mcli_framework-7.0.0/src/mcli/workflow/daemon/async_process_manager.py +591 -0
  146. mcli_framework-7.0.0/src/mcli/workflow/daemon/client.py +530 -0
  147. mcli_framework-7.0.0/src/mcli/workflow/daemon/commands.py +1196 -0
  148. mcli_framework-7.0.0/src/mcli/workflow/daemon/daemon.py +905 -0
  149. mcli_framework-7.0.0/src/mcli/workflow/daemon/daemon_api.py +59 -0
  150. mcli_framework-7.0.0/src/mcli/workflow/daemon/enhanced_daemon.py +571 -0
  151. mcli_framework-7.0.0/src/mcli/workflow/daemon/process_cli.py +244 -0
  152. mcli_framework-7.0.0/src/mcli/workflow/daemon/process_manager.py +439 -0
  153. mcli_framework-7.0.0/src/mcli/workflow/daemon/test_daemon.py +275 -0
  154. mcli_framework-7.0.0/src/mcli/workflow/dashboard/dashboard_cmd.py +113 -0
  155. mcli_framework-7.0.0/src/mcli/workflow/docker/docker.py +0 -0
  156. mcli_framework-7.0.0/src/mcli/workflow/file/file.py +100 -0
  157. mcli_framework-7.0.0/src/mcli/workflow/gcloud/config.toml +21 -0
  158. mcli_framework-7.0.0/src/mcli/workflow/gcloud/gcloud.py +58 -0
  159. mcli_framework-7.0.0/src/mcli/workflow/git_commit/ai_service.py +328 -0
  160. mcli_framework-7.0.0/src/mcli/workflow/git_commit/commands.py +430 -0
  161. mcli_framework-7.0.0/src/mcli/workflow/lsh_integration.py +355 -0
  162. mcli_framework-7.0.0/src/mcli/workflow/model_service/client.py +594 -0
  163. mcli_framework-7.0.0/src/mcli/workflow/model_service/download_and_run_efficient_models.py +288 -0
  164. mcli_framework-7.0.0/src/mcli/workflow/model_service/lightweight_embedder.py +397 -0
  165. mcli_framework-7.0.0/src/mcli/workflow/model_service/lightweight_model_server.py +714 -0
  166. mcli_framework-7.0.0/src/mcli/workflow/model_service/lightweight_test.py +241 -0
  167. mcli_framework-7.0.0/src/mcli/workflow/model_service/model_service.py +1955 -0
  168. mcli_framework-7.0.0/src/mcli/workflow/model_service/ollama_efficient_runner.py +425 -0
  169. mcli_framework-7.0.0/src/mcli/workflow/model_service/pdf_processor.py +386 -0
  170. mcli_framework-7.0.0/src/mcli/workflow/model_service/test_efficient_runner.py +234 -0
  171. mcli_framework-7.0.0/src/mcli/workflow/model_service/test_example.py +315 -0
  172. mcli_framework-7.0.0/src/mcli/workflow/model_service/test_integration.py +131 -0
  173. mcli_framework-7.0.0/src/mcli/workflow/model_service/test_new_features.py +149 -0
  174. mcli_framework-7.0.0/src/mcli/workflow/openai/openai.py +99 -0
  175. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/commands.py +1790 -0
  176. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/config.py +134 -0
  177. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/connectivity.py +490 -0
  178. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/data_sources.py +395 -0
  179. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/database.py +410 -0
  180. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/demo.py +248 -0
  181. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/models.py +165 -0
  182. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/monitoring.py +413 -0
  183. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/scrapers.py +966 -0
  184. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/scrapers_california.py +412 -0
  185. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/scrapers_eu.py +377 -0
  186. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/scrapers_uk.py +350 -0
  187. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/scrapers_us_states.py +438 -0
  188. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/supabase_functions.py +354 -0
  189. mcli_framework-7.0.0/src/mcli/workflow/politician_trading/workflow.py +852 -0
  190. mcli_framework-7.0.0/src/mcli/workflow/registry/registry.py +180 -0
  191. mcli_framework-7.0.0/src/mcli/workflow/repo/repo.py +223 -0
  192. mcli_framework-7.0.0/src/mcli/workflow/scheduler/commands.py +493 -0
  193. mcli_framework-7.0.0/src/mcli/workflow/scheduler/cron_parser.py +238 -0
  194. mcli_framework-7.0.0/src/mcli/workflow/scheduler/job.py +182 -0
  195. mcli_framework-7.0.0/src/mcli/workflow/scheduler/monitor.py +139 -0
  196. mcli_framework-7.0.0/src/mcli/workflow/scheduler/persistence.py +324 -0
  197. mcli_framework-7.0.0/src/mcli/workflow/scheduler/scheduler.py +679 -0
  198. mcli_framework-7.0.0/src/mcli/workflow/sync/sync_cmd.py +437 -0
  199. mcli_framework-7.0.0/src/mcli/workflow/sync/test_cmd.py +314 -0
  200. mcli_framework-7.0.0/src/mcli/workflow/videos/videos.py +242 -0
  201. mcli_framework-7.0.0/src/mcli/workflow/wakatime/wakatime.py +11 -0
  202. mcli_framework-7.0.0/src/mcli/workflow/workflow.py +37 -0
  203. mcli_framework-7.0.0/src/mcli_framework.egg-info/PKG-INFO +479 -0
  204. mcli_framework-7.0.0/src/mcli_framework.egg-info/SOURCES.txt +263 -0
  205. mcli_framework-7.0.0/src/mcli_framework.egg-info/dependency_links.txt +1 -0
  206. mcli_framework-7.0.0/src/mcli_framework.egg-info/entry_points.txt +7 -0
  207. mcli_framework-7.0.0/src/mcli_framework.egg-info/requires.txt +120 -0
  208. mcli_framework-7.0.0/src/mcli_framework.egg-info/top_level.txt +1 -0
  209. mcli_framework-7.0.0/tests/conftest.py +130 -0
  210. mcli_framework-7.0.0/tests/demo_generate_graph.py +81 -0
  211. mcli_framework-7.0.0/tests/demo_hierarchical_transform.py +375 -0
  212. mcli_framework-7.0.0/tests/end_to_end_integration_test.py +425 -0
  213. mcli_framework-7.0.0/tests/pytest.ini +9 -0
  214. mcli_framework-7.0.0/tests/run_tests.py +77 -0
  215. mcli_framework-7.0.0/tests/simple_integration_test.py +163 -0
  216. mcli_framework-7.0.0/tests/test_agent_functionality.py +111 -0
  217. mcli_framework-7.0.0/tests/test_all_cli.py +7 -0
  218. mcli_framework-7.0.0/tests/test_auth.py +10 -0
  219. mcli_framework-7.0.0/tests/test_california_scraper.py +64 -0
  220. mcli_framework-7.0.0/tests/test_chat_client.py +299 -0
  221. mcli_framework-7.0.0/tests/test_chat_cmd.py +112 -0
  222. mcli_framework-7.0.0/tests/test_chat_system_control.py +136 -0
  223. mcli_framework-7.0.0/tests/test_command_discovery.py +295 -0
  224. mcli_framework-7.0.0/tests/test_congress_scraper.py +69 -0
  225. mcli_framework-7.0.0/tests/test_daemon.py +707 -0
  226. mcli_framework-7.0.0/tests/test_daemon_client.py +353 -0
  227. mcli_framework-7.0.0/tests/test_data_pipeline.py +645 -0
  228. mcli_framework-7.0.0/tests/test_enhanced_chat.py +276 -0
  229. mcli_framework-7.0.0/tests/test_erd.py +1336 -0
  230. mcli_framework-7.0.0/tests/test_erd_import.py +26 -0
  231. mcli_framework-7.0.0/tests/test_file.py +40 -0
  232. mcli_framework-7.0.0/tests/test_fix.py +35 -0
  233. mcli_framework-7.0.0/tests/test_fixed_issues.py +130 -0
  234. mcli_framework-7.0.0/tests/test_gcloud.py +58 -0
  235. mcli_framework-7.0.0/tests/test_generate_graph.py +11 -0
  236. mcli_framework-7.0.0/tests/test_generic_erd.py +221 -0
  237. mcli_framework-7.0.0/tests/test_harness.py +200 -0
  238. mcli_framework-7.0.0/tests/test_lib.py +9 -0
  239. mcli_framework-7.0.0/tests/test_lsh_client.py +432 -0
  240. mcli_framework-7.0.0/tests/test_lsh_integration.py +300 -0
  241. mcli_framework-7.0.0/tests/test_main_app.py +36 -0
  242. mcli_framework-7.0.0/tests/test_main_app_functions.py +144 -0
  243. mcli_framework-7.0.0/tests/test_ml_auth.py +391 -0
  244. mcli_framework-7.0.0/tests/test_ml_models.py +351 -0
  245. mcli_framework-7.0.0/tests/test_ml_pipeline.py +436 -0
  246. mcli_framework-7.0.0/tests/test_oi.py +10 -0
  247. mcli_framework-7.0.0/tests/test_optional_dependencies.py +105 -0
  248. mcli_framework-7.0.0/tests/test_politician_trading_integration.py +343 -0
  249. mcli_framework-7.0.0/tests/test_preprocessing_simple.py +156 -0
  250. mcli_framework-7.0.0/tests/test_registry.py +117 -0
  251. mcli_framework-7.0.0/tests/test_repo.py +59 -0
  252. mcli_framework-7.0.0/tests/test_rich.py +19 -0
  253. mcli_framework-7.0.0/tests/test_self.py +80 -0
  254. mcli_framework-7.0.0/tests/test_uk_scraper.py +64 -0
  255. mcli_framework-7.0.0/tests/test_us_states_scraper.py +75 -0
  256. mcli_framework-7.0.0/tests/test_utility_functions.py +343 -0
  257. mcli_framework-7.0.0/tests/test_utility_functions_simple.py +107 -0
  258. mcli_framework-7.0.0/tests/test_uv_compatibility.py +204 -0
  259. mcli_framework-7.0.0/tests/test_videos.py +52 -0
  260. mcli_framework-7.0.0/tests/test_wakatime.py +10 -0
  261. mcli_framework-7.0.0/tests/test_webapp.py +7 -0
  262. mcli_framework-7.0.0/tests/test_webapp_comprehensive.py +7 -0
  263. mcli_framework-7.0.0/tests/test_workflow.py +7 -0
  264. mcli_framework-7.0.0/tests/test_workflow_integration.py +7 -0
@@ -0,0 +1,51 @@
1
+ # Dependabot configuration for automated dependency updates
2
+ # https://docs.github.com/en/code-security/dependabot
3
+
4
+ version: 2
5
+ updates:
6
+ # Python dependencies
7
+ - package-ecosystem: "pip"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "weekly"
11
+ day: "monday"
12
+ open-pull-requests-limit: 10
13
+ reviewers:
14
+ - "gwicho38"
15
+ labels:
16
+ - "dependencies"
17
+ - "python"
18
+ commit-message:
19
+ prefix: "chore(deps)"
20
+ include: "scope"
21
+ # Group minor and patch updates
22
+ groups:
23
+ development-dependencies:
24
+ patterns:
25
+ - "pytest*"
26
+ - "black"
27
+ - "isort"
28
+ - "mypy"
29
+ - "flake8*"
30
+ update-types:
31
+ - "minor"
32
+ - "patch"
33
+ production-dependencies:
34
+ patterns:
35
+ - "*"
36
+ update-types:
37
+ - "patch"
38
+
39
+ # GitHub Actions
40
+ - package-ecosystem: "github-actions"
41
+ directory: "/"
42
+ schedule:
43
+ interval: "weekly"
44
+ open-pull-requests-limit: 5
45
+ reviewers:
46
+ - "gwicho38"
47
+ labels:
48
+ - "dependencies"
49
+ - "github-actions"
50
+ commit-message:
51
+ prefix: "chore(ci)"
@@ -0,0 +1,102 @@
1
+ name: Build and Package
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+ workflow_dispatch:
9
+ inputs:
10
+ debug:
11
+ description: 'Enable debug mode'
12
+ required: false
13
+ default: false
14
+ type: boolean
15
+
16
+ env:
17
+ PYTHON_VERSION: '3.11'
18
+ UV_VERSION: 'latest'
19
+
20
+ jobs:
21
+ build:
22
+ name: Build Package
23
+ strategy:
24
+ matrix:
25
+ platform: [ubuntu-latest, macos-latest]
26
+
27
+ runs-on: ${{ matrix.platform }}
28
+
29
+ steps:
30
+ - name: Checkout code
31
+ uses: actions/checkout@v4
32
+
33
+ - name: Set up Python
34
+ uses: actions/setup-python@v4
35
+ with:
36
+ python-version: ${{ env.PYTHON_VERSION }}
37
+
38
+ - name: Install UV
39
+ run: |
40
+ if [[ "${{ matrix.platform }}" == "ubuntu-latest" ]]; then
41
+ curl -LsSf https://astral.sh/uv/install.sh | sh
42
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
43
+ elif [[ "${{ matrix.platform }}" == "macos-latest" ]]; then
44
+ curl -LsSf https://astral.sh/uv/install.sh | sh
45
+ echo "$HOME/.cargo/bin" >> $GITHUB_PATH
46
+ fi
47
+
48
+ - name: Set up environment
49
+ run: |
50
+ if command -v uv >/dev/null 2>&1; then
51
+ make setup
52
+ else
53
+ python -m pip install --upgrade pip build
54
+ pip install -e .
55
+ fi
56
+
57
+ - name: Build wheel
58
+ run: |
59
+ if command -v uv >/dev/null 2>&1; then
60
+ make wheel
61
+ else
62
+ python -m build --wheel
63
+ fi
64
+
65
+ - name: Test basic functionality
66
+ run: |
67
+ if command -v uv >/dev/null 2>&1; then
68
+ make test
69
+ else
70
+ python -c "import mcli; print('✅ Package imports successfully')"
71
+ python -m mcli --help
72
+ fi
73
+
74
+ - name: Upload wheel artifact
75
+ uses: actions/upload-artifact@v4
76
+ with:
77
+ name: mcli-wheel-${{ matrix.platform }}
78
+ path: dist/*.whl
79
+ retention-days: 30
80
+
81
+
82
+ build-summary:
83
+ name: Build Summary
84
+ needs: build
85
+ runs-on: ubuntu-latest
86
+ if: always()
87
+
88
+ steps:
89
+ - name: Build Status Summary
90
+ run: |
91
+ echo "## Build Results" >> $GITHUB_STEP_SUMMARY
92
+ echo "| Platform | Status |" >> $GITHUB_STEP_SUMMARY
93
+ echo "|----------|--------|" >> $GITHUB_STEP_SUMMARY
94
+ echo "| Ubuntu | ${{ needs.build.result }} |" >> $GITHUB_STEP_SUMMARY
95
+ echo "| macOS | ${{ needs.build.result }} |" >> $GITHUB_STEP_SUMMARY
96
+ echo "| Windows | ${{ needs.build.result }} |" >> $GITHUB_STEP_SUMMARY
97
+
98
+ if [ "${{ needs.build.result }}" = "success" ]; then
99
+ echo "✅ All builds completed successfully!" >> $GITHUB_STEP_SUMMARY
100
+ else
101
+ echo "❌ Some builds failed. Check the logs for details." >> $GITHUB_STEP_SUMMARY
102
+ fi
@@ -0,0 +1,246 @@
1
+ name: CI/CD Pipeline
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ pull_request:
7
+ branches: [ main ]
8
+ workflow_dispatch:
9
+
10
+ env:
11
+ PYTHON_VERSION: "3.11"
12
+
13
+ jobs:
14
+ lint-and-format:
15
+ name: Lint and Format Check
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v4
24
+ with:
25
+ python-version: ${{ env.PYTHON_VERSION }}
26
+
27
+ - name: Install dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ pip install black isort mypy
31
+ pip install -e .[dev]
32
+
33
+ - name: Check code formatting with Black
34
+ run: black --check --diff src/
35
+
36
+ - name: Check import sorting with isort
37
+ run: isort --check-only --diff src/
38
+
39
+ - name: Type checking with mypy
40
+ run: mypy src/ --ignore-missing-imports || true
41
+
42
+ test-rust:
43
+ name: Test Rust Extensions
44
+ runs-on: ${{ matrix.os }}
45
+ strategy:
46
+ matrix:
47
+ os: [ubuntu-latest, macos-latest]
48
+
49
+ steps:
50
+ - name: Checkout code
51
+ uses: actions/checkout@v4
52
+
53
+ - name: Set up Rust
54
+ uses: dtolnay/rust-toolchain@stable
55
+ with:
56
+ components: rustfmt, clippy
57
+
58
+ - name: Rust format check
59
+ run: |
60
+ cd mcli_rust
61
+ cargo fmt --all -- --check
62
+
63
+ - name: Rust clippy
64
+ run: |
65
+ cd mcli_rust
66
+ cargo clippy -- -D warnings
67
+
68
+ - name: Rust tests
69
+ run: |
70
+ cd mcli_rust
71
+ cargo test
72
+
73
+ test-python:
74
+ name: Test Python Package
75
+ runs-on: ${{ matrix.os }}
76
+ strategy:
77
+ matrix:
78
+ os: [ubuntu-latest, macos-latest]
79
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
80
+
81
+ steps:
82
+ - name: Checkout code
83
+ uses: actions/checkout@v4
84
+
85
+ - name: Set up Python
86
+ uses: actions/setup-python@v4
87
+ with:
88
+ python-version: ${{ matrix.python-version }}
89
+
90
+ - name: Install system dependencies
91
+ if: matrix.os == 'ubuntu-latest'
92
+ run: |
93
+ sudo apt-get update
94
+ sudo apt-get install -y build-essential
95
+
96
+ - name: Set up Rust (for building extensions)
97
+ uses: dtolnay/rust-toolchain@stable
98
+
99
+ - name: Install Python dependencies
100
+ run: |
101
+ python -m pip install --upgrade pip
102
+ pip install maturin
103
+ pip install -e .[dev]
104
+
105
+ - name: Build Rust extensions
106
+ run: |
107
+ cd mcli_rust
108
+ maturin develop
109
+
110
+ - name: Run Python tests
111
+ run: |
112
+ pytest tests/ -v --tb=short
113
+
114
+ - name: Test CLI functionality
115
+ run: |
116
+ mcli version
117
+ mcli --help
118
+ mcli self --help
119
+ mcli visual --help
120
+
121
+ integration-test:
122
+ name: Integration Tests
123
+ runs-on: ubuntu-latest
124
+ needs: [test-python, test-rust]
125
+
126
+ steps:
127
+ - name: Checkout code
128
+ uses: actions/checkout@v4
129
+
130
+ - name: Set up Python
131
+ uses: actions/setup-python@v4
132
+ with:
133
+ python-version: ${{ env.PYTHON_VERSION }}
134
+
135
+ - name: Set up Rust
136
+ uses: dtolnay/rust-toolchain@stable
137
+
138
+ - name: Install dependencies
139
+ run: |
140
+ python -m pip install --upgrade pip
141
+ pip install maturin
142
+ pip install -e .[dev]
143
+
144
+ - name: Build Rust extensions
145
+ run: |
146
+ cd mcli_rust
147
+ maturin develop
148
+
149
+ - name: Test Rust-Python integration
150
+ run: |
151
+ python -c "
152
+ import mcli_rust
153
+ print('✅ Rust extensions imported successfully')
154
+
155
+ # Test TF-IDF
156
+ vectorizer = mcli_rust.TfIdfVectorizer()
157
+ docs = ['hello world', 'rust is fast', 'python integration']
158
+ vectors = vectorizer.fit_transform(docs)
159
+ print(f'✅ TF-IDF: Generated {len(vectors)} vectors')
160
+
161
+ # Test File Watcher
162
+ watcher = mcli_rust.FileWatcher()
163
+ print('✅ File Watcher: Created successfully')
164
+
165
+ # Test Command Matcher
166
+ matcher = mcli_rust.CommandMatcher()
167
+ print('✅ Command Matcher: Created successfully')
168
+
169
+ # Test Process Manager
170
+ manager = mcli_rust.ProcessManager()
171
+ print('✅ Process Manager: Created successfully')
172
+
173
+ print('🎉 All Rust extensions working!')
174
+ "
175
+
176
+ - name: Test performance monitoring
177
+ run: |
178
+ mcli self performance --detailed
179
+
180
+ - name: Test visual effects
181
+ run: |
182
+ mcli visual message --style success "Integration tests passed!"
183
+ mcli visual spinner --spinner-type rust --duration 2 --message "Testing spinner..."
184
+
185
+ security-scan:
186
+ name: Security Scan
187
+ runs-on: ubuntu-latest
188
+
189
+ steps:
190
+ - name: Checkout code
191
+ uses: actions/checkout@v4
192
+
193
+ - name: Run Trivy vulnerability scanner
194
+ uses: aquasecurity/trivy-action@master
195
+ with:
196
+ scan-type: 'fs'
197
+ scan-ref: '.'
198
+ format: 'sarif'
199
+ output: 'trivy-results.sarif'
200
+
201
+ - name: Upload Trivy scan results
202
+ uses: github/codeql-action/upload-sarif@v3
203
+ if: always()
204
+ continue-on-error: true
205
+ with:
206
+ sarif_file: 'trivy-results.sarif'
207
+
208
+ build-package:
209
+ name: Build Distribution Package
210
+ runs-on: ubuntu-latest
211
+ needs: [lint-and-format, test-python, test-rust, integration-test]
212
+
213
+ steps:
214
+ - name: Checkout code
215
+ uses: actions/checkout@v4
216
+
217
+ - name: Set up Python
218
+ uses: actions/setup-python@v4
219
+ with:
220
+ python-version: ${{ env.PYTHON_VERSION }}
221
+
222
+ - name: Set up Rust
223
+ uses: dtolnay/rust-toolchain@stable
224
+
225
+ - name: Install build dependencies
226
+ run: |
227
+ python -m pip install --upgrade pip
228
+ pip install build maturin
229
+
230
+ - name: Build Rust extensions
231
+ run: |
232
+ cd mcli_rust
233
+ maturin build --release
234
+
235
+ - name: Build Python package
236
+ run: |
237
+ python -m build
238
+
239
+ - name: Upload build artifacts
240
+ uses: actions/upload-artifact@v3
241
+ with:
242
+ name: dist-packages
243
+ path: |
244
+ dist/
245
+ mcli_rust/target/wheels/
246
+ retention-days: 7
@@ -0,0 +1,324 @@
1
+ name: ML System CI/CD Pipeline
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ paths:
7
+ - 'src/mcli/ml/**'
8
+ - 'tests/test_ml_*.py'
9
+ - 'pyproject.toml'
10
+ - '.github/workflows/ml-pipeline.yml'
11
+ pull_request:
12
+ branches: [ main ]
13
+ paths:
14
+ - 'src/mcli/ml/**'
15
+ - 'tests/test_ml_*.py'
16
+
17
+ env:
18
+ PYTHON_VERSION: '3.11'
19
+ UV_CACHE_DIR: /tmp/.uv-cache
20
+
21
+ jobs:
22
+ lint:
23
+ name: Lint and Format Check
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version: ${{ env.PYTHON_VERSION }}
32
+
33
+ - name: Install uv
34
+ uses: astral-sh/setup-uv@v2
35
+ with:
36
+ enable-cache: true
37
+ cache-dependency-glob: "pyproject.toml"
38
+
39
+ - name: Install dependencies
40
+ run: |
41
+ uv venv
42
+ uv pip install -e ".[dev,ml]"
43
+
44
+ - name: Run ruff linter
45
+ run: |
46
+ source .venv/bin/activate
47
+ ruff check src/mcli/ml tests/test_ml_*.py
48
+
49
+ - name: Run ruff formatter check
50
+ run: |
51
+ source .venv/bin/activate
52
+ ruff format --check src/mcli/ml tests/test_ml_*.py
53
+
54
+ - name: Run mypy type checking
55
+ run: |
56
+ source .venv/bin/activate
57
+ mypy src/mcli/ml --ignore-missing-imports
58
+
59
+ test:
60
+ name: Test Suite
61
+ runs-on: ${{ matrix.os }}
62
+ strategy:
63
+ fail-fast: false
64
+ matrix:
65
+ os: [ubuntu-latest, macos-latest]
66
+ python-version: ['3.10', '3.11', '3.12']
67
+
68
+ steps:
69
+ - uses: actions/checkout@v4
70
+
71
+ - name: Set up Python ${{ matrix.python-version }}
72
+ uses: actions/setup-python@v5
73
+ with:
74
+ python-version: ${{ matrix.python-version }}
75
+
76
+ - name: Install uv
77
+ uses: astral-sh/setup-uv@v2
78
+ with:
79
+ enable-cache: true
80
+ cache-dependency-glob: "pyproject.toml"
81
+
82
+ - name: Install dependencies
83
+ run: |
84
+ uv venv
85
+ uv pip install -e ".[dev,ml,test]"
86
+
87
+ - name: Run unit tests
88
+ run: |
89
+ source .venv/bin/activate
90
+ pytest tests/test_ml_*.py -v --cov=src/mcli/ml --cov-report=xml --cov-report=term
91
+
92
+ - name: Upload coverage to Codecov
93
+ uses: codecov/codecov-action@v3
94
+ with:
95
+ file: ./coverage.xml
96
+ flags: unittests
97
+ name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
98
+
99
+ integration-test:
100
+ name: Integration Tests
101
+ runs-on: ubuntu-latest
102
+ services:
103
+ postgres:
104
+ image: postgres:15
105
+ env:
106
+ POSTGRES_USER: ml_user
107
+ POSTGRES_PASSWORD: test_password
108
+ POSTGRES_DB: ml_test
109
+ ports:
110
+ - 5432:5432
111
+ options: >-
112
+ --health-cmd pg_isready
113
+ --health-interval 10s
114
+ --health-timeout 5s
115
+ --health-retries 5
116
+
117
+ redis:
118
+ image: redis:7
119
+ ports:
120
+ - 6379:6379
121
+ options: >-
122
+ --health-cmd "redis-cli ping"
123
+ --health-interval 10s
124
+ --health-timeout 5s
125
+ --health-retries 5
126
+
127
+ steps:
128
+ - uses: actions/checkout@v4
129
+
130
+ - name: Set up Python
131
+ uses: actions/setup-python@v5
132
+ with:
133
+ python-version: ${{ env.PYTHON_VERSION }}
134
+
135
+ - name: Install uv
136
+ uses: astral-sh/setup-uv@v2
137
+ with:
138
+ enable-cache: true
139
+
140
+ - name: Install dependencies
141
+ run: |
142
+ uv venv
143
+ uv pip install -e ".[dev,ml,test]"
144
+
145
+ - name: Set up test environment
146
+ run: |
147
+ cp .env.example .env.test
148
+ echo "DB_HOST=localhost" >> .env.test
149
+ echo "DB_PORT=5432" >> .env.test
150
+ echo "DB_NAME=ml_test" >> .env.test
151
+ echo "DB_USER=ml_user" >> .env.test
152
+ echo "DB_PASSWORD=test_password" >> .env.test
153
+ echo "REDIS_HOST=localhost" >> .env.test
154
+ echo "REDIS_PORT=6379" >> .env.test
155
+
156
+ - name: Run database migrations
157
+ run: |
158
+ source .venv/bin/activate
159
+ export DATABASE_URL=postgresql://ml_user:test_password@localhost:5432/ml_test
160
+ alembic upgrade head
161
+
162
+ - name: Run integration tests
163
+ run: |
164
+ source .venv/bin/activate
165
+ pytest tests/test_ml_*.py -v -m integration --env-file=.env.test
166
+
167
+ security:
168
+ name: Security Scan
169
+ runs-on: ubuntu-latest
170
+ steps:
171
+ - uses: actions/checkout@v4
172
+
173
+ - name: Set up Python
174
+ uses: actions/setup-python@v5
175
+ with:
176
+ python-version: ${{ env.PYTHON_VERSION }}
177
+
178
+ - name: Install uv
179
+ uses: astral-sh/setup-uv@v2
180
+
181
+ - name: Install dependencies
182
+ run: |
183
+ uv venv
184
+ uv pip install bandit safety
185
+
186
+ - name: Run bandit security scan
187
+ run: |
188
+ source .venv/bin/activate
189
+ bandit -r src/mcli/ml -f json -o bandit-report.json
190
+
191
+ - name: Run safety check
192
+ run: |
193
+ source .venv/bin/activate
194
+ safety check --json > safety-report.json || true
195
+
196
+ - name: Upload security reports
197
+ uses: actions/upload-artifact@v3
198
+ with:
199
+ name: security-reports
200
+ path: |
201
+ bandit-report.json
202
+ safety-report.json
203
+
204
+ build-docker:
205
+ name: Build Docker Image
206
+ runs-on: ubuntu-latest
207
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
208
+
209
+ steps:
210
+ - uses: actions/checkout@v4
211
+
212
+ - name: Set up Docker Buildx
213
+ uses: docker/setup-buildx-action@v3
214
+
215
+ - name: Log in to Docker Hub
216
+ uses: docker/login-action@v3
217
+ with:
218
+ username: ${{ secrets.DOCKER_USERNAME }}
219
+ password: ${{ secrets.DOCKER_PASSWORD }}
220
+
221
+ - name: Extract metadata
222
+ id: meta
223
+ uses: docker/metadata-action@v5
224
+ with:
225
+ images: ${{ secrets.DOCKER_USERNAME }}/mcli-ml
226
+ tags: |
227
+ type=ref,event=branch
228
+ type=ref,event=pr
229
+ type=semver,pattern={{version}}
230
+ type=semver,pattern={{major}}.{{minor}}
231
+ type=sha
232
+
233
+ - name: Build and push Docker image
234
+ uses: docker/build-push-action@v5
235
+ with:
236
+ context: .
237
+ file: ./docker/Dockerfile.ml
238
+ push: true
239
+ tags: ${{ steps.meta.outputs.tags }}
240
+ labels: ${{ steps.meta.outputs.labels }}
241
+ cache-from: type=gha
242
+ cache-to: type=gha,mode=max
243
+
244
+ deploy-staging:
245
+ name: Deploy to Staging
246
+ needs: [lint, test, integration-test, security]
247
+ runs-on: ubuntu-latest
248
+ if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
249
+ environment:
250
+ name: staging
251
+ url: https://staging.mcli-ml.example.com
252
+
253
+ steps:
254
+ - uses: actions/checkout@v4
255
+
256
+ - name: Deploy to staging environment
257
+ run: |
258
+ echo "Deploying to staging..."
259
+ # Add actual deployment commands here
260
+ # e.g., kubectl apply, terraform apply, etc.
261
+
262
+ deploy-production:
263
+ name: Deploy to Production
264
+ needs: [lint, test, integration-test, security, build-docker]
265
+ runs-on: ubuntu-latest
266
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
267
+ environment:
268
+ name: production
269
+ url: https://mcli-ml.example.com
270
+
271
+ steps:
272
+ - uses: actions/checkout@v4
273
+
274
+ - name: Deploy to production
275
+ run: |
276
+ echo "Deploying to production..."
277
+ # Add actual deployment commands here
278
+
279
+ - name: Run smoke tests
280
+ run: |
281
+ echo "Running smoke tests..."
282
+ # Add smoke test commands
283
+
284
+ - name: Notify deployment
285
+ if: always()
286
+ uses: 8398a7/action-slack@v3
287
+ with:
288
+ status: ${{ job.status }}
289
+ text: 'ML System deployment to production: ${{ job.status }}'
290
+ webhook_url: ${{ secrets.SLACK_WEBHOOK }}
291
+
292
+ performance-test:
293
+ name: Performance Testing
294
+ needs: [test]
295
+ runs-on: ubuntu-latest
296
+ if: github.event_name == 'pull_request'
297
+
298
+ steps:
299
+ - uses: actions/checkout@v4
300
+
301
+ - name: Set up Python
302
+ uses: actions/setup-python@v5
303
+ with:
304
+ python-version: ${{ env.PYTHON_VERSION }}
305
+
306
+ - name: Install uv
307
+ uses: astral-sh/setup-uv@v2
308
+
309
+ - name: Install dependencies
310
+ run: |
311
+ uv venv
312
+ uv pip install -e ".[dev,ml,test]"
313
+ uv pip install locust
314
+
315
+ - name: Run performance tests
316
+ run: |
317
+ source .venv/bin/activate
318
+ pytest tests/test_ml_*.py -v -m performance --benchmark-only
319
+
320
+ - name: Upload performance results
321
+ uses: actions/upload-artifact@v3
322
+ with:
323
+ name: performance-results
324
+ path: .benchmarks/