PyBreeze 1.0.8__tar.gz → 1.0.10__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.
- {pybreeze-1.0.8 → pybreeze-1.0.10}/PKG-INFO +1 -1
- {pybreeze-1.0.8/pybreeze/pybreeze_ui → pybreeze-1.0.10/pybreeze}/extend_multi_language/extend_english.py +4 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui → pybreeze-1.0.10/pybreeze}/extend_multi_language/extend_traditional_chinese.py +4 -0
- pybreeze-1.0.10/pybreeze/extend_multi_language/update_language_dict.py +8 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/editor_main/main_ui.py +2 -4
- pybreeze-1.0.10/pybreeze/pybreeze_ui/jupyter_lab_gui/jupyer_lab_thread.py +95 -0
- pybreeze-1.0.10/pybreeze/pybreeze_ui/jupyter_lab_gui/jupyter_lab_widget.py +56 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze.egg-info/PKG-INFO +1 -1
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze.egg-info/SOURCES.txt +4 -4
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pyproject.toml +1 -1
- pybreeze-1.0.8/pybreeze/pybreeze_ui/extend_multi_language/update_language_dict.py +0 -8
- pybreeze-1.0.8/pybreeze/pybreeze_ui/jupyter_lab_gui/jupyer_lab_thread.py +0 -54
- pybreeze-1.0.8/pybreeze/pybreeze_ui/jupyter_lab_gui/jupyter_lab_widget.py +0 -58
- {pybreeze-1.0.8 → pybreeze-1.0.10}/LICENSE +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/README.md +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/__main__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/mail_thunder_extend/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/mail_thunder_extend/mail_thunder_setting.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/api_testka/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/api_testka/api_testka_process.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/auto_control/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/auto_control/auto_control_process.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/file_automation/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/file_automation/file_automation_process.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/load_density/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/load_density/load_density_process.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/mail_thunder/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/mail_thunder/mail_thunder_process.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/process_executor_utils.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/python_task_process_manager.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/test_pioneer/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/test_pioneer/test_pioneer_process_manager.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/web_runner/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/web_runner/web_runner_process.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui → pybreeze-1.0.10/pybreeze/extend_multi_language}/__init__.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/connect_gui → pybreeze-1.0.10/pybreeze/pybreeze_ui}/__init__.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/connect_gui/ssh → pybreeze-1.0.10/pybreeze/pybreeze_ui/connect_gui}/__init__.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/connect_gui/url → pybreeze-1.0.10/pybreeze/pybreeze_ui/connect_gui/ssh}/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/connect_gui/ssh/ssh_command_widget.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/connect_gui/ssh/ssh_file_viewer_widget.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/connect_gui/ssh/ssh_login_widget.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/connect_gui/ssh/ssh_main_widget.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/editor_main → pybreeze-1.0.10/pybreeze/pybreeze_ui/connect_gui/url}/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/connect_gui/url/ai_code_review_gui.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/extend_ai_gui → pybreeze-1.0.10/pybreeze/pybreeze_ui/editor_main}/__init__.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/extend_ai_gui/code_review → pybreeze-1.0.10/pybreeze/pybreeze_ui/extend_ai_gui}/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/ai_gui_global_variable.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui → pybreeze-1.0.10/pybreeze/pybreeze_ui/extend_ai_gui/code_review}/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/code_review/code_review_thread.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/code_review/cot_code_review_gui.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates → pybreeze-1.0.10/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui}/__init__.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_templates → pybreeze-1.0.10/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates}/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/code_smell_detector.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/first_code_review.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/first_summary_prompt.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/global_rule.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/judge.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/judge_single_review.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/linter.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/step_by_step_analysis.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_code_review_prompt_templates/total_summary.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/cot_prompt_editor_widget.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_editor_widget.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/extend_ai_gui/skills → pybreeze-1.0.10/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_templates}/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_templates/code_explainer.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_templates/code_review.py +0 -0
- {pybreeze-1.0.8/pybreeze/pybreeze_ui/extend_multi_language → pybreeze-1.0.10/pybreeze/pybreeze_ui/extend_ai_gui/skills}/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/skills/skills_send_gui.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/jupyter_lab_gui/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/api_testka_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/api_testka_menu/build_api_testka_menu.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/auto_control_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/auto_control_menu/build_autocontrol_menu.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/automation_file_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/automation_file_menu/build_automation_file_menu.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/load_density_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/load_density_menu/build_load_density_menu.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/mail_thunder_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/mail_thunder_menu/build_mail_thunder_menu.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/test_pioneer_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/test_pioneer_menu/build_test_pioneer_menu.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/web_runner_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/automation_menu/web_runner_menu/build_webrunner_menu.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/build_menubar.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/extend_jeditor_tab_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/extend_jeditor_tab_menu/jupyter_lab_tab.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/install_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/install_menu/automation_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/install_menu/automation_menu/build_automation_install_menu.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/install_menu/install_utils.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/install_menu/tools_menu/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/install_menu/tools_menu/build_tool_install_menu.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/menu_utils.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/tools/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/tools/tools_menu.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/show_code_window/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/show_code_window/code_window.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/syntax/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/syntax/syntax_extend.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/syntax/syntax_keyword.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/exception/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/exception/exception_tags.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/exception/exceptions.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/file_process/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/file_process/get_dir_file_list.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/json_format/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/json_format/json_process.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/logging/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/logging/logger.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/manager/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/manager/package_manager/__init__.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/manager/package_manager/package_manager_class.py +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze.egg-info/dependency_links.txt +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze.egg-info/requires.txt +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze.egg-info/top_level.txt +0 -0
- {pybreeze-1.0.8 → pybreeze-1.0.10}/setup.cfg +0 -0
|
@@ -270,5 +270,9 @@ def update_english_word_dict():
|
|
|
270
270
|
"skills_response_label": "Response:",
|
|
271
271
|
"skills_missing_input": "Please enter API URL and Prompt",
|
|
272
272
|
"skills_generating": "Generating...",
|
|
273
|
+
# JupyterLab GUI
|
|
274
|
+
"jupyterlab_init": "Initializing...",
|
|
275
|
+
"jupyterlab_downloading": "Downloading...",
|
|
276
|
+
"jupyterlab_loading": "Loading..."
|
|
273
277
|
}
|
|
274
278
|
)
|
|
@@ -270,5 +270,9 @@ def update_traditional_chinese_word_dict():
|
|
|
270
270
|
"skills_response_label": "回傳結果:",
|
|
271
271
|
"skills_missing_input": "請輸入 API URL 和 Prompt",
|
|
272
272
|
"skills_generating": "產生中...",
|
|
273
|
+
# JupyterLab GUI
|
|
274
|
+
"jupyterlab_init": "初始化中...",
|
|
275
|
+
"jupyterlab_downloading": "下載中...",
|
|
276
|
+
"jupyterlab_loading": "載入中...",
|
|
273
277
|
}
|
|
274
278
|
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from pybreeze.extend_multi_language.extend_english import update_english_word_dict
|
|
2
|
+
from pybreeze.extend_multi_language.extend_traditional_chinese import \
|
|
3
|
+
update_traditional_chinese_word_dict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def update_language_dict():
|
|
7
|
+
update_traditional_chinese_word_dict()
|
|
8
|
+
update_english_word_dict()
|
|
@@ -4,17 +4,15 @@ from os import environ
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from typing import List, Dict, Type
|
|
6
6
|
|
|
7
|
-
from pybreeze.utils.logging.logger import pybreeze_logger
|
|
8
|
-
|
|
9
7
|
environ["LOCUST_SKIP_MONKEY_PATCH"] = "1"
|
|
10
8
|
|
|
11
9
|
from PySide6.QtCore import QTimer, QCoreApplication
|
|
12
10
|
from PySide6.QtGui import QIcon
|
|
13
|
-
from PySide6.QtWidgets import QApplication, QWidget
|
|
11
|
+
from PySide6.QtWidgets import QApplication, QWidget
|
|
14
12
|
from je_editor import EditorMain, language_wrapper
|
|
15
13
|
from qt_material import apply_stylesheet
|
|
16
14
|
|
|
17
|
-
from pybreeze.
|
|
15
|
+
from pybreeze.extend_multi_language.update_language_dict import update_language_dict
|
|
18
16
|
from pybreeze.pybreeze_ui.menu.build_menubar import add_menu_to_menubar
|
|
19
17
|
from pybreeze.pybreeze_ui.syntax.syntax_extend import \
|
|
20
18
|
syntax_extend_package
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import socket
|
|
3
|
+
import subprocess
|
|
4
|
+
import sys
|
|
5
|
+
from PySide6.QtCore import QThread, Signal
|
|
6
|
+
import time
|
|
7
|
+
|
|
8
|
+
from je_editor import language_wrapper
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def find_free_port():
|
|
12
|
+
s = socket.socket()
|
|
13
|
+
s.bind(("", 0))
|
|
14
|
+
port = s.getsockname()[1]
|
|
15
|
+
s.close()
|
|
16
|
+
return port
|
|
17
|
+
|
|
18
|
+
def get_venv_python():
|
|
19
|
+
# 如果在 venv 中
|
|
20
|
+
if hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix):
|
|
21
|
+
return sys.executable
|
|
22
|
+
|
|
23
|
+
# 嘗試從常見位置找 venv
|
|
24
|
+
possible_paths = [
|
|
25
|
+
os.path.join(os.getcwd(), "venv", "Scripts", "python.exe"),
|
|
26
|
+
os.path.join(os.getcwd(), ".venv", "Scripts", "python.exe"),
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
for path in possible_paths:
|
|
30
|
+
if os.path.exists(path):
|
|
31
|
+
return path
|
|
32
|
+
|
|
33
|
+
raise RuntimeError("找不到 venv 的 python.exe")
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def is_jupyter_installed(python_exe):
|
|
37
|
+
result = subprocess.run(
|
|
38
|
+
[python_exe, "-m", "pip", "show", "jupyterlab"],
|
|
39
|
+
stdout=subprocess.PIPE,
|
|
40
|
+
stderr=subprocess.PIPE
|
|
41
|
+
)
|
|
42
|
+
return result.returncode == 0
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class JupyterLauncherThread(QThread):
|
|
46
|
+
server_ready = Signal(str)
|
|
47
|
+
status_update = Signal(str)
|
|
48
|
+
|
|
49
|
+
def __init__(self):
|
|
50
|
+
super().__init__()
|
|
51
|
+
self.process = None
|
|
52
|
+
|
|
53
|
+
def run(self):
|
|
54
|
+
python_exe = get_venv_python()
|
|
55
|
+
|
|
56
|
+
if not is_jupyter_installed(python_exe):
|
|
57
|
+
self.status_update.emit(language_wrapper.language_word_dict.get("jupyterlab_downloading"))
|
|
58
|
+
subprocess.run([
|
|
59
|
+
python_exe,
|
|
60
|
+
"-m",
|
|
61
|
+
"pip",
|
|
62
|
+
"install",
|
|
63
|
+
"jupyterlab",
|
|
64
|
+
"-U"
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
self.status_update.emit(language_wrapper.language_word_dict.get("jupyterlab_loading"))
|
|
68
|
+
|
|
69
|
+
port = find_free_port()
|
|
70
|
+
|
|
71
|
+
self.process = subprocess.Popen([
|
|
72
|
+
python_exe,
|
|
73
|
+
"-m",
|
|
74
|
+
"jupyterlab",
|
|
75
|
+
"--no-browser",
|
|
76
|
+
f"--ServerApp.port={port}",
|
|
77
|
+
"--ServerApp.token=",
|
|
78
|
+
"--ServerApp.password=",
|
|
79
|
+
"--ServerApp.allow_origin=*",
|
|
80
|
+
"--ServerApp.disable_check_xsrf=True",
|
|
81
|
+
])
|
|
82
|
+
|
|
83
|
+
while True:
|
|
84
|
+
try:
|
|
85
|
+
s = socket.create_connection(("localhost", port), timeout=0.5)
|
|
86
|
+
s.close()
|
|
87
|
+
break
|
|
88
|
+
except OSError:
|
|
89
|
+
time.sleep(0.2)
|
|
90
|
+
|
|
91
|
+
self.server_ready.emit(f"http://localhost:{port}/lab")
|
|
92
|
+
|
|
93
|
+
def stop(self):
|
|
94
|
+
if self.process:
|
|
95
|
+
self.process.terminate()
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
from PySide6.QtCore import QUrl
|
|
4
|
+
from PySide6.QtWebEngineWidgets import QWebEngineView
|
|
5
|
+
from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget, QLabel
|
|
6
|
+
from je_editor import language_wrapper
|
|
7
|
+
|
|
8
|
+
from pybreeze.pybreeze_ui.jupyter_lab_gui.jupyer_lab_thread import JupyterLauncherThread
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class JupyterLabWidget(QWidget):
|
|
12
|
+
|
|
13
|
+
def __init__(self):
|
|
14
|
+
super().__init__()
|
|
15
|
+
|
|
16
|
+
layout = QVBoxLayout(self)
|
|
17
|
+
|
|
18
|
+
self.status_label = QLabel(language_wrapper.language_word_dict.get("jupyterlab_init"))
|
|
19
|
+
layout.addWidget(self.status_label)
|
|
20
|
+
|
|
21
|
+
self.browser = QWebEngineView()
|
|
22
|
+
self.browser.hide()
|
|
23
|
+
layout.addWidget(self.browser)
|
|
24
|
+
|
|
25
|
+
self.thread = JupyterLauncherThread()
|
|
26
|
+
self.thread.status_update.connect(self.update_status)
|
|
27
|
+
self.thread.server_ready.connect(self.load_lab)
|
|
28
|
+
self.thread.start()
|
|
29
|
+
|
|
30
|
+
def update_status(self, text):
|
|
31
|
+
self.status_label.setText(text)
|
|
32
|
+
|
|
33
|
+
def load_lab(self, url):
|
|
34
|
+
if self.status_label:
|
|
35
|
+
self.status_label.setParent(None)
|
|
36
|
+
self.status_label.deleteLater()
|
|
37
|
+
self.status_label = None
|
|
38
|
+
|
|
39
|
+
self.browser.setUrl(QUrl(url))
|
|
40
|
+
self.browser.show()
|
|
41
|
+
|
|
42
|
+
def closeEvent(self, event):
|
|
43
|
+
if self.thread.isRunning():
|
|
44
|
+
self.thread.stop()
|
|
45
|
+
self.thread.quit()
|
|
46
|
+
self.thread.wait()
|
|
47
|
+
event.accept()
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
if __name__ == "__main__":
|
|
51
|
+
app = QApplication(sys.argv)
|
|
52
|
+
|
|
53
|
+
win = JupyterLabWidget()
|
|
54
|
+
win.showMaximized()
|
|
55
|
+
|
|
56
|
+
sys.exit(app.exec())
|
|
@@ -28,6 +28,10 @@ pybreeze/extend/process_executor/test_pioneer/__init__.py
|
|
|
28
28
|
pybreeze/extend/process_executor/test_pioneer/test_pioneer_process_manager.py
|
|
29
29
|
pybreeze/extend/process_executor/web_runner/__init__.py
|
|
30
30
|
pybreeze/extend/process_executor/web_runner/web_runner_process.py
|
|
31
|
+
pybreeze/extend_multi_language/__init__.py
|
|
32
|
+
pybreeze/extend_multi_language/extend_english.py
|
|
33
|
+
pybreeze/extend_multi_language/extend_traditional_chinese.py
|
|
34
|
+
pybreeze/extend_multi_language/update_language_dict.py
|
|
31
35
|
pybreeze/pybreeze_ui/__init__.py
|
|
32
36
|
pybreeze/pybreeze_ui/connect_gui/__init__.py
|
|
33
37
|
pybreeze/pybreeze_ui/connect_gui/ssh/__init__.py
|
|
@@ -62,10 +66,6 @@ pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_templates/code_
|
|
|
62
66
|
pybreeze/pybreeze_ui/extend_ai_gui/prompt_edit_gui/skills_prompt_templates/code_review.py
|
|
63
67
|
pybreeze/pybreeze_ui/extend_ai_gui/skills/__init__.py
|
|
64
68
|
pybreeze/pybreeze_ui/extend_ai_gui/skills/skills_send_gui.py
|
|
65
|
-
pybreeze/pybreeze_ui/extend_multi_language/__init__.py
|
|
66
|
-
pybreeze/pybreeze_ui/extend_multi_language/extend_english.py
|
|
67
|
-
pybreeze/pybreeze_ui/extend_multi_language/extend_traditional_chinese.py
|
|
68
|
-
pybreeze/pybreeze_ui/extend_multi_language/update_language_dict.py
|
|
69
69
|
pybreeze/pybreeze_ui/jupyter_lab_gui/__init__.py
|
|
70
70
|
pybreeze/pybreeze_ui/jupyter_lab_gui/jupyer_lab_thread.py
|
|
71
71
|
pybreeze/pybreeze_ui/jupyter_lab_gui/jupyter_lab_widget.py
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
from pybreeze.pybreeze_ui.extend_multi_language.extend_english import update_english_word_dict
|
|
2
|
-
from pybreeze.pybreeze_ui.extend_multi_language.extend_traditional_chinese import \
|
|
3
|
-
update_traditional_chinese_word_dict
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def update_language_dict():
|
|
7
|
-
update_traditional_chinese_word_dict()
|
|
8
|
-
update_english_word_dict()
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import socket
|
|
2
|
-
import subprocess
|
|
3
|
-
import sys
|
|
4
|
-
from PySide6.QtCore import QThread, Signal
|
|
5
|
-
import time
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def find_free_port():
|
|
9
|
-
s = socket.socket()
|
|
10
|
-
s.bind(("", 0))
|
|
11
|
-
port = s.getsockname()[1]
|
|
12
|
-
s.close()
|
|
13
|
-
return port
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class JupyterServerThread(QThread):
|
|
17
|
-
server_ready = Signal(str)
|
|
18
|
-
|
|
19
|
-
def __init__(self):
|
|
20
|
-
super().__init__()
|
|
21
|
-
self.process = None
|
|
22
|
-
|
|
23
|
-
def run(self):
|
|
24
|
-
port = find_free_port()
|
|
25
|
-
|
|
26
|
-
cmd = [
|
|
27
|
-
sys.executable,
|
|
28
|
-
"-m",
|
|
29
|
-
"jupyterlab",
|
|
30
|
-
"--no-browser",
|
|
31
|
-
f"--ServerApp.port={port}",
|
|
32
|
-
"--ServerApp.token=",
|
|
33
|
-
"--ServerApp.password=",
|
|
34
|
-
"--ServerApp.allow_origin=*",
|
|
35
|
-
"--ServerApp.disable_check_xsrf=True",
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
self.process = subprocess.Popen(cmd)
|
|
39
|
-
|
|
40
|
-
# 輪詢 port,直到可連
|
|
41
|
-
while True:
|
|
42
|
-
try:
|
|
43
|
-
s = socket.create_connection(("localhost", port), timeout=0.5)
|
|
44
|
-
s.close()
|
|
45
|
-
break
|
|
46
|
-
except OSError:
|
|
47
|
-
time.sleep(0.1)
|
|
48
|
-
|
|
49
|
-
# Server ready,發射 signal
|
|
50
|
-
self.server_ready.emit(f"http://localhost:{port}/lab")
|
|
51
|
-
|
|
52
|
-
def stop(self):
|
|
53
|
-
if self.process:
|
|
54
|
-
self.process.terminate()
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
|
|
3
|
-
from PySide6.QtCore import QUrl
|
|
4
|
-
from PySide6.QtWebEngineWidgets import QWebEngineView
|
|
5
|
-
from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget
|
|
6
|
-
|
|
7
|
-
from pybreeze.pybreeze_ui.jupyter_lab_gui.jupyer_lab_thread import JupyterServerThread
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class JupyterLabWidget(QWidget):
|
|
11
|
-
|
|
12
|
-
def __init__(self):
|
|
13
|
-
super().__init__()
|
|
14
|
-
|
|
15
|
-
layout = QVBoxLayout(self)
|
|
16
|
-
|
|
17
|
-
self.browser = QWebEngineView()
|
|
18
|
-
layout.addWidget(self.browser)
|
|
19
|
-
|
|
20
|
-
# 啟動 Jupyter server thread
|
|
21
|
-
self.thread = JupyterServerThread()
|
|
22
|
-
self.thread.server_ready.connect(self.load_lab)
|
|
23
|
-
self.thread.start()
|
|
24
|
-
|
|
25
|
-
def load_lab(self, url: str):
|
|
26
|
-
"""Load JupyterLab URL into WebEngine"""
|
|
27
|
-
|
|
28
|
-
if not url:
|
|
29
|
-
print("Invalid JupyterLab URL")
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
print("JupyterLab running at:", url)
|
|
33
|
-
|
|
34
|
-
qurl = QUrl(url)
|
|
35
|
-
|
|
36
|
-
if not qurl.isValid():
|
|
37
|
-
print("Invalid QUrl:", url)
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
self.browser.setUrl(qurl)
|
|
41
|
-
|
|
42
|
-
def closeEvent(self, event):
|
|
43
|
-
|
|
44
|
-
if hasattr(self, "thread") and self.thread.isRunning():
|
|
45
|
-
self.thread.stop()
|
|
46
|
-
self.thread.quit()
|
|
47
|
-
self.thread.wait()
|
|
48
|
-
|
|
49
|
-
event.accept()
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if __name__ == "__main__":
|
|
53
|
-
app = QApplication(sys.argv)
|
|
54
|
-
|
|
55
|
-
win = JupyterLabWidget()
|
|
56
|
-
win.show()
|
|
57
|
-
|
|
58
|
-
sys.exit(app.exec())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/mail_thunder_extend/mail_thunder_setting.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/api_testka/api_testka_process.py
RENAMED
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/auto_control/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/file_automation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/load_density/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/mail_thunder/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/process_executor_utils.py
RENAMED
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/python_task_process_manager.py
RENAMED
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/test_pioneer/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/extend/process_executor/web_runner/web_runner_process.py
RENAMED
|
File without changes
|
{pybreeze-1.0.8/pybreeze/pybreeze_ui → pybreeze-1.0.10/pybreeze/extend_multi_language}/__init__.py
RENAMED
|
File without changes
|
{pybreeze-1.0.8/pybreeze/pybreeze_ui/connect_gui → pybreeze-1.0.10/pybreeze/pybreeze_ui}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/connect_gui/ssh/ssh_command_widget.py
RENAMED
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/connect_gui/ssh/ssh_file_viewer_widget.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/connect_gui/url/ai_code_review_gui.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/ai_gui_global_variable.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/extend_ai_gui/skills/skills_send_gui.py
RENAMED
|
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
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/extend_jeditor_tab_menu/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/pybreeze_ui/menu/install_menu/tools_menu/__init__.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybreeze-1.0.8 → pybreeze-1.0.10}/pybreeze/utils/manager/package_manager/package_manager_class.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|