thestage 0.5.46__tar.gz → 0.5.471__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.
- {thestage-0.5.46 → thestage-0.5.471}/PKG-INFO +3 -4
- {thestage-0.5.46 → thestage-0.5.471}/pyproject.toml +4 -2
- thestage-0.5.471/thestage/.env +5 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/__init__.py +2 -1
- thestage-0.5.471/thestage/cli_command.py +56 -0
- thestage-0.5.471/thestage/cli_command_helper.py +51 -0
- thestage-0.5.471/thestage/config/config_storage.py +5 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/controllers/base_controller.py +19 -15
- {thestage-0.5.46 → thestage-0.5.471}/thestage/controllers/config_controller.py +30 -38
- {thestage-0.5.46 → thestage-0.5.471}/thestage/controllers/container_controller.py +43 -79
- {thestage-0.5.46 → thestage-0.5.471}/thestage/controllers/instance_controller.py +23 -40
- {thestage-0.5.46 → thestage-0.5.471}/thestage/controllers/project_controller.py +95 -184
- {thestage-0.5.46 → thestage-0.5.471}/thestage/controllers/utils_controller.py +12 -8
- thestage-0.5.471/thestage/debug_tests.py +12 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/container.py +0 -5
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/rented_instance.py +0 -5
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/self_hosted_instance.py +0 -2
- {thestage-0.5.46 → thestage-0.5.471}/thestage/helpers/error_handler.py +14 -14
- thestage-0.5.471/thestage/helpers/exception_hook.py +14 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/helpers/logger/app_logger.py +3 -4
- thestage-0.5.471/thestage/main.py +36 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/abstract_service.py +0 -40
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/app_config_service.py +7 -6
- thestage-0.5.471/thestage/services/clients/.DS_Store +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/api_client.py +54 -68
- thestage-0.5.46/thestage/services/clients/thestage_api/core/api_client_abstract.py → thestage-0.5.471/thestage/services/clients/thestage_api/core/api_client_core.py +22 -5
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/container_response.py +1 -1
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_simulator_model_response.py +1 -1
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_simulator_response.py +1 -1
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/instance_rented_response.py +1 -1
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/selfhosted_instance_response.py +1 -1
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/task_controller/task_status_localized_map_response.py +1 -1
- thestage-0.5.471/thestage/services/clients/thestage_api/dtos/validate_token_response.py +11 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/config_provider/config_provider.py +75 -47
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/connect/connect_service.py +11 -22
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/container/container_service.py +6 -23
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/core_files/config_entity.py +7 -1
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/filesystem_service.py +2 -2
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/instance/instance_service.py +12 -26
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/logging/logging_service.py +17 -45
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/project/project_service.py +33 -72
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/remote_server_service.py +3 -4
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/service_factory.py +21 -27
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/validation_service.py +14 -9
- thestage-0.5.46/thestage/.env +0 -6
- thestage-0.5.46/thestage/exceptions/http_error_exception.py +0 -12
- thestage-0.5.46/thestage/main.py +0 -24
- thestage-0.5.46/thestage/services/clients/thestage_api/core/api_client_core.py +0 -25
- {thestage-0.5.46 → thestage-0.5.471}/LICENSE.txt +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/README.md +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/__main__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/color_scheme/color_scheme.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/config/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/config/env_base.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/controllers/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/debug_main.dist.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/enums/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/enums/order_direction_type.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/enums/shell_type.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/enums/tail_output_type.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/enums/yes_no_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/file_item.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/project_inference_simulator.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/project_inference_simulator_model.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/entities/project_task.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/exceptions/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/exceptions/auth_exception.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/exceptions/base_exception.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/exceptions/business_logic_exception.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/exceptions/config_exception.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/exceptions/file_system_exception.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/exceptions/git_access_exception.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/exceptions/remote_server_exception.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/git/ProgressPrinter.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/helpers/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/helpers/logger/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/helpers/ssh_util.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/i18n/en_GB/messages.po +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/i18n/translation.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/.env +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/abstract_mapper.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/git/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/git/git_client.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/core/http_client_exception.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/base_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/cloud_provider_region.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/container_param_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/docker_container_assigned_device.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/docker_container_controller/docker_container_list_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/docker_container_controller/docker_container_list_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/docker_container_mapping.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/entity_filter_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/container_pending_action.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/container_status.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/cpu_type.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/currency_type.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/daemon_status.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/disk_type.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/drive_type.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/gpu_name.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/inference_model_status.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/inference_simulator_status.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/instance_rented_status.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/instance_type.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/location_region.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/power_status.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/provider_name.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/selfhosted_status.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/task_execution_status.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/enums/task_status.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/frontend_status.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_controller/deploy_inference_model_to_instance_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_controller/deploy_inference_model_to_instance_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_controller/deploy_inference_model_to_sagemaker_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_controller/deploy_inference_model_to_sagemaker_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_controller/get_inference_simulator_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_controller/get_inference_simulator_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_controller/inference_simulator_list_for_project_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_controller/inference_simulator_list_for_project_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_controller/inference_simulator_model_list_for_project_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/inference_controller/inference_simulator_model_list_for_project_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/installed_service.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/instance_detected_gpus.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/logging_controller/docker_container_log_stream_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/logging_controller/log_polling_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/logging_controller/log_polling_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/logging_controller/task_log_stream_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/logging_controller/user_logs_query_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/logging_controller/user_logs_query_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/paginated_entity_list.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/pagination_data.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/price_definition.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/project_controller/project_get_deploy_ssh_key_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/project_controller/project_get_deploy_ssh_key_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/project_controller/project_push_inference_simulator_model_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/project_controller/project_push_inference_simulator_model_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/project_controller/project_run_task_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/project_controller/project_run_task_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/project_controller/project_start_inference_simulator_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/project_controller/project_start_inference_simulator_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/project_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/sftp_path_helper.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/ssh_key_controller/add_ssh_key_to_user_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/ssh_key_controller/add_ssh_key_to_user_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/ssh_key_controller/add_ssh_public_key_to_instance_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/ssh_key_controller/add_ssh_public_key_to_instance_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/ssh_key_controller/is_user_has_public_ssh_key_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/ssh_key_controller/is_user_has_public_ssh_key_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/task_controller/task_list_for_project_request.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/task_controller/task_list_for_project_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/task_controller/task_view_response.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/clients/thestage_api/dtos/user_controller/user_profile.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/config_provider/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/connect/dto/remote_server_config.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/container/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/container/mapper/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/container/mapper/container_mapper.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/instance/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/instance/mapper/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/instance/mapper/instance_mapper.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/instance/mapper/selfhosted_mapper.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/logging/byte_print_style.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/logging/dto/log_message.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/logging/dto/log_type.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/logging/exception/log_polling_exception.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/logging/logging_constants.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/project/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/project/dto/inference_simulator_dto.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/project/dto/inference_simulator_model_dto.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/project/dto/project_config.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/project/mapper/__init__.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/project/mapper/project_inference_simulator_mapper.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/project/mapper/project_inference_simulator_model_mapper.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/project/mapper/project_task_mapper.py +0 -0
- {thestage-0.5.46 → thestage-0.5.471}/thestage/services/task/dto/task_dto.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: thestage
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.471
|
|
4
4
|
Summary:
|
|
5
5
|
Author: TheStage AI team
|
|
6
6
|
Author-email: hello@thestage.ai
|
|
@@ -10,12 +10,11 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
14
13
|
Requires-Dist: aioconsole (>=0.8.0,<0.9.0)
|
|
15
14
|
Requires-Dist: boto3 (>=1.35.80,<2.0.0)
|
|
16
15
|
Requires-Dist: gitpython (>=3.1.40,<4.0.0)
|
|
17
16
|
Requires-Dist: httpx (>=0.27.2,<0.28.0)
|
|
18
|
-
Requires-Dist: paramiko (>=3.
|
|
17
|
+
Requires-Dist: paramiko (>=3.5.1,<4.0.0)
|
|
19
18
|
Requires-Dist: pydantic (>=2.4.2,<3.0.0)
|
|
20
19
|
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
|
|
21
20
|
Requires-Dist: python-gettext-translations (>=1.1.0,<2.0.0)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "thestage"
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
version = "0.5.471"
|
|
5
|
+
|
|
4
6
|
description = ""
|
|
5
7
|
authors = ["TheStage AI team <hello@thestage.ai>"]
|
|
6
8
|
readme = "README.md"
|
|
@@ -27,7 +29,7 @@ pydantic = "^2.4.2"
|
|
|
27
29
|
gitpython = "^3.1.40"
|
|
28
30
|
requests = "^2.31.0"
|
|
29
31
|
python-gettext-translations = "^1.1.0"
|
|
30
|
-
paramiko = "^3.
|
|
32
|
+
paramiko = "^3.5.1"
|
|
31
33
|
|
|
32
34
|
aioconsole = "^0.8.0"
|
|
33
35
|
httpx = "^0.27.2"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
class CliCommand(str, Enum):
|
|
4
|
+
VERSION = "VERSION"
|
|
5
|
+
CONNECT = "CONNECT"
|
|
6
|
+
PROJECT_CLONE = "PROJECT_CLONE"
|
|
7
|
+
PROJECT_INIT = "PROJECT_INIT"
|
|
8
|
+
PROJECT_RUN = "PROJECT_RUN"
|
|
9
|
+
PROJECT_CHECKOUT = "PROJECT_CHECKOUT"
|
|
10
|
+
PROJECT_PULL = "PROJECT_PULL"
|
|
11
|
+
PROJECT_RESET = "PROJECT_RESET"
|
|
12
|
+
PROJECT_INFERENCE_SIMULATOR_RUN = "PROJECT_INFERENCE_SIMULATOR_RUN"
|
|
13
|
+
PROJECT_INFERENCE_SIMULATOR_SAVE_METADATA = "PROJECT_INFERENCE_SIMULATOR_SAVE_METADATA"
|
|
14
|
+
PROJECT_INFERENCE_SIMULATOR_PUSH = "PROJECT_INFERENCE_SIMULATOR_PUSH"
|
|
15
|
+
PROJECT_INFERENCE_SIMULATOR_LS = "PROJECT_INFERENCE_SIMULATOR_LS"
|
|
16
|
+
PROJECT_INFERENCE_SIMULATOR_LOGS = "PROJECT_INFERENCE_SIMULATOR_LOGS"
|
|
17
|
+
PROJECT_MODEL_LS = "PROJECT_MODEL_LS"
|
|
18
|
+
PROJECT_MODEL_DEPLOY_INSTANCE = "PROJECT_MODEL_DEPLOY_INSTANCE"
|
|
19
|
+
PROJECT_MODEL_DEPLOY_SAGEMAKER = "PROJECT_MODEL_DEPLOY_SAGEMAKER"
|
|
20
|
+
PROJECT_TASK_CANCEL = "PROJECT_TASK_CANCEL"
|
|
21
|
+
PROJECT_TASK_LS = "PROJECT_TASK_LS"
|
|
22
|
+
PROJECT_TASK_LOGS = "PROJECT_TASK_LOGS"
|
|
23
|
+
PROJECT_CONFIG_SET_DEFAULT_CONTAINER = "PROJECT_CONFIG_SET_DEFAULT_CONTAINER"
|
|
24
|
+
PROJECT_CONFIG_GET = "PROJECT_CONFIG_GET"
|
|
25
|
+
CONTAINER_LS = "CONTAINER_LS"
|
|
26
|
+
CONTAINER_INFO = "CONTAINER_INFO"
|
|
27
|
+
CONTAINER_CONNECT = "CONTAINER_CONNECT"
|
|
28
|
+
CONTAINER_UPLOAD = "CONTAINER_UPLOAD"
|
|
29
|
+
CONTAINER_DOWNLOAD = "CONTAINER_DOWNLOAD"
|
|
30
|
+
CONTAINER_START = "CONTAINER_START"
|
|
31
|
+
CONTAINER_STOP = "CONTAINER_STOP"
|
|
32
|
+
CONTAINER_RESTART = "CONTAINER_RESTART"
|
|
33
|
+
CONTAINER_LOGS = "CONTAINER_LOGS"
|
|
34
|
+
INSTANCE_RENTED_LS = "INSTANCE_RENTED_LS"
|
|
35
|
+
INSTANCE_RENTED_CONNECT = "INSTANCE_RENTED_CONNECT"
|
|
36
|
+
INSTANCE_SELF_HOSTED_LS = "INSTANCE_SELF_HOSTED_LS"
|
|
37
|
+
INSTANCE_SELF_HOSTED_CONNECT = "INSTANCE_SELF_HOSTED_CONNECT"
|
|
38
|
+
CONFIG_GET = "CONFIG_GET"
|
|
39
|
+
CONFIG_SET = "CONFIG_SET"
|
|
40
|
+
CONFIG_CLEAR = "CONFIG_CLEAR"
|
|
41
|
+
CONFIG_UPLOAD_SSH_KEY = "CONFIG_UPLOAD_SSH_KEY"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class CliCommandAvailability(str, Enum):
|
|
45
|
+
ALLOWED = "ALLOWED"
|
|
46
|
+
RESTRICTED = "RESTRICTED"
|
|
47
|
+
DEPRECATED = "DEPRECATED"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
ALWAYS_AVAILABLE_COMMANDS = [
|
|
51
|
+
CliCommand.VERSION,
|
|
52
|
+
CliCommand.PROJECT_CONFIG_GET,
|
|
53
|
+
CliCommand.CONFIG_GET,
|
|
54
|
+
CliCommand.CONFIG_SET,
|
|
55
|
+
CliCommand.CONFIG_CLEAR,
|
|
56
|
+
]
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
from typing import Callable
|
|
2
|
+
|
|
3
|
+
import typer
|
|
4
|
+
|
|
5
|
+
from thestage.cli_command import CliCommand, CliCommandAvailability
|
|
6
|
+
from thestage.color_scheme.color_scheme import ColorScheme
|
|
7
|
+
from thestage.config import config_storage
|
|
8
|
+
from rich import print
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def cli_command(command_id: CliCommand):
|
|
12
|
+
def decorator(func: Callable):
|
|
13
|
+
setattr(func, "__cli_command__", command_id)
|
|
14
|
+
return func
|
|
15
|
+
return decorator
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def get_command_metadata(command_id: CliCommand) -> dict:
|
|
19
|
+
return {
|
|
20
|
+
"rich_help_panel": get_command_help_panel(command_id),
|
|
21
|
+
"deprecated": is_command_deprecated(command_id),
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def get_command_group_help_panel() -> str:
|
|
26
|
+
return "Command Groups"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def get_command_help_panel(command: CliCommand) -> str:
|
|
30
|
+
if config_storage.APP_CONFIG.runtime.allowed_commands.get(command) == CliCommandAvailability.ALLOWED:
|
|
31
|
+
return "Allowed Commands"
|
|
32
|
+
if config_storage.APP_CONFIG.runtime.allowed_commands.get(command) == CliCommandAvailability.RESTRICTED:
|
|
33
|
+
return "Restricted Commands"
|
|
34
|
+
if config_storage.APP_CONFIG.runtime.allowed_commands.get(command) == CliCommandAvailability.DEPRECATED:
|
|
35
|
+
return "Deprecated Commands"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def is_command_deprecated(command: CliCommand) -> bool:
|
|
39
|
+
if config_storage.APP_CONFIG.runtime.allowed_commands.get(command) == CliCommandAvailability.DEPRECATED:
|
|
40
|
+
return True
|
|
41
|
+
return False
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def check_command_permission(executed_command: CliCommand):
|
|
45
|
+
if config_storage.APP_CONFIG.runtime.is_token_valid == False and executed_command != CliCommand.CONFIG_SET:
|
|
46
|
+
print(f"[{ColorScheme.WARNING.value}]Your API Token is not valid. You can update the token using 'thestage config set' command[{ColorScheme.WARNING.value}]")
|
|
47
|
+
|
|
48
|
+
is_allowed = config_storage.APP_CONFIG.runtime.allowed_commands.get(executed_command) == CliCommandAvailability.ALLOWED
|
|
49
|
+
if not is_allowed:
|
|
50
|
+
typer.echo("Action is not allowed")
|
|
51
|
+
raise typer.Exit(code=1)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
from typing import Optional
|
|
3
3
|
|
|
4
|
+
from thestage.cli_command import CliCommand
|
|
5
|
+
from thestage.cli_command_helper import get_command_metadata, check_command_permission
|
|
4
6
|
from thestage.i18n.translation import __
|
|
5
7
|
from thestage.helpers.logger.app_logger import app_logger
|
|
6
8
|
from thestage.controllers.utils_controller import get_current_directory, validate_config_and_get_service_factory
|
|
@@ -10,24 +12,23 @@ import typer
|
|
|
10
12
|
|
|
11
13
|
from thestage.services.connect.connect_service import ConnectService
|
|
12
14
|
|
|
13
|
-
app = typer.Typer(no_args_is_help=True)
|
|
15
|
+
app = typer.Typer(no_args_is_help=True,)
|
|
14
16
|
|
|
15
17
|
|
|
16
|
-
@app.command(no_args_is_help=False)
|
|
18
|
+
@app.command(name='version', help="Get application's name and version", no_args_is_help=False, **get_command_metadata(CliCommand.VERSION))
|
|
17
19
|
def version():
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
typer.echo(
|
|
23
|
-
__("%app_name% v%version%", {'app_name': __app_name__, 'version': __version__}))
|
|
20
|
+
command_name = CliCommand.VERSION
|
|
21
|
+
app_logger.info(f'Running {command_name} from {get_current_directory()}')
|
|
22
|
+
check_command_permission(command_name)
|
|
23
|
+
|
|
24
|
+
typer.echo(f"{__app_name__} v{__version__}")
|
|
24
25
|
raise typer.Exit(0)
|
|
25
26
|
|
|
26
27
|
|
|
27
|
-
@app.command(name="connect", no_args_is_help=True, help=__("Connect to server instance or container
|
|
28
|
+
@app.command(name="connect", no_args_is_help=True, help=__("Connect to server instance or container or task"), **get_command_metadata(CliCommand.CONNECT))
|
|
28
29
|
def connect(
|
|
29
30
|
uid: Optional[str] = typer.Argument(
|
|
30
|
-
help=__("Unique ID of server instance or container"), ),
|
|
31
|
+
help=__("Unique ID of server instance or container or task ID"), ),
|
|
31
32
|
username: Optional[str] = typer.Option(
|
|
32
33
|
None,
|
|
33
34
|
'--username',
|
|
@@ -43,10 +44,9 @@ def connect(
|
|
|
43
44
|
is_eager=False,
|
|
44
45
|
),
|
|
45
46
|
):
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
app_logger.info(f'Connect to some entity with UID')
|
|
47
|
+
command_name = CliCommand.CONNECT
|
|
48
|
+
app_logger.info(f'Running {command_name} from {get_current_directory()}')
|
|
49
|
+
check_command_permission(command_name)
|
|
50
50
|
|
|
51
51
|
if private_ssh_key_path and not Path(private_ssh_key_path).is_file():
|
|
52
52
|
typer.echo(f'No file found at provided path {private_ssh_key_path}')
|
|
@@ -56,7 +56,11 @@ def connect(
|
|
|
56
56
|
|
|
57
57
|
connect_service: ConnectService = service_factory.get_connect_service()
|
|
58
58
|
|
|
59
|
-
connect_service.connect_to_entity(
|
|
59
|
+
connect_service.connect_to_entity(
|
|
60
|
+
uid=uid,
|
|
61
|
+
username=username,
|
|
62
|
+
private_key_path=private_ssh_key_path
|
|
63
|
+
)
|
|
60
64
|
|
|
61
65
|
|
|
62
66
|
app_logger.info(f'Stop connect to entity')
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import os
|
|
2
1
|
from pathlib import Path
|
|
3
2
|
|
|
4
3
|
import click
|
|
4
|
+
|
|
5
|
+
from thestage.cli_command import CliCommand
|
|
6
|
+
from thestage.cli_command_helper import get_command_metadata, check_command_permission
|
|
5
7
|
from thestage.services.core_files.config_entity import ConfigEntity
|
|
6
8
|
|
|
7
9
|
from thestage.entities.enums.yes_no_response import YesOrNoResponse
|
|
8
10
|
from thestage.i18n.translation import __
|
|
9
11
|
from thestage.helpers.logger.app_logger import app_logger, get_log_path_from_os
|
|
10
|
-
from thestage.services.config_provider.config_provider import ConfigProvider
|
|
11
12
|
from thestage.services.connect.connect_service import ConnectService
|
|
12
13
|
from thestage.services.service_factory import ServiceFactory
|
|
13
|
-
from thestage.controllers.utils_controller import get_current_directory
|
|
14
|
+
from thestage.controllers.utils_controller import get_current_directory
|
|
14
15
|
|
|
15
16
|
import typer
|
|
16
17
|
|
|
17
18
|
app = typer.Typer(no_args_is_help=True, help=__("Manage configuration settings"))
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
@app.command(name='get', no_args_is_help=False, help=__("Display all configuration settings"))
|
|
21
|
+
@app.command(name='get', no_args_is_help=False, help=__("Display all configuration settings"), **get_command_metadata(CliCommand.CONFIG_GET))
|
|
21
22
|
def config_get():
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
app_logger.info(f'Start config from {get_current_directory()}')
|
|
23
|
+
command_name = CliCommand.CONFIG_GET
|
|
24
|
+
app_logger.info(f'Running {command_name} from {get_current_directory()}')
|
|
25
|
+
check_command_permission(command_name)
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
config: ConfigEntity = config_provider.get_full_config()
|
|
27
|
+
config_provider = ServiceFactory().get_config_provider()
|
|
28
|
+
config: ConfigEntity = config_provider.get_config()
|
|
30
29
|
|
|
31
30
|
if not config:
|
|
32
31
|
typer.echo(__('No configuration found'))
|
|
33
32
|
raise typer.Exit(1)
|
|
34
33
|
|
|
35
|
-
config_provider.save_config(
|
|
34
|
+
config_provider.save_config()
|
|
36
35
|
|
|
37
36
|
typer.echo(__('THESTAGE TOKEN: %token%', {'token': config.main.thestage_auth_token or ''}))
|
|
38
37
|
typer.echo(__('THESTAGE API LINK: %link%', {'link': config.main.thestage_api_url or ''}))
|
|
@@ -45,7 +44,7 @@ def config_get():
|
|
|
45
44
|
raise typer.Exit(0)
|
|
46
45
|
|
|
47
46
|
|
|
48
|
-
@app.command(name='set', no_args_is_help=True, help=__("Update configuration settings"))
|
|
47
|
+
@app.command(name='set', no_args_is_help=True, help=__("Update configuration settings"), **get_command_metadata(CliCommand.CONFIG_SET))
|
|
49
48
|
def config_set(
|
|
50
49
|
token: str = typer.Option(
|
|
51
50
|
None,
|
|
@@ -55,40 +54,36 @@ def config_set(
|
|
|
55
54
|
is_eager=False,
|
|
56
55
|
),
|
|
57
56
|
):
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
app_logger.info(f'Start config from {get_current_directory()}')
|
|
62
|
-
|
|
63
|
-
config_provider = ConfigProvider(local_path=get_current_directory())
|
|
64
|
-
service_factory = ServiceFactory(config_provider)
|
|
57
|
+
command_name = CliCommand.CONFIG_SET
|
|
58
|
+
app_logger.info(f'Running {command_name} from {get_current_directory()}')
|
|
59
|
+
check_command_permission(command_name)
|
|
65
60
|
|
|
61
|
+
service_factory = ServiceFactory()
|
|
66
62
|
app_service = service_factory.get_app_config_service()
|
|
67
63
|
|
|
68
64
|
if token:
|
|
69
|
-
app_service.app_change_token(
|
|
65
|
+
app_service.app_change_token(token=token)
|
|
70
66
|
|
|
71
67
|
typer.echo('Configuration updated successfully')
|
|
72
68
|
raise typer.Exit(0)
|
|
73
69
|
|
|
74
70
|
|
|
75
|
-
@app.command(name='clear', no_args_is_help=False, help=__("Clear configuration"))
|
|
71
|
+
@app.command(name='clear', no_args_is_help=False, help=__("Clear configuration"), **get_command_metadata(CliCommand.CONFIG_CLEAR))
|
|
76
72
|
def config_clear():
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
config_dir = config_provider.get_full_config().runtime.config_global_path
|
|
73
|
+
command_name = CliCommand.CONFIG_CLEAR
|
|
74
|
+
app_logger.info(f'Running {command_name} from {get_current_directory()}')
|
|
75
|
+
check_command_permission(command_name)
|
|
76
|
+
|
|
77
|
+
config_provider = ServiceFactory().get_config_provider()
|
|
78
|
+
config_dir = config_provider.get_config().runtime.config_global_path
|
|
84
79
|
config_provider.clear_config()
|
|
85
80
|
typer.echo(f'Removed {config_dir}')
|
|
86
81
|
|
|
87
82
|
raise typer.Exit(0)
|
|
88
83
|
|
|
89
84
|
|
|
90
|
-
@app.command(name='upload-ssh-key', no_args_is_help=True, help=__("Send your public SSH key to the platform and / or rented server instance"))
|
|
91
|
-
def
|
|
85
|
+
@app.command(name='upload-ssh-key', no_args_is_help=True, help=__("Send your public SSH key to the platform and / or rented server instance"), **get_command_metadata(CliCommand.CONFIG_UPLOAD_SSH_KEY))
|
|
86
|
+
def upload_ssh_key(
|
|
92
87
|
ssh_public_key: str = typer.Argument(
|
|
93
88
|
help=__("Path to your public SSH key file or your public SSH key contents"),
|
|
94
89
|
),
|
|
@@ -100,14 +95,11 @@ def config_set(
|
|
|
100
95
|
is_eager=False,
|
|
101
96
|
)
|
|
102
97
|
):
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
app_logger.info(f'Start config from {get_current_directory()}')
|
|
98
|
+
command_name = CliCommand.CONFIG_UPLOAD_SSH_KEY
|
|
99
|
+
app_logger.info(f'Running {command_name} from {get_current_directory()}')
|
|
100
|
+
check_command_permission(command_name)
|
|
108
101
|
|
|
109
|
-
|
|
110
|
-
service_factory = ServiceFactory(config_provider)
|
|
102
|
+
service_factory = ServiceFactory()
|
|
111
103
|
connect_service: ConnectService = service_factory.get_connect_service()
|
|
112
104
|
|
|
113
105
|
is_path_provided_confirmed = False
|