mcli-framework 7.6.0__tar.gz → 7.6.1__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.6.0 → mcli_framework-7.6.1}/PKG-INFO +1 -1
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/pyproject.toml +1 -1
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/app/commands_cmd.py +51 -39
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/app/main.py +10 -2
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/custom_commands.py +4 -10
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/app.py +1 -5
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/app_integrated.py +168 -116
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/app_supabase.py +7 -3
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/app_training.py +3 -6
- mcli_framework-7.6.1/src/mcli/ml/dashboard/components/charts.py +217 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/components/metrics.py +24 -44
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/components/tables.py +32 -40
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/overview.py +102 -78
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/pages/cicd.py +103 -56
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/pages/debug_dependencies.py +35 -28
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/pages/gravity_viz.py +374 -313
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/pages/monte_carlo_predictions.py +50 -48
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/pages/predictions_enhanced.py +396 -248
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/pages/scrapers_and_logs.py +299 -273
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/pages/test_portfolio.py +153 -121
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/pages/trading.py +238 -169
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/pages/workflows.py +129 -84
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/streamlit_extras_utils.py +70 -79
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/utils.py +24 -21
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/warning_suppression.py +6 -4
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/database/session.py +16 -5
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/mlops/pipeline_orchestrator.py +1 -3
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/predictions/monte_carlo.py +6 -18
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/trading/alpaca_client.py +95 -96
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/trading/migrations.py +76 -40
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/trading/models.py +78 -60
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/trading/paper_trading.py +92 -74
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/trading/risk_management.py +106 -85
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/trading/trading_service.py +155 -110
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/training/train_model.py +1 -3
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/self/self_cmd.py +71 -57
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/daemon/daemon.py +2 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/openai_adapter.py +6 -2
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/models.py +6 -2
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/scrapers_corporate_registry.py +39 -88
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/scrapers_free_sources.py +32 -39
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/scrapers_third_party.py +21 -39
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/seed_database.py +70 -89
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli_framework.egg-info/PKG-INFO +1 -1
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_all_commands.py +2 -1
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_app_logs_cmd.py +31 -30
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_app_redis_cmd.py +71 -79
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_chat_cmd.py +48 -47
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_logs_cmd.py +42 -38
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_main_app.py +10 -9
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_model_cmd.py +168 -165
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_self_cmd.py +224 -208
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_self_cmd_commands.py +50 -44
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_self_cmd_plugins.py +66 -58
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_self_cmd_utilities.py +31 -43
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_workflow_file.py +24 -30
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_workflow_gcloud.py +33 -32
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/cli/test_workflow_registry.py +27 -33
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/conftest.py +11 -7
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/demo_generate_graph.py +16 -16
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/demo_hierarchical_transform.py +118 -79
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/e2e/test_complete_workflows.py +8 -8
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/e2e/test_model_workflow.py +29 -22
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/e2e/test_new_user_workflow.py +29 -28
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/e2e/test_update_workflow.py +37 -36
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/fixtures/chat_fixtures.py +7 -8
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/fixtures/cli_fixtures.py +11 -7
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/fixtures/data_fixtures.py +11 -12
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/fixtures/db_fixtures.py +13 -7
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/fixtures/model_fixtures.py +9 -12
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_agent.py +29 -26
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_california_scraper.py +30 -19
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_chat_client.py +138 -128
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_chat_system.py +44 -34
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_congress_scraper.py +34 -24
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_daemon_client.py +170 -173
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_daemon_server.py +274 -232
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_e2e_dashboard_lsh_supabase.py +99 -49
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_flask_webapp.py +2 -1
- mcli_framework-7.6.1/tests/integration/test_gcloud_services.py +59 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_lsh_client.py +14 -24
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_lsh_service.py +10 -8
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_ml_auth.py +27 -61
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_ml_data_pipeline.py +69 -72
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_ml_models.py +61 -117
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_ml_pipeline.py +116 -133
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_module_imports.py +17 -30
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_oi_service.py +3 -2
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_politician_trading.py +14 -9
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_repo_operations.py +17 -16
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_scheduler_integration.py +40 -48
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_service_registry.py +36 -34
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_supabase_live_connection.py +24 -19
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_uk_scraper.py +29 -18
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_us_states_scraper.py +28 -19
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_video_processing.py +14 -14
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_wakatime_api.py +3 -2
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_webapp_full.py +2 -1
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_workflow.py +2 -1
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/integration/test_workflow_commands.py +2 -1
- mcli_framework-7.6.1/tests/run_tests.py +85 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/test_harness.py +44 -57
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_api_utils.py +27 -40
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_async_process_manager.py +8 -5
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_auth_modules.py +30 -29
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_bug_fixes.py +9 -5
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_config.py +20 -19
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_custom_commands.py +5 -15
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_daemon_api.py +24 -22
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_dashboard_components.py +105 -135
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_dashboard_functions.py +30 -26
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_dashboard_pages.py +111 -106
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_dependencies.py +9 -6
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_emulator_workflow.py +41 -101
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_erd_generation.py +119 -90
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_erd_generic.py +89 -56
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_git_commit_workflow.py +29 -30
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_lib_auth.py +3 -2
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_lib_files.py +10 -10
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_lib_utils.py +3 -2
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_logger.py +10 -9
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_ml_preprocessing.py +45 -32
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_paths.py +17 -11
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_prediction_engine.py +225 -164
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_regression.py +41 -41
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_scheduler.py +42 -46
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_scheduler_cron_parser.py +3 -2
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_scheduler_job.py +43 -63
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_scheduler_monitor.py +31 -68
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_scheduler_persistence.py +74 -79
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_self_update.py +51 -33
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_supabase_connection.py +50 -39
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_supabase_pagination.py +49 -31
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_toml_utils.py +35 -34
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_trading_imports.py +24 -22
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_ui_rich.py +4 -1
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_uv_compat.py +39 -26
- mcli_framework-7.6.0/src/mcli/ml/dashboard/components/charts.py +0 -258
- mcli_framework-7.6.0/tests/integration/test_gcloud_services.py +0 -58
- mcli_framework-7.6.0/tests/run_tests.py +0 -77
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/.github/dependabot.yml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/.github/workflows/build.yml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/.github/workflows/ci.yml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/.github/workflows/ml-pipeline.yml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/.github/workflows/publish-self-hosted.yml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/.github/workflows/publish.yml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/.github/workflows/release.yml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/.github/workflows/security.yml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/.github/workflows/test.yml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/LICENSE +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/MANIFEST.in +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/PERFORMANCE_OPTIMIZATIONS.md +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/README.md +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/mcli_rust/Cargo.toml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/mcli_rust/src/command_parser.rs +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/mcli_rust/src/file_watcher.rs +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/mcli_rust/src/lib.rs +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/mcli_rust/src/process_manager.rs +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/mcli_rust/src/tfidf.rs +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/setup.cfg +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/app/chat_cmd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/app/completion_helpers.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/app/model/model.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/app/model_cmd.py +1 -1
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/app/video/video.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/chat/chat.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/chat/command_rag.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/chat/enhanced_chat.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/chat/system_controller.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/chat/system_integration.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/cli.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/config.toml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/api/api.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/api/daemon_client.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/api/daemon_client_local.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/api/daemon_decorator.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/api/mcli_decorators.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/auth/auth.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/auth/aws_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/auth/azure_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/auth/credential_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/auth/gcp_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/auth/key_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/auth/mcli_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/auth/token_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/auth/token_util.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/config/config.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/discovery/__init__.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/discovery/command_discovery.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/erd/erd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/erd/generate_graph.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/files/files.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/fs/fs.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/lib.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/logger/logger.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/paths.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/performance/optimizer.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/performance/rust_bridge.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/performance/uvloop_config.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/pickles/pickles.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/search/cached_vectorizer.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/services/data_pipeline.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/services/lsh_client.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/services/redis_service.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/shell/shell.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/toml/toml.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/ui/styling.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/ui/visual_effects.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/lib/watcher/watcher.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/middleware.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/routers/admin_router.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/routers/auth_router.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/routers/backtest_router.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/routers/data_router.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/routers/model_router.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/routers/monitoring_router.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/routers/portfolio_router.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/routers/prediction_router.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/routers/trade_router.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/routers/websocket_router.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/api/schemas.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/auth/auth_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/auth/models.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/auth/permissions.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/backtesting/backtest_engine.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/backtesting/performance_metrics.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/cache.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/cli/main.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/config/settings.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/configs/dvc_config.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/configs/mlflow_config.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/configs/mlops_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/app.py +2 -2
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/cli.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/common.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/dashboard/styles.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/data_ingestion/api_connectors.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/data_ingestion/data_pipeline.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/data_ingestion/stream_processor.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/database/migrations/env.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/database/models.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/experimentation/ab_testing.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/features/ensemble_features.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/features/political_features.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/features/recommendation_engine.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/features/stock_features.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/features/test_feature_engineering.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/logging.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/mlops/data_versioning.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/mlops/experiment_tracker.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/mlops/model_serving.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/models/base_models.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/models/ensemble_models.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/models/recommendation_models.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/models/test_models.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/monitoring/drift_detection.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/monitoring/metrics.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/optimization/portfolio_optimizer.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/predictions/prediction_engine.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/preprocessing/data_cleaners.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/preprocessing/feature_extractors.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/preprocessing/ml_pipeline.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/preprocessing/politician_trading_preprocessor.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/preprocessing/test_preprocessing.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/scripts/populate_sample_data.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/tasks.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/tests/test_integration.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/ml/tests/test_training_dashboard.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/mygroup/test_cmd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/public/oi/oi.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/public/public.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/self/completion_cmd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/self/logs_cmd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/self/redis_cmd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/self/test_cmd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/self/visual_cmd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/test/cron_test_cmd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/test/test_cmd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/daemon/async_command_database.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/daemon/async_process_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/daemon/client.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/daemon/daemon_api.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/daemon/enhanced_daemon.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/daemon/process_cli.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/daemon/process_manager.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/daemon/test_daemon.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/docker/docker.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/gcloud/config.toml +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/gcloud/gcloud.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/git_commit/ai_service.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/lsh_integration.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/client.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/download_and_run_efficient_models.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/lightweight_embedder.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/lightweight_model_server.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/lightweight_test.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/model_service.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/ollama_efficient_runner.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/pdf_processor.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/test_efficient_runner.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/test_example.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/test_integration.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/model_service/test_new_features.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/openai/openai.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/config.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/connectivity.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/data_sources.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/database.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/demo.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/monitoring.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/scrapers.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/scrapers_california.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/scrapers_eu.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/scrapers_uk.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/scrapers_us_states.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/supabase_functions.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/politician_trading/workflow.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/registry/registry.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/repo/repo.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/scheduler/cron_parser.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/scheduler/job.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/scheduler/monitor.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/scheduler/persistence.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/scheduler/scheduler.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/sync/test_cmd.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/wakatime/wakatime.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli/workflow/workflow.py +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli_framework.egg-info/SOURCES.txt +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli_framework.egg-info/dependency_links.txt +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli_framework.egg-info/entry_points.txt +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli_framework.egg-info/requires.txt +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/src/mcli_framework.egg-info/top_level.txt +0 -0
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/test_openai_adapter.py +1 -1
- {mcli_framework-7.6.0 → mcli_framework-7.6.1}/tests/unit/test_erd_imports.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcli-framework
|
|
3
|
-
Version: 7.6.
|
|
3
|
+
Version: 7.6.1
|
|
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>
|
|
@@ -290,7 +290,9 @@ def {name}_command(name: str = "World"):
|
|
|
290
290
|
return template
|
|
291
291
|
|
|
292
292
|
|
|
293
|
-
def open_editor_for_command(
|
|
293
|
+
def open_editor_for_command(
|
|
294
|
+
command_name: str, command_group: str, description: str
|
|
295
|
+
) -> Optional[str]:
|
|
294
296
|
"""
|
|
295
297
|
Open the user's default editor to allow them to write command logic.
|
|
296
298
|
|
|
@@ -306,16 +308,18 @@ def open_editor_for_command(command_name: str, command_group: str, description:
|
|
|
306
308
|
import sys
|
|
307
309
|
|
|
308
310
|
# Get the user's default editor
|
|
309
|
-
editor = os.environ.get(
|
|
311
|
+
editor = os.environ.get("EDITOR")
|
|
310
312
|
if not editor:
|
|
311
313
|
# Try common editors in order of preference
|
|
312
|
-
for common_editor in [
|
|
313
|
-
if subprocess.run([
|
|
314
|
+
for common_editor in ["vim", "nano", "code", "subl", "atom", "emacs"]:
|
|
315
|
+
if subprocess.run(["which", common_editor], capture_output=True).returncode == 0:
|
|
314
316
|
editor = common_editor
|
|
315
317
|
break
|
|
316
318
|
|
|
317
319
|
if not editor:
|
|
318
|
-
click.echo(
|
|
320
|
+
click.echo(
|
|
321
|
+
"No editor found. Please set the EDITOR environment variable or install vim/nano."
|
|
322
|
+
)
|
|
319
323
|
return None
|
|
320
324
|
|
|
321
325
|
# Create a temporary file with the template
|
|
@@ -337,7 +341,7 @@ Example Click command structure:
|
|
|
337
341
|
@click.command()
|
|
338
342
|
@click.argument('name', default='World')
|
|
339
343
|
def my_command(name):
|
|
340
|
-
|
|
344
|
+
"""My custom command."""
|
|
341
345
|
click.echo(f"Hello, {{name}}!")
|
|
342
346
|
"""
|
|
343
347
|
import click
|
|
@@ -363,14 +367,16 @@ logger = get_logger()
|
|
|
363
367
|
'''
|
|
364
368
|
|
|
365
369
|
# Create temporary file
|
|
366
|
-
with tempfile.NamedTemporaryFile(mode=
|
|
370
|
+
with tempfile.NamedTemporaryFile(mode="w", suffix=".py", delete=False) as temp_file:
|
|
367
371
|
temp_file.write(enhanced_template)
|
|
368
372
|
temp_file_path = temp_file.name
|
|
369
373
|
|
|
370
374
|
try:
|
|
371
375
|
# Check if we're in an interactive environment
|
|
372
376
|
if not sys.stdin.isatty() or not sys.stdout.isatty():
|
|
373
|
-
click.echo(
|
|
377
|
+
click.echo(
|
|
378
|
+
"Editor requires an interactive terminal. Use --template flag for non-interactive mode."
|
|
379
|
+
)
|
|
374
380
|
return None
|
|
375
381
|
|
|
376
382
|
# Open editor
|
|
@@ -386,7 +392,7 @@ logger = get_logger()
|
|
|
386
392
|
return None
|
|
387
393
|
|
|
388
394
|
# Read the edited content
|
|
389
|
-
with open(temp_file_path,
|
|
395
|
+
with open(temp_file_path, "r") as f:
|
|
390
396
|
edited_code = f.read()
|
|
391
397
|
|
|
392
398
|
# Check if the file was actually edited (not just the template)
|
|
@@ -395,12 +401,12 @@ logger = get_logger()
|
|
|
395
401
|
return None
|
|
396
402
|
|
|
397
403
|
# Extract the actual command code (remove the instructions)
|
|
398
|
-
lines = edited_code.split(
|
|
404
|
+
lines = edited_code.split("\n")
|
|
399
405
|
code_lines = []
|
|
400
406
|
in_code_section = False
|
|
401
407
|
|
|
402
408
|
for line in lines:
|
|
403
|
-
if line.strip().startswith(
|
|
409
|
+
if line.strip().startswith("# Your command implementation goes here:"):
|
|
404
410
|
in_code_section = True
|
|
405
411
|
continue
|
|
406
412
|
if in_code_section:
|
|
@@ -410,7 +416,7 @@ logger = get_logger()
|
|
|
410
416
|
# Fallback: use the entire file content
|
|
411
417
|
code_lines = lines
|
|
412
418
|
|
|
413
|
-
final_code =
|
|
419
|
+
final_code = "\n".join(code_lines).strip()
|
|
414
420
|
|
|
415
421
|
if not final_code:
|
|
416
422
|
click.echo("No command code found. Command creation cancelled.")
|
|
@@ -436,11 +442,12 @@ logger = get_logger()
|
|
|
436
442
|
@commands.command("add")
|
|
437
443
|
@click.argument("command_name", required=True)
|
|
438
444
|
@click.option("--group", "-g", help="Command group (defaults to 'workflow')", default="workflow")
|
|
445
|
+
@click.option("--description", "-d", help="Description for the command", default="Custom command")
|
|
439
446
|
@click.option(
|
|
440
|
-
"--
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
447
|
+
"--template",
|
|
448
|
+
"-t",
|
|
449
|
+
is_flag=True,
|
|
450
|
+
help="Use template mode (skip editor and use predefined template)",
|
|
444
451
|
)
|
|
445
452
|
def add_command(command_name, group, description, template):
|
|
446
453
|
"""
|
|
@@ -734,13 +741,13 @@ def edit_command(command_name, editor):
|
|
|
734
741
|
return 1
|
|
735
742
|
|
|
736
743
|
try:
|
|
737
|
-
with open(command_file,
|
|
744
|
+
with open(command_file, "r") as f:
|
|
738
745
|
command_data = json.load(f)
|
|
739
746
|
except Exception as e:
|
|
740
747
|
console.print(f"[red]Failed to load command: {e}[/red]")
|
|
741
748
|
return 1
|
|
742
749
|
|
|
743
|
-
code = command_data.get(
|
|
750
|
+
code = command_data.get("code", "")
|
|
744
751
|
|
|
745
752
|
if not code:
|
|
746
753
|
console.print(f"[red]Command has no code: {command_name}[/red]")
|
|
@@ -748,13 +755,14 @@ def edit_command(command_name, editor):
|
|
|
748
755
|
|
|
749
756
|
# Determine editor
|
|
750
757
|
if not editor:
|
|
751
|
-
editor = os.environ.get(
|
|
758
|
+
editor = os.environ.get("EDITOR", "vim")
|
|
752
759
|
|
|
753
760
|
console.print(f"Opening command in {editor}...")
|
|
754
761
|
|
|
755
762
|
# Create temp file with the code
|
|
756
|
-
with tempfile.NamedTemporaryFile(
|
|
757
|
-
|
|
763
|
+
with tempfile.NamedTemporaryFile(
|
|
764
|
+
mode="w", suffix=".py", delete=False, prefix=f"{command_name}_"
|
|
765
|
+
) as tmp:
|
|
758
766
|
tmp.write(code)
|
|
759
767
|
tmp_path = tmp.name
|
|
760
768
|
|
|
@@ -766,7 +774,7 @@ def edit_command(command_name, editor):
|
|
|
766
774
|
console.print(f"[yellow]Editor exited with code {result.returncode}[/yellow]")
|
|
767
775
|
|
|
768
776
|
# Read edited content
|
|
769
|
-
with open(tmp_path,
|
|
777
|
+
with open(tmp_path, "r") as f:
|
|
770
778
|
new_code = f.read()
|
|
771
779
|
|
|
772
780
|
# Check if code changed
|
|
@@ -776,20 +784,18 @@ def edit_command(command_name, editor):
|
|
|
776
784
|
|
|
777
785
|
# Validate syntax
|
|
778
786
|
try:
|
|
779
|
-
compile(new_code,
|
|
787
|
+
compile(new_code, "<string>", "exec")
|
|
780
788
|
except SyntaxError as e:
|
|
781
789
|
console.print(f"[red]Syntax error in edited code: {e}[/red]")
|
|
782
|
-
should_save = Prompt.ask(
|
|
783
|
-
"Save anyway?", choices=["y", "n"], default="n"
|
|
784
|
-
)
|
|
790
|
+
should_save = Prompt.ask("Save anyway?", choices=["y", "n"], default="n")
|
|
785
791
|
if should_save.lower() != "y":
|
|
786
792
|
return 1
|
|
787
793
|
|
|
788
794
|
# Update the command
|
|
789
|
-
command_data[
|
|
790
|
-
command_data[
|
|
795
|
+
command_data["code"] = new_code
|
|
796
|
+
command_data["updated_at"] = datetime.now().isoformat()
|
|
791
797
|
|
|
792
|
-
with open(command_file,
|
|
798
|
+
with open(command_file, "w") as f:
|
|
793
799
|
json.dump(command_data, f, indent=2)
|
|
794
800
|
|
|
795
801
|
# Update lockfile
|
|
@@ -832,7 +838,7 @@ def import_script(script_path, name, group, description, interactive):
|
|
|
832
838
|
|
|
833
839
|
# Read the script content
|
|
834
840
|
try:
|
|
835
|
-
with open(script_file,
|
|
841
|
+
with open(script_file, "r") as f:
|
|
836
842
|
code = f.read()
|
|
837
843
|
except Exception as e:
|
|
838
844
|
console.print(f"[red]Failed to read script: {e}[/red]")
|
|
@@ -849,11 +855,11 @@ def import_script(script_path, name, group, description, interactive):
|
|
|
849
855
|
|
|
850
856
|
# Interactive editing
|
|
851
857
|
if interactive:
|
|
852
|
-
editor = os.environ.get(
|
|
858
|
+
editor = os.environ.get("EDITOR", "vim")
|
|
853
859
|
console.print(f"Opening in {editor} for review...")
|
|
854
860
|
|
|
855
861
|
# Create temp file with the code
|
|
856
|
-
with tempfile.NamedTemporaryFile(mode=
|
|
862
|
+
with tempfile.NamedTemporaryFile(mode="w", suffix=".py", delete=False) as tmp:
|
|
857
863
|
tmp.write(code)
|
|
858
864
|
tmp_path = tmp.name
|
|
859
865
|
|
|
@@ -861,7 +867,7 @@ def import_script(script_path, name, group, description, interactive):
|
|
|
861
867
|
subprocess.run([editor, tmp_path], check=True)
|
|
862
868
|
|
|
863
869
|
# Read edited content
|
|
864
|
-
with open(tmp_path,
|
|
870
|
+
with open(tmp_path, "r") as f:
|
|
865
871
|
code = f.read()
|
|
866
872
|
finally:
|
|
867
873
|
Path(tmp_path).unlink(missing_ok=True)
|
|
@@ -870,6 +876,7 @@ def import_script(script_path, name, group, description, interactive):
|
|
|
870
876
|
if not description:
|
|
871
877
|
# Try to extract from docstring
|
|
872
878
|
import ast
|
|
879
|
+
|
|
873
880
|
try:
|
|
874
881
|
tree = ast.parse(code)
|
|
875
882
|
description = ast.get_docstring(tree) or f"Imported from {script_file.name}"
|
|
@@ -887,8 +894,8 @@ def import_script(script_path, name, group, description, interactive):
|
|
|
887
894
|
metadata={
|
|
888
895
|
"source": "import-script",
|
|
889
896
|
"original_file": str(script_file),
|
|
890
|
-
"imported_at": datetime.now().isoformat()
|
|
891
|
-
}
|
|
897
|
+
"imported_at": datetime.now().isoformat(),
|
|
898
|
+
},
|
|
892
899
|
)
|
|
893
900
|
|
|
894
901
|
console.print(f"[green]Imported script as command: {name}[/green]")
|
|
@@ -902,7 +909,12 @@ def import_script(script_path, name, group, description, interactive):
|
|
|
902
909
|
@commands.command("export-script")
|
|
903
910
|
@click.argument("command_name")
|
|
904
911
|
@click.option("--output", "-o", type=click.Path(), help="Output file path")
|
|
905
|
-
@click.option(
|
|
912
|
+
@click.option(
|
|
913
|
+
"--standalone",
|
|
914
|
+
"-s",
|
|
915
|
+
is_flag=True,
|
|
916
|
+
help="Make script standalone (add if __name__ == '__main__')",
|
|
917
|
+
)
|
|
906
918
|
def export_script(command_name, output, standalone):
|
|
907
919
|
"""
|
|
908
920
|
Export a JSON command to a Python script.
|
|
@@ -923,14 +935,14 @@ def export_script(command_name, output, standalone):
|
|
|
923
935
|
return 1
|
|
924
936
|
|
|
925
937
|
try:
|
|
926
|
-
with open(command_file,
|
|
938
|
+
with open(command_file, "r") as f:
|
|
927
939
|
command_data = json.load(f)
|
|
928
940
|
except Exception as e:
|
|
929
941
|
console.print(f"[red]Failed to load command: {e}[/red]")
|
|
930
942
|
return 1
|
|
931
943
|
|
|
932
944
|
# Get the code
|
|
933
|
-
code = command_data.get(
|
|
945
|
+
code = command_data.get("code", "")
|
|
934
946
|
|
|
935
947
|
if not code:
|
|
936
948
|
console.print(f"[red]Command has no code: {command_name}[/red]")
|
|
@@ -950,7 +962,7 @@ def export_script(command_name, output, standalone):
|
|
|
950
962
|
|
|
951
963
|
# Write the script
|
|
952
964
|
try:
|
|
953
|
-
with open(output_file,
|
|
965
|
+
with open(output_file, "w") as f:
|
|
954
966
|
f.write(code)
|
|
955
967
|
except Exception as e:
|
|
956
968
|
console.print(f"[red]Failed to write script: {e}[/red]")
|
|
@@ -259,7 +259,11 @@ class LazyCommand(click.Command):
|
|
|
259
259
|
if hasattr(cmd, "shell_complete"):
|
|
260
260
|
return cmd.shell_complete(ctx, param, incomplete)
|
|
261
261
|
# Fallback to default Click completion
|
|
262
|
-
return
|
|
262
|
+
return (
|
|
263
|
+
super().shell_complete(ctx, param, incomplete)
|
|
264
|
+
if hasattr(super(), "shell_complete")
|
|
265
|
+
else []
|
|
266
|
+
)
|
|
263
267
|
|
|
264
268
|
|
|
265
269
|
class LazyGroup(click.Group):
|
|
@@ -315,7 +319,11 @@ class LazyGroup(click.Group):
|
|
|
315
319
|
if hasattr(group, "shell_complete"):
|
|
316
320
|
return group.shell_complete(ctx, param, incomplete)
|
|
317
321
|
# Fallback to default Click completion
|
|
318
|
-
return
|
|
322
|
+
return (
|
|
323
|
+
super().shell_complete(ctx, param, incomplete)
|
|
324
|
+
if hasattr(super(), "shell_complete")
|
|
325
|
+
else []
|
|
326
|
+
)
|
|
319
327
|
|
|
320
328
|
|
|
321
329
|
def _add_lazy_commands(app: click.Group):
|
|
@@ -5,8 +5,8 @@ This module provides functionality to store user-created commands in a portable
|
|
|
5
5
|
format in ~/.mcli/commands/ and automatically load them at startup.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
import json
|
|
9
8
|
import importlib.util
|
|
9
|
+
import json
|
|
10
10
|
import sys
|
|
11
11
|
import tempfile
|
|
12
12
|
from datetime import datetime
|
|
@@ -259,9 +259,7 @@ class CustomCommandManager:
|
|
|
259
259
|
module_name = f"mcli_custom_{name}"
|
|
260
260
|
|
|
261
261
|
# Create a temporary file to store the code
|
|
262
|
-
with tempfile.NamedTemporaryFile(
|
|
263
|
-
mode="w", suffix=".py", delete=False
|
|
264
|
-
) as temp_file:
|
|
262
|
+
with tempfile.NamedTemporaryFile(mode="w", suffix=".py", delete=False) as temp_file:
|
|
265
263
|
temp_file.write(code)
|
|
266
264
|
temp_file_path = temp_file.name
|
|
267
265
|
|
|
@@ -299,9 +297,7 @@ class CustomCommandManager:
|
|
|
299
297
|
logger.info(f"Registered custom command: {name}")
|
|
300
298
|
return True
|
|
301
299
|
else:
|
|
302
|
-
logger.warning(
|
|
303
|
-
f"No Click command found in custom command: {name}"
|
|
304
|
-
)
|
|
300
|
+
logger.warning(f"No Click command found in custom command: {name}")
|
|
305
301
|
return False
|
|
306
302
|
finally:
|
|
307
303
|
# Clean up temporary file
|
|
@@ -331,9 +327,7 @@ class CustomCommandManager:
|
|
|
331
327
|
logger.error(f"Failed to export commands: {e}")
|
|
332
328
|
return False
|
|
333
329
|
|
|
334
|
-
def import_commands(
|
|
335
|
-
self, import_path: Path, overwrite: bool = False
|
|
336
|
-
) -> Dict[str, bool]:
|
|
330
|
+
def import_commands(self, import_path: Path, overwrite: bool = False) -> Dict[str, bool]:
|
|
337
331
|
"""
|
|
338
332
|
Import commands from a JSON file.
|
|
339
333
|
|
|
@@ -16,11 +16,7 @@ from mcli.ml.config import settings
|
|
|
16
16
|
from mcli.ml.database.session import init_db
|
|
17
17
|
from mcli.ml.logging import get_logger, setup_logging
|
|
18
18
|
|
|
19
|
-
from .middleware import
|
|
20
|
-
ErrorHandlingMiddleware,
|
|
21
|
-
RateLimitMiddleware,
|
|
22
|
-
RequestLoggingMiddleware,
|
|
23
|
-
)
|
|
19
|
+
from .middleware import ErrorHandlingMiddleware, RateLimitMiddleware, RequestLoggingMiddleware
|
|
24
20
|
from .routers import (
|
|
25
21
|
admin_router,
|
|
26
22
|
auth_router,
|