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.
- mcli_framework-7.0.0/.github/dependabot.yml +51 -0
- mcli_framework-7.0.0/.github/workflows/build.yml +102 -0
- mcli_framework-7.0.0/.github/workflows/ci.yml +246 -0
- mcli_framework-7.0.0/.github/workflows/ml-pipeline.yml +324 -0
- mcli_framework-7.0.0/.github/workflows/publish-self-hosted.yml +241 -0
- mcli_framework-7.0.0/.github/workflows/publish.yml +189 -0
- mcli_framework-7.0.0/.github/workflows/release.yml +91 -0
- mcli_framework-7.0.0/.github/workflows/security.yml +114 -0
- mcli_framework-7.0.0/.github/workflows/test.yml +149 -0
- mcli_framework-7.0.0/LICENSE +21 -0
- mcli_framework-7.0.0/MANIFEST.in +41 -0
- mcli_framework-7.0.0/PERFORMANCE_OPTIMIZATIONS.md +484 -0
- mcli_framework-7.0.0/PKG-INFO +479 -0
- mcli_framework-7.0.0/README.md +332 -0
- mcli_framework-7.0.0/mcli_rust/Cargo.toml +27 -0
- mcli_framework-7.0.0/mcli_rust/src/command_parser.rs +456 -0
- mcli_framework-7.0.0/mcli_rust/src/file_watcher.rs +303 -0
- mcli_framework-7.0.0/mcli_rust/src/lib.rs +20 -0
- mcli_framework-7.0.0/mcli_rust/src/process_manager.rs +458 -0
- mcli_framework-7.0.0/mcli_rust/src/tfidf.rs +268 -0
- mcli_framework-7.0.0/pyproject.toml +386 -0
- mcli_framework-7.0.0/setup.cfg +150 -0
- mcli_framework-7.0.0/src/mcli/app/chat_cmd.py +42 -0
- mcli_framework-7.0.0/src/mcli/app/commands_cmd.py +226 -0
- mcli_framework-7.0.0/src/mcli/app/completion_cmd.py +216 -0
- mcli_framework-7.0.0/src/mcli/app/completion_helpers.py +288 -0
- mcli_framework-7.0.0/src/mcli/app/cron_test_cmd.py +697 -0
- mcli_framework-7.0.0/src/mcli/app/logs_cmd.py +419 -0
- mcli_framework-7.0.0/src/mcli/app/main.py +492 -0
- mcli_framework-7.0.0/src/mcli/app/model/model.py +1060 -0
- mcli_framework-7.0.0/src/mcli/app/model_cmd.py +227 -0
- mcli_framework-7.0.0/src/mcli/app/redis_cmd.py +269 -0
- mcli_framework-7.0.0/src/mcli/app/video/video.py +1114 -0
- mcli_framework-7.0.0/src/mcli/app/visual_cmd.py +303 -0
- mcli_framework-7.0.0/src/mcli/chat/chat.py +2409 -0
- mcli_framework-7.0.0/src/mcli/chat/command_rag.py +514 -0
- mcli_framework-7.0.0/src/mcli/chat/enhanced_chat.py +652 -0
- mcli_framework-7.0.0/src/mcli/chat/system_controller.py +1010 -0
- mcli_framework-7.0.0/src/mcli/chat/system_integration.py +1016 -0
- mcli_framework-7.0.0/src/mcli/cli.py +25 -0
- mcli_framework-7.0.0/src/mcli/config.toml +20 -0
- mcli_framework-7.0.0/src/mcli/lib/api/api.py +586 -0
- mcli_framework-7.0.0/src/mcli/lib/api/daemon_client.py +203 -0
- mcli_framework-7.0.0/src/mcli/lib/api/daemon_client_local.py +44 -0
- mcli_framework-7.0.0/src/mcli/lib/api/daemon_decorator.py +217 -0
- mcli_framework-7.0.0/src/mcli/lib/api/mcli_decorators.py +1032 -0
- mcli_framework-7.0.0/src/mcli/lib/auth/auth.py +85 -0
- mcli_framework-7.0.0/src/mcli/lib/auth/aws_manager.py +85 -0
- mcli_framework-7.0.0/src/mcli/lib/auth/azure_manager.py +91 -0
- mcli_framework-7.0.0/src/mcli/lib/auth/credential_manager.py +192 -0
- mcli_framework-7.0.0/src/mcli/lib/auth/gcp_manager.py +93 -0
- mcli_framework-7.0.0/src/mcli/lib/auth/key_manager.py +117 -0
- mcli_framework-7.0.0/src/mcli/lib/auth/mcli_manager.py +93 -0
- mcli_framework-7.0.0/src/mcli/lib/auth/token_manager.py +75 -0
- mcli_framework-7.0.0/src/mcli/lib/auth/token_util.py +1011 -0
- mcli_framework-7.0.0/src/mcli/lib/config/config.py +47 -0
- mcli_framework-7.0.0/src/mcli/lib/discovery/__init__.py +1 -0
- mcli_framework-7.0.0/src/mcli/lib/discovery/command_discovery.py +274 -0
- mcli_framework-7.0.0/src/mcli/lib/erd/erd.py +1345 -0
- mcli_framework-7.0.0/src/mcli/lib/erd/generate_graph.py +453 -0
- mcli_framework-7.0.0/src/mcli/lib/files/files.py +76 -0
- mcli_framework-7.0.0/src/mcli/lib/fs/fs.py +109 -0
- mcli_framework-7.0.0/src/mcli/lib/lib.py +29 -0
- mcli_framework-7.0.0/src/mcli/lib/logger/logger.py +611 -0
- mcli_framework-7.0.0/src/mcli/lib/performance/optimizer.py +409 -0
- mcli_framework-7.0.0/src/mcli/lib/performance/rust_bridge.py +502 -0
- mcli_framework-7.0.0/src/mcli/lib/performance/uvloop_config.py +154 -0
- mcli_framework-7.0.0/src/mcli/lib/pickles/pickles.py +50 -0
- mcli_framework-7.0.0/src/mcli/lib/search/cached_vectorizer.py +479 -0
- mcli_framework-7.0.0/src/mcli/lib/services/data_pipeline.py +460 -0
- mcli_framework-7.0.0/src/mcli/lib/services/lsh_client.py +441 -0
- mcli_framework-7.0.0/src/mcli/lib/services/redis_service.py +387 -0
- mcli_framework-7.0.0/src/mcli/lib/shell/shell.py +137 -0
- mcli_framework-7.0.0/src/mcli/lib/toml/toml.py +33 -0
- mcli_framework-7.0.0/src/mcli/lib/ui/styling.py +47 -0
- mcli_framework-7.0.0/src/mcli/lib/ui/visual_effects.py +634 -0
- mcli_framework-7.0.0/src/mcli/lib/watcher/watcher.py +185 -0
- mcli_framework-7.0.0/src/mcli/ml/api/app.py +215 -0
- mcli_framework-7.0.0/src/mcli/ml/api/middleware.py +224 -0
- mcli_framework-7.0.0/src/mcli/ml/api/routers/admin_router.py +12 -0
- mcli_framework-7.0.0/src/mcli/ml/api/routers/auth_router.py +244 -0
- mcli_framework-7.0.0/src/mcli/ml/api/routers/backtest_router.py +12 -0
- mcli_framework-7.0.0/src/mcli/ml/api/routers/data_router.py +12 -0
- mcli_framework-7.0.0/src/mcli/ml/api/routers/model_router.py +302 -0
- mcli_framework-7.0.0/src/mcli/ml/api/routers/monitoring_router.py +12 -0
- mcli_framework-7.0.0/src/mcli/ml/api/routers/portfolio_router.py +12 -0
- mcli_framework-7.0.0/src/mcli/ml/api/routers/prediction_router.py +267 -0
- mcli_framework-7.0.0/src/mcli/ml/api/routers/trade_router.py +12 -0
- mcli_framework-7.0.0/src/mcli/ml/api/routers/websocket_router.py +76 -0
- mcli_framework-7.0.0/src/mcli/ml/api/schemas.py +64 -0
- mcli_framework-7.0.0/src/mcli/ml/auth/auth_manager.py +425 -0
- mcli_framework-7.0.0/src/mcli/ml/auth/models.py +154 -0
- mcli_framework-7.0.0/src/mcli/ml/auth/permissions.py +302 -0
- mcli_framework-7.0.0/src/mcli/ml/backtesting/backtest_engine.py +502 -0
- mcli_framework-7.0.0/src/mcli/ml/backtesting/performance_metrics.py +393 -0
- mcli_framework-7.0.0/src/mcli/ml/cache.py +400 -0
- mcli_framework-7.0.0/src/mcli/ml/cli/main.py +398 -0
- mcli_framework-7.0.0/src/mcli/ml/config/settings.py +394 -0
- mcli_framework-7.0.0/src/mcli/ml/configs/dvc_config.py +230 -0
- mcli_framework-7.0.0/src/mcli/ml/configs/mlflow_config.py +131 -0
- mcli_framework-7.0.0/src/mcli/ml/configs/mlops_manager.py +293 -0
- mcli_framework-7.0.0/src/mcli/ml/dashboard/app.py +532 -0
- mcli_framework-7.0.0/src/mcli/ml/dashboard/app_integrated.py +738 -0
- mcli_framework-7.0.0/src/mcli/ml/dashboard/app_supabase.py +560 -0
- mcli_framework-7.0.0/src/mcli/ml/dashboard/app_training.py +615 -0
- mcli_framework-7.0.0/src/mcli/ml/dashboard/cli.py +51 -0
- mcli_framework-7.0.0/src/mcli/ml/data_ingestion/api_connectors.py +501 -0
- mcli_framework-7.0.0/src/mcli/ml/data_ingestion/data_pipeline.py +567 -0
- mcli_framework-7.0.0/src/mcli/ml/data_ingestion/stream_processor.py +512 -0
- mcli_framework-7.0.0/src/mcli/ml/database/migrations/env.py +94 -0
- mcli_framework-7.0.0/src/mcli/ml/database/models.py +667 -0
- mcli_framework-7.0.0/src/mcli/ml/database/session.py +200 -0
- mcli_framework-7.0.0/src/mcli/ml/experimentation/ab_testing.py +845 -0
- mcli_framework-7.0.0/src/mcli/ml/features/ensemble_features.py +607 -0
- mcli_framework-7.0.0/src/mcli/ml/features/political_features.py +676 -0
- mcli_framework-7.0.0/src/mcli/ml/features/recommendation_engine.py +809 -0
- mcli_framework-7.0.0/src/mcli/ml/features/stock_features.py +573 -0
- mcli_framework-7.0.0/src/mcli/ml/features/test_feature_engineering.py +346 -0
- mcli_framework-7.0.0/src/mcli/ml/logging.py +85 -0
- mcli_framework-7.0.0/src/mcli/ml/mlops/data_versioning.py +518 -0
- mcli_framework-7.0.0/src/mcli/ml/mlops/experiment_tracker.py +377 -0
- mcli_framework-7.0.0/src/mcli/ml/mlops/model_serving.py +481 -0
- mcli_framework-7.0.0/src/mcli/ml/mlops/pipeline_orchestrator.py +614 -0
- mcli_framework-7.0.0/src/mcli/ml/models/base_models.py +324 -0
- mcli_framework-7.0.0/src/mcli/ml/models/ensemble_models.py +675 -0
- mcli_framework-7.0.0/src/mcli/ml/models/recommendation_models.py +474 -0
- mcli_framework-7.0.0/src/mcli/ml/models/test_models.py +487 -0
- mcli_framework-7.0.0/src/mcli/ml/monitoring/drift_detection.py +676 -0
- mcli_framework-7.0.0/src/mcli/ml/monitoring/metrics.py +45 -0
- mcli_framework-7.0.0/src/mcli/ml/optimization/portfolio_optimizer.py +834 -0
- mcli_framework-7.0.0/src/mcli/ml/preprocessing/data_cleaners.py +451 -0
- mcli_framework-7.0.0/src/mcli/ml/preprocessing/feature_extractors.py +491 -0
- mcli_framework-7.0.0/src/mcli/ml/preprocessing/ml_pipeline.py +382 -0
- mcli_framework-7.0.0/src/mcli/ml/preprocessing/politician_trading_preprocessor.py +569 -0
- mcli_framework-7.0.0/src/mcli/ml/preprocessing/test_preprocessing.py +294 -0
- mcli_framework-7.0.0/src/mcli/ml/scripts/populate_sample_data.py +200 -0
- mcli_framework-7.0.0/src/mcli/ml/tasks.py +400 -0
- mcli_framework-7.0.0/src/mcli/ml/tests/test_integration.py +429 -0
- mcli_framework-7.0.0/src/mcli/ml/tests/test_training_dashboard.py +387 -0
- mcli_framework-7.0.0/src/mcli/public/oi/oi.py +15 -0
- mcli_framework-7.0.0/src/mcli/public/public.py +4 -0
- mcli_framework-7.0.0/src/mcli/self/self_cmd.py +1246 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/api_daemon.py +800 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/async_command_database.py +681 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/async_process_manager.py +591 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/client.py +530 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/commands.py +1196 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/daemon.py +905 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/daemon_api.py +59 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/enhanced_daemon.py +571 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/process_cli.py +244 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/process_manager.py +439 -0
- mcli_framework-7.0.0/src/mcli/workflow/daemon/test_daemon.py +275 -0
- mcli_framework-7.0.0/src/mcli/workflow/dashboard/dashboard_cmd.py +113 -0
- mcli_framework-7.0.0/src/mcli/workflow/docker/docker.py +0 -0
- mcli_framework-7.0.0/src/mcli/workflow/file/file.py +100 -0
- mcli_framework-7.0.0/src/mcli/workflow/gcloud/config.toml +21 -0
- mcli_framework-7.0.0/src/mcli/workflow/gcloud/gcloud.py +58 -0
- mcli_framework-7.0.0/src/mcli/workflow/git_commit/ai_service.py +328 -0
- mcli_framework-7.0.0/src/mcli/workflow/git_commit/commands.py +430 -0
- mcli_framework-7.0.0/src/mcli/workflow/lsh_integration.py +355 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/client.py +594 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/download_and_run_efficient_models.py +288 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/lightweight_embedder.py +397 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/lightweight_model_server.py +714 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/lightweight_test.py +241 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/model_service.py +1955 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/ollama_efficient_runner.py +425 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/pdf_processor.py +386 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/test_efficient_runner.py +234 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/test_example.py +315 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/test_integration.py +131 -0
- mcli_framework-7.0.0/src/mcli/workflow/model_service/test_new_features.py +149 -0
- mcli_framework-7.0.0/src/mcli/workflow/openai/openai.py +99 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/commands.py +1790 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/config.py +134 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/connectivity.py +490 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/data_sources.py +395 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/database.py +410 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/demo.py +248 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/models.py +165 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/monitoring.py +413 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/scrapers.py +966 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/scrapers_california.py +412 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/scrapers_eu.py +377 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/scrapers_uk.py +350 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/scrapers_us_states.py +438 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/supabase_functions.py +354 -0
- mcli_framework-7.0.0/src/mcli/workflow/politician_trading/workflow.py +852 -0
- mcli_framework-7.0.0/src/mcli/workflow/registry/registry.py +180 -0
- mcli_framework-7.0.0/src/mcli/workflow/repo/repo.py +223 -0
- mcli_framework-7.0.0/src/mcli/workflow/scheduler/commands.py +493 -0
- mcli_framework-7.0.0/src/mcli/workflow/scheduler/cron_parser.py +238 -0
- mcli_framework-7.0.0/src/mcli/workflow/scheduler/job.py +182 -0
- mcli_framework-7.0.0/src/mcli/workflow/scheduler/monitor.py +139 -0
- mcli_framework-7.0.0/src/mcli/workflow/scheduler/persistence.py +324 -0
- mcli_framework-7.0.0/src/mcli/workflow/scheduler/scheduler.py +679 -0
- mcli_framework-7.0.0/src/mcli/workflow/sync/sync_cmd.py +437 -0
- mcli_framework-7.0.0/src/mcli/workflow/sync/test_cmd.py +314 -0
- mcli_framework-7.0.0/src/mcli/workflow/videos/videos.py +242 -0
- mcli_framework-7.0.0/src/mcli/workflow/wakatime/wakatime.py +11 -0
- mcli_framework-7.0.0/src/mcli/workflow/workflow.py +37 -0
- mcli_framework-7.0.0/src/mcli_framework.egg-info/PKG-INFO +479 -0
- mcli_framework-7.0.0/src/mcli_framework.egg-info/SOURCES.txt +263 -0
- mcli_framework-7.0.0/src/mcli_framework.egg-info/dependency_links.txt +1 -0
- mcli_framework-7.0.0/src/mcli_framework.egg-info/entry_points.txt +7 -0
- mcli_framework-7.0.0/src/mcli_framework.egg-info/requires.txt +120 -0
- mcli_framework-7.0.0/src/mcli_framework.egg-info/top_level.txt +1 -0
- mcli_framework-7.0.0/tests/conftest.py +130 -0
- mcli_framework-7.0.0/tests/demo_generate_graph.py +81 -0
- mcli_framework-7.0.0/tests/demo_hierarchical_transform.py +375 -0
- mcli_framework-7.0.0/tests/end_to_end_integration_test.py +425 -0
- mcli_framework-7.0.0/tests/pytest.ini +9 -0
- mcli_framework-7.0.0/tests/run_tests.py +77 -0
- mcli_framework-7.0.0/tests/simple_integration_test.py +163 -0
- mcli_framework-7.0.0/tests/test_agent_functionality.py +111 -0
- mcli_framework-7.0.0/tests/test_all_cli.py +7 -0
- mcli_framework-7.0.0/tests/test_auth.py +10 -0
- mcli_framework-7.0.0/tests/test_california_scraper.py +64 -0
- mcli_framework-7.0.0/tests/test_chat_client.py +299 -0
- mcli_framework-7.0.0/tests/test_chat_cmd.py +112 -0
- mcli_framework-7.0.0/tests/test_chat_system_control.py +136 -0
- mcli_framework-7.0.0/tests/test_command_discovery.py +295 -0
- mcli_framework-7.0.0/tests/test_congress_scraper.py +69 -0
- mcli_framework-7.0.0/tests/test_daemon.py +707 -0
- mcli_framework-7.0.0/tests/test_daemon_client.py +353 -0
- mcli_framework-7.0.0/tests/test_data_pipeline.py +645 -0
- mcli_framework-7.0.0/tests/test_enhanced_chat.py +276 -0
- mcli_framework-7.0.0/tests/test_erd.py +1336 -0
- mcli_framework-7.0.0/tests/test_erd_import.py +26 -0
- mcli_framework-7.0.0/tests/test_file.py +40 -0
- mcli_framework-7.0.0/tests/test_fix.py +35 -0
- mcli_framework-7.0.0/tests/test_fixed_issues.py +130 -0
- mcli_framework-7.0.0/tests/test_gcloud.py +58 -0
- mcli_framework-7.0.0/tests/test_generate_graph.py +11 -0
- mcli_framework-7.0.0/tests/test_generic_erd.py +221 -0
- mcli_framework-7.0.0/tests/test_harness.py +200 -0
- mcli_framework-7.0.0/tests/test_lib.py +9 -0
- mcli_framework-7.0.0/tests/test_lsh_client.py +432 -0
- mcli_framework-7.0.0/tests/test_lsh_integration.py +300 -0
- mcli_framework-7.0.0/tests/test_main_app.py +36 -0
- mcli_framework-7.0.0/tests/test_main_app_functions.py +144 -0
- mcli_framework-7.0.0/tests/test_ml_auth.py +391 -0
- mcli_framework-7.0.0/tests/test_ml_models.py +351 -0
- mcli_framework-7.0.0/tests/test_ml_pipeline.py +436 -0
- mcli_framework-7.0.0/tests/test_oi.py +10 -0
- mcli_framework-7.0.0/tests/test_optional_dependencies.py +105 -0
- mcli_framework-7.0.0/tests/test_politician_trading_integration.py +343 -0
- mcli_framework-7.0.0/tests/test_preprocessing_simple.py +156 -0
- mcli_framework-7.0.0/tests/test_registry.py +117 -0
- mcli_framework-7.0.0/tests/test_repo.py +59 -0
- mcli_framework-7.0.0/tests/test_rich.py +19 -0
- mcli_framework-7.0.0/tests/test_self.py +80 -0
- mcli_framework-7.0.0/tests/test_uk_scraper.py +64 -0
- mcli_framework-7.0.0/tests/test_us_states_scraper.py +75 -0
- mcli_framework-7.0.0/tests/test_utility_functions.py +343 -0
- mcli_framework-7.0.0/tests/test_utility_functions_simple.py +107 -0
- mcli_framework-7.0.0/tests/test_uv_compatibility.py +204 -0
- mcli_framework-7.0.0/tests/test_videos.py +52 -0
- mcli_framework-7.0.0/tests/test_wakatime.py +10 -0
- mcli_framework-7.0.0/tests/test_webapp.py +7 -0
- mcli_framework-7.0.0/tests/test_webapp_comprehensive.py +7 -0
- mcli_framework-7.0.0/tests/test_workflow.py +7 -0
- 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/
|