mcli-framework 7.0.4__tar.gz → 7.0.6__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.4 → mcli_framework-7.0.6}/PKG-INFO +1 -1
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/pyproject.toml +1 -1
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/self/self_cmd.py +27 -13
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli_framework.egg-info/PKG-INFO +1 -1
- mcli_framework-7.0.6/tests/test_self.py +469 -0
- mcli_framework-7.0.4/tests/test_self.py +0 -80
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/.github/dependabot.yml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/.github/workflows/build.yml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/.github/workflows/ci.yml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/.github/workflows/ml-pipeline.yml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/.github/workflows/publish-self-hosted.yml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/.github/workflows/publish.yml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/.github/workflows/release.yml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/.github/workflows/security.yml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/.github/workflows/test.yml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/LICENSE +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/MANIFEST.in +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/PERFORMANCE_OPTIMIZATIONS.md +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/README.md +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/mcli_rust/Cargo.toml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/mcli_rust/src/command_parser.rs +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/mcli_rust/src/file_watcher.rs +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/mcli_rust/src/lib.rs +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/mcli_rust/src/process_manager.rs +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/mcli_rust/src/tfidf.rs +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/setup.cfg +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/chat_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/commands_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/completion_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/completion_helpers.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/cron_test_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/logs_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/main.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/model/model.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/model_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/redis_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/video/video.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/app/visual_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/chat/chat.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/chat/command_rag.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/chat/enhanced_chat.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/chat/system_controller.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/chat/system_integration.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/cli.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/config.toml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/api/api.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/api/daemon_client.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/api/daemon_client_local.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/api/daemon_decorator.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/api/mcli_decorators.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/auth/auth.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/auth/aws_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/auth/azure_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/auth/credential_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/auth/gcp_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/auth/key_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/auth/mcli_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/auth/token_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/auth/token_util.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/config/config.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/discovery/__init__.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/discovery/command_discovery.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/erd/erd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/erd/generate_graph.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/files/files.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/fs/fs.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/lib.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/logger/logger.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/paths.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/performance/optimizer.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/performance/rust_bridge.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/performance/uvloop_config.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/pickles/pickles.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/search/cached_vectorizer.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/services/data_pipeline.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/services/lsh_client.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/services/redis_service.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/shell/shell.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/toml/toml.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/ui/styling.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/ui/visual_effects.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/lib/watcher/watcher.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/app.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/middleware.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/routers/admin_router.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/routers/auth_router.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/routers/backtest_router.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/routers/data_router.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/routers/model_router.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/routers/monitoring_router.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/routers/portfolio_router.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/routers/prediction_router.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/routers/trade_router.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/routers/websocket_router.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/api/schemas.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/auth/auth_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/auth/models.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/auth/permissions.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/backtesting/backtest_engine.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/backtesting/performance_metrics.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/cache.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/cli/main.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/config/settings.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/configs/dvc_config.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/configs/mlflow_config.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/configs/mlops_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/dashboard/app.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/dashboard/app_integrated.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/dashboard/app_supabase.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/dashboard/app_training.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/dashboard/cli.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/data_ingestion/api_connectors.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/data_ingestion/data_pipeline.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/data_ingestion/stream_processor.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/database/migrations/env.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/database/models.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/database/session.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/experimentation/ab_testing.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/features/ensemble_features.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/features/political_features.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/features/recommendation_engine.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/features/stock_features.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/features/test_feature_engineering.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/logging.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/mlops/data_versioning.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/mlops/experiment_tracker.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/mlops/model_serving.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/mlops/pipeline_orchestrator.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/models/base_models.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/models/ensemble_models.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/models/recommendation_models.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/models/test_models.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/monitoring/drift_detection.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/monitoring/metrics.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/optimization/portfolio_optimizer.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/preprocessing/data_cleaners.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/preprocessing/feature_extractors.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/preprocessing/ml_pipeline.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/preprocessing/politician_trading_preprocessor.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/preprocessing/test_preprocessing.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/scripts/populate_sample_data.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/tasks.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/tests/test_integration.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/ml/tests/test_training_dashboard.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/public/oi/oi.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/public/public.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/api_daemon.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/async_command_database.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/async_process_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/client.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/commands.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/daemon.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/daemon_api.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/enhanced_daemon.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/process_cli.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/process_manager.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/daemon/test_daemon.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/dashboard/dashboard_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/docker/docker.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/file/file.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/gcloud/config.toml +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/gcloud/gcloud.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/git_commit/ai_service.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/git_commit/commands.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/lsh_integration.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/client.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/download_and_run_efficient_models.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/lightweight_embedder.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/lightweight_model_server.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/lightweight_test.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/model_service.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/ollama_efficient_runner.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/pdf_processor.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/test_efficient_runner.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/test_example.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/test_integration.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/model_service/test_new_features.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/openai/openai.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/commands.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/config.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/connectivity.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/data_sources.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/database.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/demo.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/models.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/monitoring.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/scrapers.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/scrapers_california.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/scrapers_eu.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/scrapers_uk.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/scrapers_us_states.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/supabase_functions.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/politician_trading/workflow.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/registry/registry.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/repo/repo.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/scheduler/commands.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/scheduler/cron_parser.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/scheduler/job.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/scheduler/monitor.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/scheduler/persistence.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/scheduler/scheduler.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/sync/sync_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/sync/test_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/videos/videos.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/wakatime/wakatime.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli/workflow/workflow.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli_framework.egg-info/SOURCES.txt +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli_framework.egg-info/dependency_links.txt +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli_framework.egg-info/entry_points.txt +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli_framework.egg-info/requires.txt +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/src/mcli_framework.egg-info/top_level.txt +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/conftest.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/demo_generate_graph.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/demo_hierarchical_transform.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/end_to_end_integration_test.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/pytest.ini +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/run_tests.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/simple_integration_test.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_agent_functionality.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_all_cli.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_auth.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_california_scraper.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_chat_client.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_chat_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_chat_system_control.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_command_discovery.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_congress_scraper.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_daemon.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_daemon_client.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_data_pipeline.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_enhanced_chat.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_erd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_erd_import.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_file.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_fix.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_fixed_issues.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_gcloud.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_generate_graph.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_generic_erd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_harness.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_lib.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_lsh_client.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_lsh_integration.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_main_app.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_main_app_functions.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_ml_auth.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_ml_models.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_ml_pipeline.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_model_cmd.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_oi.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_optional_dependencies.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_politician_trading_integration.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_preprocessing_simple.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_registry.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_repo.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_rich.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_uk_scraper.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_us_states_scraper.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_utility_functions.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_utility_functions_simple.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_uv_compatibility.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_videos.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_wakatime.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_webapp.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_webapp_comprehensive.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_workflow.py +0 -0
- {mcli_framework-7.0.4 → mcli_framework-7.0.6}/tests/test_workflow_integration.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcli-framework
|
|
3
|
-
Version: 7.0.
|
|
3
|
+
Version: 7.0.6
|
|
4
4
|
Summary: 🚀 High-performance CLI framework with Rust extensions, AI chat, and stunning visuals
|
|
5
5
|
Author-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
6
6
|
Maintainer-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
@@ -774,18 +774,15 @@ def logs(type: str, lines: int, follow: bool, date: str, grep: str, level: str):
|
|
|
774
774
|
from datetime import datetime
|
|
775
775
|
from pathlib import Path
|
|
776
776
|
|
|
777
|
-
#
|
|
778
|
-
|
|
779
|
-
# Go up 5 levels: file -> self -> mcli -> src -> repo_root
|
|
780
|
-
project_root = current_file.parents[4]
|
|
781
|
-
logs_dir = project_root / "logs"
|
|
777
|
+
# Import get_logs_dir to get the correct logs directory
|
|
778
|
+
from mcli.lib.paths import get_logs_dir
|
|
782
779
|
|
|
783
|
-
#
|
|
784
|
-
|
|
785
|
-
logs_dir = Path.cwd() / "logs"
|
|
780
|
+
# Get the logs directory (creates it if it doesn't exist)
|
|
781
|
+
logs_dir = get_logs_dir()
|
|
786
782
|
|
|
787
783
|
if not logs_dir.exists():
|
|
788
784
|
click.echo("❌ Logs directory not found", err=True)
|
|
785
|
+
click.echo(f"Expected location: {logs_dir}", err=True)
|
|
789
786
|
return
|
|
790
787
|
|
|
791
788
|
# Determine which log files to read
|
|
@@ -1275,16 +1272,33 @@ def update(check: bool, pre: bool, yes: bool, skip_ci_check: bool):
|
|
|
1275
1272
|
# Install update
|
|
1276
1273
|
console.print(f"[cyan]📦 Installing mcli {latest_version}...[/cyan]")
|
|
1277
1274
|
|
|
1278
|
-
#
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1275
|
+
# Detect if we're running from a uv tool installation
|
|
1276
|
+
# uv tool installations are typically in ~/.local/share/uv/tools/
|
|
1277
|
+
is_uv_tool = ".local/share/uv/tools/" in sys.executable or \
|
|
1278
|
+
"\\AppData\\Local\\uv\\tools\\" in sys.executable
|
|
1279
|
+
|
|
1280
|
+
if is_uv_tool:
|
|
1281
|
+
# Use uv tool install for uv tool environments
|
|
1282
|
+
console.print("[dim]Detected uv tool installation, using 'uv tool install'[/dim]")
|
|
1283
|
+
cmd = ["uv", "tool", "install", "--force", "mcli-framework"]
|
|
1284
|
+
if pre:
|
|
1285
|
+
# For pre-releases, we'd need to specify the version explicitly
|
|
1286
|
+
# For now, --pre is not supported with uv tool install in this context
|
|
1287
|
+
console.print("[yellow]⚠️ Pre-release flag not supported with uv tool install[/yellow]")
|
|
1288
|
+
else:
|
|
1289
|
+
# Use pip to upgrade for regular installations
|
|
1290
|
+
cmd = [sys.executable, "-m", "pip", "install", "--upgrade", "mcli-framework"]
|
|
1291
|
+
if pre:
|
|
1292
|
+
cmd.append("--pre")
|
|
1282
1293
|
|
|
1283
1294
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
|
1284
1295
|
|
|
1285
1296
|
if result.returncode == 0:
|
|
1286
1297
|
console.print(f"[green]✅ Successfully updated to mcli {latest_version}![/green]")
|
|
1287
|
-
|
|
1298
|
+
if is_uv_tool:
|
|
1299
|
+
console.print("[yellow]ℹ️ Run 'hash -r' to refresh your shell's command cache[/yellow]")
|
|
1300
|
+
else:
|
|
1301
|
+
console.print("[yellow]ℹ️ Restart your terminal or run 'hash -r' to use the new version[/yellow]")
|
|
1288
1302
|
else:
|
|
1289
1303
|
console.print(f"[red]❌ Update failed:[/red]")
|
|
1290
1304
|
console.print(result.stderr)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcli-framework
|
|
3
|
-
Version: 7.0.
|
|
3
|
+
Version: 7.0.6
|
|
4
4
|
Summary: 🚀 High-performance CLI framework with Rust extensions, AI chat, and stunning visuals
|
|
5
5
|
Author-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
6
6
|
Maintainer-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
from click.testing import CliRunner
|
|
3
|
+
from mcli.self.self_cmd import self_app
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_self_group_help():
|
|
7
|
+
runner = CliRunner()
|
|
8
|
+
result = runner.invoke(self_app, ['--help'])
|
|
9
|
+
assert result.exit_code == 0
|
|
10
|
+
assert 'Manage and extend the mcli application' in result.output
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def test_search_help():
|
|
14
|
+
runner = CliRunner()
|
|
15
|
+
result = runner.invoke(self_app, ['search', '--help'])
|
|
16
|
+
assert result.exit_code == 0
|
|
17
|
+
assert 'Usage:' in result.output
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def test_add_command_help():
|
|
21
|
+
runner = CliRunner()
|
|
22
|
+
result = runner.invoke(self_app, ['add-command', '--help'])
|
|
23
|
+
assert result.exit_code == 0
|
|
24
|
+
assert 'Generate a new command template' in result.output
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def test_add_command_missing_required():
|
|
28
|
+
runner = CliRunner()
|
|
29
|
+
result = runner.invoke(self_app, ['add-command'])
|
|
30
|
+
assert result.exit_code != 0
|
|
31
|
+
assert 'Missing argument' in result.output
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def test_plugin_help():
|
|
35
|
+
runner = CliRunner()
|
|
36
|
+
result = runner.invoke(self_app, ['plugin', '--help'])
|
|
37
|
+
assert result.exit_code == 0
|
|
38
|
+
assert 'Manage plugins for mcli' in result.output
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def test_plugin_add_help():
|
|
42
|
+
runner = CliRunner()
|
|
43
|
+
result = runner.invoke(self_app, ['plugin', 'add', '--help'])
|
|
44
|
+
assert result.exit_code == 0
|
|
45
|
+
assert 'PLUGIN_NAME' in result.output
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def test_plugin_add_missing_required():
|
|
49
|
+
runner = CliRunner()
|
|
50
|
+
result = runner.invoke(self_app, ['plugin', 'add'])
|
|
51
|
+
assert result.exit_code != 0
|
|
52
|
+
assert 'Missing argument' in result.output
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def test_plugin_remove_help():
|
|
56
|
+
runner = CliRunner()
|
|
57
|
+
result = runner.invoke(self_app, ['plugin', 'remove', '--help'])
|
|
58
|
+
assert result.exit_code == 0
|
|
59
|
+
assert 'PLUGIN_NAME' in result.output
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def test_plugin_remove_missing_required():
|
|
63
|
+
runner = CliRunner()
|
|
64
|
+
result = runner.invoke(self_app, ['plugin', 'remove'])
|
|
65
|
+
assert result.exit_code != 0
|
|
66
|
+
assert 'Missing argument' in result.output
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def test_plugin_update_help():
|
|
70
|
+
runner = CliRunner()
|
|
71
|
+
result = runner.invoke(self_app, ['plugin', 'update', '--help'])
|
|
72
|
+
assert result.exit_code == 0
|
|
73
|
+
assert 'PLUGIN_NAME' in result.output
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def test_plugin_update_missing_required():
|
|
77
|
+
runner = CliRunner()
|
|
78
|
+
result = runner.invoke(self_app, ['plugin', 'update'])
|
|
79
|
+
assert result.exit_code != 0
|
|
80
|
+
assert 'Missing argument' in result.output
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def test_logs_help():
|
|
84
|
+
"""Test that logs command shows help text"""
|
|
85
|
+
runner = CliRunner()
|
|
86
|
+
result = runner.invoke(self_app, ['logs', '--help'])
|
|
87
|
+
assert result.exit_code == 0
|
|
88
|
+
assert 'Display runtime logs' in result.output
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def test_logs_uses_correct_directory():
|
|
92
|
+
"""Test that logs command uses get_logs_dir() from mcli.lib.paths"""
|
|
93
|
+
from mcli.lib.paths import get_logs_dir
|
|
94
|
+
from pathlib import Path
|
|
95
|
+
import tempfile
|
|
96
|
+
|
|
97
|
+
runner = CliRunner()
|
|
98
|
+
|
|
99
|
+
# Get the expected logs directory
|
|
100
|
+
expected_logs_dir = get_logs_dir()
|
|
101
|
+
|
|
102
|
+
# The logs directory should be in ~/.mcli/logs
|
|
103
|
+
assert expected_logs_dir.exists()
|
|
104
|
+
assert str(expected_logs_dir).endswith('.mcli/logs') or str(expected_logs_dir).endswith('.mcli\\logs')
|
|
105
|
+
|
|
106
|
+
# Run the logs command - it should not error even if no log files exist
|
|
107
|
+
# (it will just show no logs, which is fine)
|
|
108
|
+
result = runner.invoke(self_app, ['logs'])
|
|
109
|
+
|
|
110
|
+
# Should not show "Logs directory not found" error
|
|
111
|
+
assert 'Logs directory not found' not in result.output
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def test_update_help():
|
|
115
|
+
"""Test that update command shows help text"""
|
|
116
|
+
runner = CliRunner()
|
|
117
|
+
result = runner.invoke(self_app, ['update', '--help'])
|
|
118
|
+
assert result.exit_code == 0
|
|
119
|
+
assert 'Check for and install mcli updates' in result.output
|
|
120
|
+
assert '--check' in result.output
|
|
121
|
+
assert '--yes' in result.output
|
|
122
|
+
assert '--skip-ci-check' in result.output
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
@pytest.fixture
|
|
126
|
+
def mock_pypi_response():
|
|
127
|
+
"""Mock PyPI API response"""
|
|
128
|
+
return {
|
|
129
|
+
"info": {
|
|
130
|
+
"version": "7.0.5",
|
|
131
|
+
"project_urls": {
|
|
132
|
+
"Changelog": "https://github.com/gwicho38/mcli/releases"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"releases": {
|
|
136
|
+
"7.0.4": [],
|
|
137
|
+
"7.0.5": []
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def test_update_check_already_latest(mock_pypi_response):
|
|
143
|
+
"""Test update --check when already on latest version"""
|
|
144
|
+
from unittest.mock import patch, Mock
|
|
145
|
+
|
|
146
|
+
runner = CliRunner()
|
|
147
|
+
|
|
148
|
+
with patch('importlib.metadata.version') as mock_version, \
|
|
149
|
+
patch('requests.get') as mock_get:
|
|
150
|
+
|
|
151
|
+
# Mock current version same as latest
|
|
152
|
+
mock_version.return_value = "7.0.5"
|
|
153
|
+
|
|
154
|
+
# Mock PyPI response
|
|
155
|
+
mock_response = Mock()
|
|
156
|
+
mock_response.status_code = 200
|
|
157
|
+
mock_response.json.return_value = mock_pypi_response
|
|
158
|
+
mock_response.raise_for_status = Mock()
|
|
159
|
+
mock_get.return_value = mock_response
|
|
160
|
+
|
|
161
|
+
result = runner.invoke(self_app, ['update', '--check'])
|
|
162
|
+
|
|
163
|
+
assert result.exit_code == 0
|
|
164
|
+
assert "already on the latest version" in result.output.lower()
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
def test_update_check_update_available(mock_pypi_response):
|
|
168
|
+
"""Test update --check when update is available"""
|
|
169
|
+
from unittest.mock import patch, Mock
|
|
170
|
+
|
|
171
|
+
runner = CliRunner()
|
|
172
|
+
|
|
173
|
+
with patch('importlib.metadata.version') as mock_version, \
|
|
174
|
+
patch('requests.get') as mock_get:
|
|
175
|
+
|
|
176
|
+
# Mock current version older than latest
|
|
177
|
+
mock_version.return_value = "7.0.4"
|
|
178
|
+
|
|
179
|
+
# Mock PyPI response
|
|
180
|
+
mock_response = Mock()
|
|
181
|
+
mock_response.status_code = 200
|
|
182
|
+
mock_response.json.return_value = mock_pypi_response
|
|
183
|
+
mock_response.raise_for_status = Mock()
|
|
184
|
+
mock_get.return_value = mock_response
|
|
185
|
+
|
|
186
|
+
result = runner.invoke(self_app, ['update', '--check'])
|
|
187
|
+
|
|
188
|
+
assert result.exit_code == 0
|
|
189
|
+
assert "Update available" in result.output or "7.0.4" in result.output
|
|
190
|
+
assert "7.0.5" in result.output
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def test_update_install_with_yes_flag(mock_pypi_response):
|
|
194
|
+
"""Test update installation with --yes flag"""
|
|
195
|
+
from unittest.mock import patch, Mock
|
|
196
|
+
|
|
197
|
+
runner = CliRunner()
|
|
198
|
+
|
|
199
|
+
with patch('importlib.metadata.version') as mock_version, \
|
|
200
|
+
patch('requests.get') as mock_get, \
|
|
201
|
+
patch('subprocess.run') as mock_subprocess, \
|
|
202
|
+
patch('mcli.self.self_cmd.check_ci_status') as mock_ci:
|
|
203
|
+
|
|
204
|
+
# Mock current version older than latest
|
|
205
|
+
mock_version.return_value = "7.0.4"
|
|
206
|
+
|
|
207
|
+
# Mock PyPI response
|
|
208
|
+
mock_response = Mock()
|
|
209
|
+
mock_response.status_code = 200
|
|
210
|
+
mock_response.json.return_value = mock_pypi_response
|
|
211
|
+
mock_response.raise_for_status = Mock()
|
|
212
|
+
mock_get.return_value = mock_response
|
|
213
|
+
|
|
214
|
+
# Mock CI passing
|
|
215
|
+
mock_ci.return_value = (True, None)
|
|
216
|
+
|
|
217
|
+
# Mock successful subprocess
|
|
218
|
+
mock_result = Mock()
|
|
219
|
+
mock_result.returncode = 0
|
|
220
|
+
mock_result.stderr = ""
|
|
221
|
+
mock_subprocess.return_value = mock_result
|
|
222
|
+
|
|
223
|
+
result = runner.invoke(self_app, ['update', '--yes'])
|
|
224
|
+
|
|
225
|
+
assert result.exit_code == 0
|
|
226
|
+
assert "Successfully updated" in result.output or "Installing" in result.output
|
|
227
|
+
mock_subprocess.assert_called_once()
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def test_update_cancelled_by_user(mock_pypi_response):
|
|
231
|
+
"""Test update when user cancels at confirmation"""
|
|
232
|
+
from unittest.mock import patch, Mock
|
|
233
|
+
|
|
234
|
+
runner = CliRunner()
|
|
235
|
+
|
|
236
|
+
with patch('importlib.metadata.version') as mock_version, \
|
|
237
|
+
patch('requests.get') as mock_get, \
|
|
238
|
+
patch('mcli.self.self_cmd.check_ci_status') as mock_ci:
|
|
239
|
+
|
|
240
|
+
# Mock current version older than latest
|
|
241
|
+
mock_version.return_value = "7.0.4"
|
|
242
|
+
|
|
243
|
+
# Mock PyPI response
|
|
244
|
+
mock_response = Mock()
|
|
245
|
+
mock_response.status_code = 200
|
|
246
|
+
mock_response.json.return_value = mock_pypi_response
|
|
247
|
+
mock_response.raise_for_status = Mock()
|
|
248
|
+
mock_get.return_value = mock_response
|
|
249
|
+
|
|
250
|
+
# Mock CI passing
|
|
251
|
+
mock_ci.return_value = (True, None)
|
|
252
|
+
|
|
253
|
+
# User says no to update
|
|
254
|
+
result = runner.invoke(self_app, ['update'], input='n\n')
|
|
255
|
+
|
|
256
|
+
assert result.exit_code == 0
|
|
257
|
+
assert "cancelled" in result.output.lower()
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
def test_update_ci_check_failing(mock_pypi_response):
|
|
261
|
+
"""Test update blocked when CI is failing"""
|
|
262
|
+
from unittest.mock import patch, Mock
|
|
263
|
+
|
|
264
|
+
runner = CliRunner()
|
|
265
|
+
|
|
266
|
+
with patch('importlib.metadata.version') as mock_version, \
|
|
267
|
+
patch('requests.get') as mock_get, \
|
|
268
|
+
patch('mcli.self.self_cmd.check_ci_status') as mock_ci:
|
|
269
|
+
|
|
270
|
+
# Mock current version older than latest
|
|
271
|
+
mock_version.return_value = "7.0.4"
|
|
272
|
+
|
|
273
|
+
# Mock PyPI response
|
|
274
|
+
mock_response = Mock()
|
|
275
|
+
mock_response.status_code = 200
|
|
276
|
+
mock_response.json.return_value = mock_pypi_response
|
|
277
|
+
mock_response.raise_for_status = Mock()
|
|
278
|
+
mock_get.return_value = mock_response
|
|
279
|
+
|
|
280
|
+
# Mock CI failing
|
|
281
|
+
mock_ci.return_value = (False, "https://github.com/gwicho38/mcli/actions/runs/123")
|
|
282
|
+
|
|
283
|
+
result = runner.invoke(self_app, ['update', '--yes'])
|
|
284
|
+
|
|
285
|
+
assert result.exit_code == 0
|
|
286
|
+
assert "CI build is failing" in result.output or "blocked" in result.output.lower()
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
def test_update_skip_ci_check(mock_pypi_response):
|
|
290
|
+
"""Test update with --skip-ci-check flag"""
|
|
291
|
+
from unittest.mock import patch, Mock
|
|
292
|
+
|
|
293
|
+
runner = CliRunner()
|
|
294
|
+
|
|
295
|
+
with patch('importlib.metadata.version') as mock_version, \
|
|
296
|
+
patch('requests.get') as mock_get, \
|
|
297
|
+
patch('subprocess.run') as mock_subprocess, \
|
|
298
|
+
patch('mcli.self.self_cmd.check_ci_status') as mock_ci:
|
|
299
|
+
|
|
300
|
+
# Mock current version older than latest
|
|
301
|
+
mock_version.return_value = "7.0.4"
|
|
302
|
+
|
|
303
|
+
# Mock PyPI response
|
|
304
|
+
mock_response = Mock()
|
|
305
|
+
mock_response.status_code = 200
|
|
306
|
+
mock_response.json.return_value = mock_pypi_response
|
|
307
|
+
mock_response.raise_for_status = Mock()
|
|
308
|
+
mock_get.return_value = mock_response
|
|
309
|
+
|
|
310
|
+
# Mock successful subprocess
|
|
311
|
+
mock_result = Mock()
|
|
312
|
+
mock_result.returncode = 0
|
|
313
|
+
mock_result.stderr = ""
|
|
314
|
+
mock_subprocess.return_value = mock_result
|
|
315
|
+
|
|
316
|
+
result = runner.invoke(self_app, ['update', '--yes', '--skip-ci-check'])
|
|
317
|
+
|
|
318
|
+
assert result.exit_code == 0
|
|
319
|
+
# CI check should not be called when --skip-ci-check is used
|
|
320
|
+
mock_ci.assert_not_called()
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
def test_update_pypi_connection_error(mock_pypi_response):
|
|
324
|
+
"""Test update when PyPI connection fails"""
|
|
325
|
+
from unittest.mock import patch, Mock
|
|
326
|
+
import requests
|
|
327
|
+
|
|
328
|
+
runner = CliRunner()
|
|
329
|
+
|
|
330
|
+
with patch('importlib.metadata.version') as mock_version, \
|
|
331
|
+
patch('requests.get') as mock_get:
|
|
332
|
+
|
|
333
|
+
mock_version.return_value = "7.0.4"
|
|
334
|
+
|
|
335
|
+
# Mock connection error
|
|
336
|
+
mock_get.side_effect = requests.RequestException("Connection failed")
|
|
337
|
+
|
|
338
|
+
result = runner.invoke(self_app, ['update', '--check'])
|
|
339
|
+
|
|
340
|
+
assert result.exit_code == 0
|
|
341
|
+
assert "Error fetching version info" in result.output or "Error" in result.output
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def test_update_installation_failure(mock_pypi_response):
|
|
345
|
+
"""Test update when pip installation fails"""
|
|
346
|
+
from unittest.mock import patch, Mock
|
|
347
|
+
|
|
348
|
+
runner = CliRunner()
|
|
349
|
+
|
|
350
|
+
with patch('importlib.metadata.version') as mock_version, \
|
|
351
|
+
patch('requests.get') as mock_get, \
|
|
352
|
+
patch('subprocess.run') as mock_subprocess, \
|
|
353
|
+
patch('mcli.self.self_cmd.check_ci_status') as mock_ci:
|
|
354
|
+
|
|
355
|
+
# Mock current version older than latest
|
|
356
|
+
mock_version.return_value = "7.0.4"
|
|
357
|
+
|
|
358
|
+
# Mock PyPI response
|
|
359
|
+
mock_response = Mock()
|
|
360
|
+
mock_response.status_code = 200
|
|
361
|
+
mock_response.json.return_value = mock_pypi_response
|
|
362
|
+
mock_response.raise_for_status = Mock()
|
|
363
|
+
mock_get.return_value = mock_response
|
|
364
|
+
|
|
365
|
+
# Mock CI passing
|
|
366
|
+
mock_ci.return_value = (True, None)
|
|
367
|
+
|
|
368
|
+
# Mock failed subprocess
|
|
369
|
+
mock_result = Mock()
|
|
370
|
+
mock_result.returncode = 1
|
|
371
|
+
mock_result.stderr = "Installation failed"
|
|
372
|
+
mock_subprocess.return_value = mock_result
|
|
373
|
+
|
|
374
|
+
result = runner.invoke(self_app, ['update', '--yes'])
|
|
375
|
+
|
|
376
|
+
assert result.exit_code == 0
|
|
377
|
+
assert "Update failed" in result.output or "failed" in result.output.lower()
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
def test_update_uses_uv_tool_when_detected(mock_pypi_response):
|
|
381
|
+
"""Test update uses 'uv tool install' when running from uv tool environment"""
|
|
382
|
+
from unittest.mock import patch, Mock
|
|
383
|
+
import sys
|
|
384
|
+
|
|
385
|
+
runner = CliRunner()
|
|
386
|
+
|
|
387
|
+
with patch('importlib.metadata.version') as mock_version, \
|
|
388
|
+
patch('requests.get') as mock_get, \
|
|
389
|
+
patch('subprocess.run') as mock_subprocess, \
|
|
390
|
+
patch('mcli.self.self_cmd.check_ci_status') as mock_ci, \
|
|
391
|
+
patch('sys.executable', '/Users/test/.local/share/uv/tools/mcli-framework/bin/python'):
|
|
392
|
+
|
|
393
|
+
# Mock current version older than latest
|
|
394
|
+
mock_version.return_value = "7.0.4"
|
|
395
|
+
|
|
396
|
+
# Mock PyPI response
|
|
397
|
+
mock_response = Mock()
|
|
398
|
+
mock_response.status_code = 200
|
|
399
|
+
mock_response.json.return_value = mock_pypi_response
|
|
400
|
+
mock_response.raise_for_status = Mock()
|
|
401
|
+
mock_get.return_value = mock_response
|
|
402
|
+
|
|
403
|
+
# Mock CI passing
|
|
404
|
+
mock_ci.return_value = (True, None)
|
|
405
|
+
|
|
406
|
+
# Mock successful subprocess
|
|
407
|
+
mock_result = Mock()
|
|
408
|
+
mock_result.returncode = 0
|
|
409
|
+
mock_result.stderr = ""
|
|
410
|
+
mock_subprocess.return_value = mock_result
|
|
411
|
+
|
|
412
|
+
result = runner.invoke(self_app, ['update', '--yes'])
|
|
413
|
+
|
|
414
|
+
assert result.exit_code == 0
|
|
415
|
+
assert "Successfully updated" in result.output
|
|
416
|
+
|
|
417
|
+
# Verify uv tool install was called
|
|
418
|
+
mock_subprocess.assert_called_once()
|
|
419
|
+
call_args = mock_subprocess.call_args[0][0]
|
|
420
|
+
assert call_args[0] == "uv"
|
|
421
|
+
assert call_args[1] == "tool"
|
|
422
|
+
assert call_args[2] == "install"
|
|
423
|
+
assert "--force" in call_args
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
def test_update_uses_pip_when_not_uv_tool(mock_pypi_response):
|
|
427
|
+
"""Test update uses pip when not running from uv tool environment"""
|
|
428
|
+
from unittest.mock import patch, Mock
|
|
429
|
+
import sys
|
|
430
|
+
|
|
431
|
+
runner = CliRunner()
|
|
432
|
+
|
|
433
|
+
with patch('importlib.metadata.version') as mock_version, \
|
|
434
|
+
patch('requests.get') as mock_get, \
|
|
435
|
+
patch('subprocess.run') as mock_subprocess, \
|
|
436
|
+
patch('mcli.self.self_cmd.check_ci_status') as mock_ci, \
|
|
437
|
+
patch('sys.executable', '/usr/local/bin/python3'):
|
|
438
|
+
|
|
439
|
+
# Mock current version older than latest
|
|
440
|
+
mock_version.return_value = "7.0.4"
|
|
441
|
+
|
|
442
|
+
# Mock PyPI response
|
|
443
|
+
mock_response = Mock()
|
|
444
|
+
mock_response.status_code = 200
|
|
445
|
+
mock_response.json.return_value = mock_pypi_response
|
|
446
|
+
mock_response.raise_for_status = Mock()
|
|
447
|
+
mock_get.return_value = mock_response
|
|
448
|
+
|
|
449
|
+
# Mock CI passing
|
|
450
|
+
mock_ci.return_value = (True, None)
|
|
451
|
+
|
|
452
|
+
# Mock successful subprocess
|
|
453
|
+
mock_result = Mock()
|
|
454
|
+
mock_result.returncode = 0
|
|
455
|
+
mock_result.stderr = ""
|
|
456
|
+
mock_subprocess.return_value = mock_result
|
|
457
|
+
|
|
458
|
+
result = runner.invoke(self_app, ['update', '--yes'])
|
|
459
|
+
|
|
460
|
+
assert result.exit_code == 0
|
|
461
|
+
assert "Successfully updated" in result.output
|
|
462
|
+
|
|
463
|
+
# Verify pip was called
|
|
464
|
+
mock_subprocess.assert_called_once()
|
|
465
|
+
call_args = mock_subprocess.call_args[0][0]
|
|
466
|
+
assert "-m" in call_args
|
|
467
|
+
assert "pip" in call_args
|
|
468
|
+
assert "install" in call_args
|
|
469
|
+
assert "--upgrade" in call_args
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import pytest
|
|
2
|
-
from click.testing import CliRunner
|
|
3
|
-
from mcli.self.self_cmd import self_app
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def test_self_group_help():
|
|
7
|
-
runner = CliRunner()
|
|
8
|
-
result = runner.invoke(self_app, ['--help'])
|
|
9
|
-
assert result.exit_code == 0
|
|
10
|
-
assert 'Manage and extend the mcli application' in result.output
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def test_search_help():
|
|
14
|
-
runner = CliRunner()
|
|
15
|
-
result = runner.invoke(self_app, ['search', '--help'])
|
|
16
|
-
assert result.exit_code == 0
|
|
17
|
-
assert 'Usage:' in result.output
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def test_add_command_help():
|
|
21
|
-
runner = CliRunner()
|
|
22
|
-
result = runner.invoke(self_app, ['add-command', '--help'])
|
|
23
|
-
assert result.exit_code == 0
|
|
24
|
-
assert 'Generate a new command template' in result.output
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def test_add_command_missing_required():
|
|
28
|
-
runner = CliRunner()
|
|
29
|
-
result = runner.invoke(self_app, ['add-command'])
|
|
30
|
-
assert result.exit_code != 0
|
|
31
|
-
assert 'Missing argument' in result.output
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def test_plugin_help():
|
|
35
|
-
runner = CliRunner()
|
|
36
|
-
result = runner.invoke(self_app, ['plugin', '--help'])
|
|
37
|
-
assert result.exit_code == 0
|
|
38
|
-
assert 'Manage plugins for mcli' in result.output
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def test_plugin_add_help():
|
|
42
|
-
runner = CliRunner()
|
|
43
|
-
result = runner.invoke(self_app, ['plugin', 'add', '--help'])
|
|
44
|
-
assert result.exit_code == 0
|
|
45
|
-
assert 'PLUGIN_NAME' in result.output
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def test_plugin_add_missing_required():
|
|
49
|
-
runner = CliRunner()
|
|
50
|
-
result = runner.invoke(self_app, ['plugin', 'add'])
|
|
51
|
-
assert result.exit_code != 0
|
|
52
|
-
assert 'Missing argument' in result.output
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
def test_plugin_remove_help():
|
|
56
|
-
runner = CliRunner()
|
|
57
|
-
result = runner.invoke(self_app, ['plugin', 'remove', '--help'])
|
|
58
|
-
assert result.exit_code == 0
|
|
59
|
-
assert 'PLUGIN_NAME' in result.output
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def test_plugin_remove_missing_required():
|
|
63
|
-
runner = CliRunner()
|
|
64
|
-
result = runner.invoke(self_app, ['plugin', 'remove'])
|
|
65
|
-
assert result.exit_code != 0
|
|
66
|
-
assert 'Missing argument' in result.output
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def test_plugin_update_help():
|
|
70
|
-
runner = CliRunner()
|
|
71
|
-
result = runner.invoke(self_app, ['plugin', 'update', '--help'])
|
|
72
|
-
assert result.exit_code == 0
|
|
73
|
-
assert 'PLUGIN_NAME' in result.output
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
def test_plugin_update_missing_required():
|
|
77
|
-
runner = CliRunner()
|
|
78
|
-
result = runner.invoke(self_app, ['plugin', 'update'])
|
|
79
|
-
assert result.exit_code != 0
|
|
80
|
-
assert 'Missing argument' in result.output
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|