Skip to content

Commit f804a0e

Browse files
authored
Merge pull request #154 from Integration-Automation/dev
Dev
2 parents d0d0b71 + 8e68e5d commit f804a0e

File tree

12 files changed

+36
-167
lines changed

12 files changed

+36
-167
lines changed

dev.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ build-backend = "setuptools.build_meta"
66

77
[project]
88
name = "je_editor_dev"
9-
version = "0.0.214"
9+
version = "0.0.219"
1010
authors = [
1111
{ name = "JE-Chen", email = "[email protected]" },
1212
]
1313
description = "JEditor is basic but powerful editor include GPT"
1414
requires-python = ">=3.9"
1515
license = { text = "MIT" }
1616
dependencies = [
17-
"PySide6==6.7.3", "qt-material", "yapf", "frontengine", "pycodestyle", "jedi", "qtconsole", "re-edge-gpt[gui]"
17+
"PySide6==6.8.2.1", "qt-material", "yapf", "frontengine", "pycodestyle", "jedi", "qtconsole"
1818
]
1919
classifiers = [
2020
"Programming Language :: Python :: 3.9",

dev_requirements.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
frontengine
2-
PySide6==6.7.3
1+
PySide6==6.8.2.1
32
sphinx
43
twine
54
build
6-
je_editor_dev
5+
je_editor_dev
6+
auto-py-to-exe
7+
twine
8+
wheel
9+
build

exe/auto_py_to_exe.json

+5-81
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
{
99
"optionDest": "filenames",
10-
"value": "C:/CodeWorkspace/je_editor/exe/start_editor.py"
10+
"value": "C:/CodeWorkspace/Python/JEDITOR/exe/start_editor.py"
1111
},
1212
{
1313
"optionDest": "onefile",
@@ -19,16 +19,12 @@
1919
},
2020
{
2121
"optionDest": "icon_file",
22-
"value": "C:/CodeWorkspace/je_editor/exe/je_driver_icon.ico"
22+
"value": "C:/CodeWorkspace/Python/JEDITOR/exe/je_driver_icon.ico"
2323
},
2424
{
2525
"optionDest": "name",
2626
"value": "JEditor"
2727
},
28-
{
29-
"optionDest": "ascii",
30-
"value": false
31-
},
3228
{
3329
"optionDest": "clean_build",
3430
"value": false
@@ -45,10 +41,6 @@
4541
"optionDest": "disable_windowed_traceback",
4642
"value": false
4743
},
48-
{
49-
"optionDest": "embed_manifest",
50-
"value": true
51-
},
5244
{
5345
"optionDest": "uac_admin",
5446
"value": false
@@ -58,88 +50,20 @@
5850
"value": false
5951
},
6052
{
61-
"optionDest": "win_private_assemblies",
62-
"value": false
63-
},
64-
{
65-
"optionDest": "win_no_prefer_redirects",
53+
"optionDest": "argv_emulation",
6654
"value": false
6755
},
6856
{
6957
"optionDest": "bootloader_ignore_signals",
7058
"value": false
7159
},
72-
{
73-
"optionDest": "argv_emulation",
74-
"value": false
75-
},
76-
{
77-
"optionDest": "datas",
78-
"value": "C:/CodeWorkspace/je_editor/exe/je_driver_icon.ico;."
79-
},
8060
{
8161
"optionDest": "datas",
82-
"value": "C:/CodeWorkspace/je_editor/venv/Lib/site-packages/yapf_third_party;yapf_third_party/"
62+
"value": "C:/CodeWorkspace/Python/JEDITOR/exe/je_driver_icon.ico;."
8363
},
8464
{
8565
"optionDest": "pathex",
86-
"value": "C:/CodeWorkspace/je_editor/venv"
87-
},
88-
{
89-
"optionDest": "datas",
90-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/jupyter_client;jupyter_client/"
91-
},
92-
{
93-
"optionDest": "datas",
94-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/jupyter_client-8.3.1.dist-info;jupyter_client-8.3.1.dist-info/"
95-
},
96-
{
97-
"optionDest": "datas",
98-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/jupyter_core-5.3.1.dist-info;jupyter_core-5.3.1.dist-info/"
99-
},
100-
{
101-
"optionDest": "datas",
102-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/jupyter_core;jupyter_core/"
103-
},
104-
{
105-
"optionDest": "datas",
106-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/qtconsole-5.4.4.dist-info;qtconsole-5.4.4.dist-info/"
107-
},
108-
{
109-
"optionDest": "datas",
110-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/qtconsole;qtconsole/"
111-
},
112-
{
113-
"optionDest": "datas",
114-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/ipython-8.15.0.dist-info;ipython-8.15.0.dist-info/"
115-
},
116-
{
117-
"optionDest": "datas",
118-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/IPython;IPython/"
119-
},
120-
{
121-
"optionDest": "datas",
122-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/debugpy/_vendored/pydevd/pydev_ipython;pydev_ipython/"
123-
},
124-
{
125-
"optionDest": "datas",
126-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/ipython_genutils-0.2.0.dist-info;ipython_genutils-0.2.0.dist-info/"
127-
},
128-
{
129-
"optionDest": "datas",
130-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/ipython_genutils;ipython_genutils/"
131-
},
132-
{
133-
"optionDest": "datas",
134-
"value": "C:/CodeWorkspace/je_editor/exe/venv/Lib/site-packages/debugpy;debugpy/"
135-
},
136-
{
137-
"optionDest": "datas",
138-
"value": "C:/CodeWorkspace/je_editor/venv/Lib/site-packages/parso;parso/"
139-
},
140-
{
141-
"optionDest": "datas",
142-
"value": "C:/CodeWorkspace/je_editor/venv/Lib/site-packages/jedi;jedi/"
66+
"value": "C:/CodeWorkspace/Python/JEDITOR/.venv"
14367
}
14468
],
14569
"nonPyinstallerOptions": {

je_editor/pyside_ui/browser/browser_view.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import pathlib
12
from typing import List
23

34
from PySide6.QtCore import Qt
5+
from PySide6.QtNetwork import QNetworkCookie
46
from PySide6.QtWebEngineCore import QWebEngineDownloadRequest
57
from PySide6.QtWebEngineWidgets import QWebEngineView
68

@@ -18,7 +20,6 @@ def __init__(self, start_url: str = "https://www.google.com/"):
1820
self.download_list: List[QWebEngineDownloadRequest] = list()
1921
self.download_window_list: List[BrowserDownloadWindow] = list()
2022
self.page().profile().downloadRequested.connect(self.download_file)
21-
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
2223

2324
def download_file(self, download_instance: QWebEngineDownloadRequest):
2425
jeditor_logger.info("Download File "

je_editor/pyside_ui/code/syntax/python_syntax.py

+10-8
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,25 @@ def __init__(self, parent=None, main_window: CodeEditor = None):
2525
current_file_suffix = Path(main_window.current_file).suffix
2626
else:
2727
current_file_suffix = ".py"
28+
# Basic Highlight
29+
for rule_variable_dict in syntax_rule_setting_dict.values():
30+
color = rule_variable_dict.get("color")
31+
text_char_format = QTextCharFormat()
32+
text_char_format.setForeground(color)
33+
for rule in rule_variable_dict.get("rules"):
34+
pattern = QRegularExpression(rule)
35+
self.highlight_rules.append((pattern, text_char_format))
2836
if current_file_suffix == ".py":
29-
# Highlight
37+
# Python Highlight
3038
for rule_variable_dict in syntax_word_setting_dict.values():
3139
color = rule_variable_dict.get("color")
3240
text_char_format = QTextCharFormat()
3341
text_char_format.setForeground(color)
3442
for word in rule_variable_dict.get("words"):
3543
pattern = QRegularExpression(rf"\b{word}\b")
3644
self.highlight_rules.append((pattern, text_char_format))
37-
for rule_variable_dict in syntax_rule_setting_dict.values():
38-
color = rule_variable_dict.get("color")
39-
text_char_format = QTextCharFormat()
40-
text_char_format.setForeground(color)
41-
for rule in rule_variable_dict.get("rules"):
42-
pattern = QRegularExpression(rule)
43-
self.highlight_rules.append((pattern, text_char_format))
4445
else:
46+
# Another Highlight
4547
if syntax_extend_setting_dict.get(current_file_suffix):
4648
for rule_variable_dict in syntax_extend_setting_dict.get(current_file_suffix).values():
4749
color = rule_variable_dict.get("color")

je_editor/pyside_ui/main_ui/menu/help_menu/build_help_menu.py

-26
Original file line numberDiff line numberDiff line change
@@ -45,32 +45,6 @@ def set_help_menu(ui_we_want_to_set: EditorMain) -> None:
4545
show_about
4646
)
4747
ui_we_want_to_set.help_menu.addAction(ui_we_want_to_set.help_menu.help_about_action)
48-
# Open Doc
49-
ui_we_want_to_set.help_menu.open_bing_gpt_menu_doc_action = QAction(
50-
language_wrapper.language_word_dict.get("help_menu_open_re_edge_gpt_doc_label"))
51-
ui_we_want_to_set.help_menu.open_bing_gpt_menu_doc_action.triggered.connect(
52-
lambda: open_web_browser(
53-
ui_we_want_to_set,
54-
"https://reedgegpt.readthedocs.io/en/latest/",
55-
"ReEdgeGPT Doc"
56-
)
57-
)
58-
ui_we_want_to_set.help_menu.addAction(
59-
ui_we_want_to_set.help_menu.open_bing_gpt_menu_doc_action
60-
)
61-
# Open Github
62-
ui_we_want_to_set.help_menu.open_re_edge_gpt_github_action = QAction(
63-
language_wrapper.language_word_dict.get("help_menu_open_re_edge_gpt_github_label"))
64-
ui_we_want_to_set.help_menu.open_re_edge_gpt_github_action.triggered.connect(
65-
lambda: open_web_browser(
66-
ui_we_want_to_set,
67-
"https://github.com/Integration-Automation/ReEdgeGPT",
68-
"ReEdgeGPT GitHub"
69-
)
70-
)
71-
ui_we_want_to_set.help_menu.addAction(
72-
ui_we_want_to_set.help_menu.open_re_edge_gpt_github_action
73-
)
7448

7549

7650
def open_web_browser(ui_we_want_to_set: EditorMain, url: str, tab_name: str):

je_editor/pyside_ui/main_ui/menu/style_menu/build_style_menu.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ def set_style_menu(ui_we_want_to_set: EditorMain) -> None:
1818
ui_we_want_to_set.menu.style_menu = ui_we_want_to_set.menu.addMenu(
1919
language_wrapper.language_word_dict.get("style_menu_label")
2020
)
21-
for style in [
22-
'dark_amber.xml', 'dark_blue.xml', 'dark_cyan.xml', 'dark_lightgreen.xml', 'dark_pink.xml',
23-
'dark_purple.xml', 'dark_red.xml', 'dark_teal.xml', 'dark_yellow.xml', 'light_amber.xml',
24-
'light_blue.xml', 'light_cyan.xml', 'light_cyan_500.xml', 'light_lightgreen.xml',
25-
'light_pink.xml', 'light_purple.xml', 'light_red.xml', 'light_teal.xml', 'light_yellow.xml'
26-
]:
21+
for style in ['dark_amber.xml', 'dark_blue.xml', 'dark_cyan.xml', 'dark_lightgreen.xml',
22+
'dark_pink.xml', 'dark_purple.xml', 'dark_red.xml', 'dark_teal.xml',
23+
'dark_yellow.xml', 'light_amber.xml', 'light_blue.xml', 'light_cyan.xml',
24+
'light_cyan_500.xml', 'light_lightgreen.xml', 'light_pink.xml', 'light_purple.xml'
25+
]:
2726
change_style_action = QAction(style, parent=ui_we_want_to_set.menu.style_menu)
2827
change_style_action.triggered.connect(
2928
lambda checked=False, action=change_style_action: set_style(ui_we_want_to_set, action))

je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py

-16
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
from je_editor.pyside_ui.browser.browser_widget import BrowserWidget
88
from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
99
from je_editor.pyside_ui.main_ui.ipython_widget.rich_jupyter import IpythonWidget
10-
from re_edge_gpt.ui.chat.main_ui import ChatMainUI
11-
1210
from je_editor.utils.logging.loggin_instance import jeditor_logger
1311

1412
if TYPE_CHECKING:
@@ -57,13 +55,6 @@ def set_tab_menu(ui_we_want_to_set: EditorMain) -> None:
5755
lambda: add_ipython_tab(ui_we_want_to_set)
5856
)
5957
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_ipython_action)
60-
# ReEdgeGPT (Need fix it first)
61-
# ui_we_want_to_set.tab_menu.add_re_edge_gpt_action = QAction(
62-
# language_wrapper.language_word_dict.get("tab_menu_re_re_edge_gpt_tab_name"))
63-
# ui_we_want_to_set.tab_menu.add_re_edge_gpt_action.triggered.connect(
64-
# lambda: add_re_edge_gpt_tab(ui_we_want_to_set)
65-
# )
66-
# ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_re_edge_gpt_action)
6758

6859

6960
def add_editor_tab(ui_we_want_to_set: EditorMain):
@@ -107,10 +98,3 @@ def add_ipython_tab(ui_we_want_to_set: EditorMain):
10798
f"{language_wrapper.language_word_dict.get('tab_menu_ipython_tab_name')} "
10899
f"{ui_we_want_to_set.tab_widget.count()}")
109100

110-
111-
def add_re_edge_gpt_tab(ui_we_want_to_set: EditorMain):
112-
jeditor_logger.info(f"build_tab_menu.py add_re_edge_gpt_tab ui_we_want_to_set: {ui_we_want_to_set}")
113-
ui_we_want_to_set.tab_widget.addTab(
114-
ChatMainUI(),
115-
f"{language_wrapper.language_word_dict.get('tab_name_re_edge_gpt')} "
116-
f"{ui_we_want_to_set.tab_widget.count()}")

je_editor/utils/multi_language/english.py

-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"tab_name_editor": "Editor",
66
"tab_name_web_browser": "Web Browser",
77
"tab_name_frontengine": "FrontEngine",
8-
"tab_name_re_edge_gpt": "Re-EdgeGPT",
98
# Browser
109
"browser_download_detail": "Download Detail",
1110
"browser_find_text": "Find Text",
@@ -53,8 +52,6 @@
5352
"help_menu_open_github_label": "GitHub",
5453
"help_menu_open_doc_label": "Doc",
5554
"help_menu_open_about_label": "About",
56-
"help_menu_open_re_edge_gpt_doc_label": "Open ReEdgeGPT Doc",
57-
"help_menu_open_re_edge_gpt_github_label": "Open ReEdgeGPT GitHub",
5855
# Python Env Menu
5956
"python_env_menu_label": "Python Env",
6057
"python_env_menu_create_venv_label": "Create venv",
@@ -109,7 +106,6 @@
109106
"tab_menu_web_tab_name": "WEB Browser",
110107
"tab_menu_stackoverflow_tab_name": "Stackoverflow",
111108
"tab_menu_ipython_tab_name": "IPython(Jupyter)",
112-
"tab_menu_re_re_edge_gpt_tab_name": "ReEdgeGPT",
113109
# Text Menu
114110
"text_menu_label": "Text",
115111
"text_menu_label_font": "Font",

je_editor/utils/multi_language/traditional_chinese.py

-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"tab_name_editor": "編輯器",
66
"tab_name_web_browser": "網頁瀏覽器",
77
"tab_name_frontengine": "前景引擎",
8-
"tab_name_re_edge_gpt": "Re-EdgeGPT",
98
# Browser
109
"browser_download_detail": "下載資訊",
1110
"browser_find_text": "搜尋文字",
@@ -53,8 +52,6 @@
5352
"help_menu_open_github_label": "GitHub",
5453
"help_menu_open_doc_label": "文件",
5554
"help_menu_open_about_label": "關於",
56-
"help_menu_open_re_edge_gpt_doc_label": "開啟 ReEdgeGPT 文件",
57-
"help_menu_open_re_edge_gpt_github_label": "開啟 ReEdgeGPT GitHub",
5855
# Python Env Menu
5956
"python_env_menu_label": "Python 環境",
6057
"python_env_menu_create_venv_label": "建立 venv 虛擬環境",
@@ -107,7 +104,6 @@
107104
"tab_menu_web_tab_name": "瀏覽器",
108105
"tab_menu_stackoverflow_tab_name": "Stackoverflow",
109106
"tab_menu_ipython_tab_name": "IPython(Jupyter)",
110-
"tab_menu_re_re_edge_gpt_tab_name": "ReEdgeGPT",
111107
# Text Menu
112108
"text_menu_label": "文字",
113109
"text_menu_label_font": "字體",

requirements.txt

+4-14
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1-
frontengine
2-
PySide6==6.7.3
1+
PySide6
32
sphinx
43
auto-py-to-exe
5-
twine
6-
yapf
74
pycodestyle
85
jedi
9-
attrs
10-
wheel
11-
build
12-
setuptools
13-
pyinstaller
14-
requests
15-
gevent
16-
je_editor
17-
Ipython
18-
ipykernel
6+
frontengine
7+
yapf
8+
ipython
199
qtconsole

pyproject.toml renamed to stable.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ build-backend = "setuptools.build_meta"
66

77
[project]
88
name = "je_editor"
9-
version = "0.0.194"
9+
version = "0.0.199"
1010
authors = [
1111
{ name = "JE-Chen", email = "[email protected]" },
1212
]
1313
description = "JEditor is basic but powerful editor include GPT"
1414
requires-python = ">=3.9"
1515
license = { text = "MIT" }
1616
dependencies = [
17-
"PySide6==6.7.3", "qt-material", "yapf", "frontengine", "pycodestyle", "jedi", "qtconsole", "re-edge-gpt[gui]"
17+
"PySide6==6.8.2.1", "qt-material", "yapf", "frontengine", "pycodestyle", "jedi", "qtconsole"
1818
]
1919
classifiers = [
2020
"Programming Language :: Python :: 3.9",

0 commit comments

Comments
 (0)