Skip to content

Commit 3298927

Browse files
authored
Merge pull request #77 from Integration-Automation/dev
Dev
2 parents 72be40d + fcee98f commit 3298927

File tree

78 files changed

+145
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+145
-142
lines changed

automation_editor/__init__.py

-7
This file was deleted.

automation_editor/automation_editor_ui/extend_multi_language/update_language_dict.py

-8
This file was deleted.

automation_editor/automation_editor_ui/menu/build_menubar.py

-42
This file was deleted.

automation_ide/__init__.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
2+
from automation_ide.automation_editor_ui.editor_main.main_ui import EDITOR_EXTEND_TAB
3+
from automation_ide.automation_editor_ui.editor_main.main_ui import start_editor
4+
5+
__all__ = [
6+
"start_editor", "AutomationEditor", "EDITOR_EXTEND_TAB"
7+
]
File renamed without changes.

automation_editor/automation_editor_ui/editor_main/main_ui.py renamed to automation_ide/automation_editor_ui/editor_main/main_ui.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
from je_editor import EditorMain, language_wrapper
77
from qt_material import apply_stylesheet
88

9-
from automation_editor.automation_editor_ui.extend_multi_language.update_language_dict import update_language_dict
10-
from automation_editor.automation_editor_ui.menu.build_menubar import add_menu_to_menubar
11-
from automation_editor.automation_editor_ui.syntax.syntax_extend import \
9+
from automation_ide.automation_editor_ui.extend_multi_language.update_language_dict import update_language_dict
10+
from automation_ide.automation_editor_ui.menu.build_menubar import add_menu_to_menubar
11+
from automation_ide.automation_editor_ui.syntax.syntax_extend import \
1212
syntax_extend_package
1313

1414
EDITOR_EXTEND_TAB: Dict[str, Type[QWidget]] = {}
@@ -17,12 +17,13 @@
1717
class AutomationEditor(EditorMain):
1818

1919
def __init__(self, debug_mode: bool = False, show_system_tray_ray: bool = False):
20-
super().__init__(show_system_tray_ray=show_system_tray_ray)
20+
super().__init__(debug_mode, show_system_tray_ray)
2121
self.current_run_code_window: List[QWidget] = list()
2222
# Project compiler if user not choose this will use which to find
2323
self.python_compiler = None
2424
# Delete JEditor help
25-
self.help_menu.deleteLater()
25+
if self.help_menu:
26+
self.help_menu.deleteLater()
2627
# System tray change
2728
if self.show_system_tray_ray:
2829
self.system_tray.main_window = self
@@ -65,7 +66,7 @@ def start_editor(debug_mode: bool = False, **kwargs) -> None:
6566
new_editor = QCoreApplication.instance()
6667
if new_editor is None:
6768
new_editor = QApplication(sys.argv)
68-
window = AutomationEditor(debug_mode, **kwargs)
69+
window = AutomationEditor(debug_mode=debug_mode, **kwargs)
6970
apply_stylesheet(new_editor, theme="dark_amber.xml")
7071
window.showMaximized()
7172
try:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from automation_ide.automation_editor_ui.extend_multi_language.extend_english import update_english_word_dict
2+
from automation_ide.automation_editor_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()
+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
from je_editor import language_wrapper
66

7-
from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
7+
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser
88

99
if TYPE_CHECKING:
10-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
10+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
1111
import sys
1212

1313
from PySide6.QtGui import QAction
1414

15-
from automation_editor.extend.process_executor.api_testka.api_testka_process import call_api_testka, \
15+
from automation_ide.extend.process_executor.api_testka.api_testka_process import call_api_testka, \
1616
call_api_testka_with_send, call_api_testka_multi_file, call_api_testka_multi_file_and_send
1717

1818

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
from je_editor import EditorWidget, language_wrapper
66

7-
from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
7+
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser
88

99
if TYPE_CHECKING:
10-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
10+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
1111
import sys
1212

1313
import je_auto_control
1414
from PySide6.QtGui import QAction
1515

16-
from automation_editor.extend.process_executor.auto_control.auto_control_process import \
16+
from automation_ide.extend.process_executor.auto_control.auto_control_process import \
1717
call_auto_control, call_auto_control_with_send, call_auto_control_multi_file, \
1818
call_auto_control_multi_file_and_send
1919

Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
from je_editor import language_wrapper
66

7-
from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
7+
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser
88

99
if TYPE_CHECKING:
10-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
10+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
1111
import sys
1212

1313
from PySide6.QtGui import QAction
1414

15-
from automation_editor.extend.process_executor.file_automation.file_automation_process import call_file_automation_test, \
15+
from automation_ide.extend.process_executor.file_automation.file_automation_process import call_file_automation_test, \
1616
call_file_automation_test_with_send, call_file_automation_test_multi_file, \
1717
call_file_automation_test_multi_file_and_send
1818

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
from je_editor import language_wrapper
66

7-
from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
7+
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser
88

99
if TYPE_CHECKING:
10-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
10+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
1111
import sys
1212

1313
from PySide6.QtGui import QAction
1414

15-
from automation_editor.extend.process_executor.load_density.load_density_process import \
15+
from automation_ide.extend.process_executor.load_density.load_density_process import \
1616
call_load_density, call_load_density_with_send, call_load_density_multi_file, \
1717
call_load_density_multi_file_and_send
1818

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
from je_editor import language_wrapper
66

7-
from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
7+
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser
88

99
if TYPE_CHECKING:
10-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
10+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
1111
import sys
1212

1313
from PySide6.QtGui import QAction
1414

15-
from automation_editor.extend.process_executor.mail_thunder.mail_thunder_process import call_mail_thunder
15+
from automation_ide.extend.process_executor.mail_thunder.mail_thunder_process import call_mail_thunder
1616

1717

1818
def set_mail_thunder_menu(ui_we_want_to_set: AutomationEditor):
+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
from je_editor import language_wrapper
66

7-
from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
7+
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser
88

99
if TYPE_CHECKING:
10-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
10+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
1111
import sys
1212

1313
from PySide6.QtGui import QAction
1414

15-
from automation_editor.extend.process_executor.web_runner.web_runner_process import call_web_runner_test, \
15+
from automation_ide.extend.process_executor.web_runner.web_runner_process import call_web_runner_test, \
1616
call_web_runner_test_with_send, call_web_runner_test_multi_file, call_web_runner_test_multi_file_and_send
1717

1818

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
from __future__ import annotations
2+
3+
from typing import TYPE_CHECKING
4+
5+
from automation_ide.automation_editor_ui.menu.automation_menu.api_testka_menu.build_api_testka_menu import \
6+
set_apitestka_menu
7+
from automation_ide.automation_editor_ui.menu.automation_menu.auto_control_menu.build_autocontrol_menu import \
8+
set_autocontrol_menu
9+
from automation_ide.automation_editor_ui.menu.automation_menu.automation_file_menu.build_automation_file_menu import \
10+
set_automation_file_menu
11+
from automation_ide.automation_editor_ui.menu.automation_menu.load_density_menu.build_load_density_menu import \
12+
set_load_density_menu
13+
from automation_ide.automation_editor_ui.menu.automation_menu.mail_thunder_menu.build_mail_thunder_menu import \
14+
set_mail_thunder_menu
15+
from automation_ide.automation_editor_ui.menu.automation_menu.web_runner_menu.build_webrunner_menu import \
16+
set_web_runner_menu
17+
from automation_ide.automation_editor_ui.menu.install_menu.automation_menu.build_automation_install_menu import \
18+
build_automation_install_menu
19+
from automation_ide.automation_editor_ui.menu.install_menu.tools_menu.build_tool_install_menu import \
20+
build_tool_install_menu
21+
from automation_ide.automation_editor_ui.menu.tools_menu.bing_gpt_menu.build_bing_gpt_menu import set_bing_gpt_menu
22+
23+
if TYPE_CHECKING:
24+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
25+
26+
from je_editor import language_wrapper
27+
28+
29+
def add_menu_to_menubar(ui_we_want_to_set: AutomationEditor):
30+
ui_we_want_to_set.automation_menu = ui_we_want_to_set.menu.addMenu(
31+
language_wrapper.language_word_dict.get("automation_menu_label"))
32+
ui_we_want_to_set.install_menu = ui_we_want_to_set.menu.addMenu(
33+
language_wrapper.language_word_dict.get("install_menu_label"))
34+
set_apitestka_menu(ui_we_want_to_set)
35+
set_autocontrol_menu(ui_we_want_to_set)
36+
set_automation_file_menu(ui_we_want_to_set)
37+
set_load_density_menu(ui_we_want_to_set)
38+
set_mail_thunder_menu(ui_we_want_to_set)
39+
set_web_runner_menu(ui_we_want_to_set)
40+
build_automation_install_menu(ui_we_want_to_set)
41+
build_tool_install_menu(ui_we_want_to_set)
42+
set_bing_gpt_menu(ui_we_want_to_set)
+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from PySide6.QtGui import QAction
66
from je_editor import language_wrapper
77

8-
from automation_editor.automation_editor_ui.menu.install_menu.install_utils import install_package
8+
from automation_ide.automation_editor_ui.menu.install_menu.install_utils import install_package
99

1010
if TYPE_CHECKING:
11-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
11+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
1212

1313

1414
def build_automation_install_menu(ui_we_want_to_set: AutomationEditor):

automation_editor/automation_editor_ui/menu/install_menu/install_utils.py renamed to automation_ide/automation_editor_ui/menu/install_menu/install_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from je_editor import EditorWidget, ShellManager
66

77
if TYPE_CHECKING:
8-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
8+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
99

1010

1111
def install_package(package_text: str, ui_we_want_to_set: AutomationEditor) -> None:

automation_editor/automation_editor_ui/menu/install_menu/tools_menu/build_tool_install_menu.py renamed to automation_ide/automation_editor_ui/menu/install_menu/tools_menu/build_tool_install_menu.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from PySide6.QtGui import QAction
66
from je_editor import language_wrapper
77

8-
from automation_editor.automation_editor_ui.menu.install_menu.install_utils import install_package
8+
from automation_ide.automation_editor_ui.menu.install_menu.install_utils import install_package
99

1010
if TYPE_CHECKING:
11-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
11+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
1212

1313

1414
def build_tool_install_menu(ui_we_want_to_set: AutomationEditor):

automation_editor/automation_editor_ui/menu/menu_utils.py renamed to automation_ide/automation_editor_ui/menu/menu_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from je_editor import JEBrowser
66

77
if TYPE_CHECKING:
8-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
8+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
99

1010

1111
def open_web_browser(

automation_editor/automation_editor_ui/menu/tools_menu/bing_gpt_menu/build_bing_gpt_menu.py renamed to automation_ide/automation_editor_ui/menu/tools_menu/bing_gpt_menu/build_bing_gpt_menu.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from PySide6.QtGui import QAction
66
from je_editor import language_wrapper
77

8-
from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
8+
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser
99

1010
if TYPE_CHECKING:
11-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
11+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
1212

1313

1414
def set_bing_gpt_menu(ui_we_want_to_set: AutomationEditor):

automation_editor/automation_editor_ui/syntax/syntax_extend.py renamed to automation_ide/automation_editor_ui/syntax/syntax_extend.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
from je_editor import EditorWidget
66

77
if TYPE_CHECKING:
8-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
8+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
99
from PySide6.QtCore import QRegularExpression
1010
from PySide6.QtGui import QTextCharFormat, QColor
1111

12-
from automation_editor.automation_editor_ui.syntax.syntax_keyword import \
12+
from automation_ide.automation_editor_ui.syntax.syntax_keyword import \
1313
package_keyword_list
14-
from automation_editor.utils.manager.package_manager.package_manager_class import package_manager
14+
from automation_ide.utils.manager.package_manager.package_manager_class import package_manager
1515

1616
from je_editor import syntax_word_setting_dict
1717

automation_editor/extend/mail_thunder_extend/mail_thunder_setting.py renamed to automation_ide/extend/mail_thunder_extend/mail_thunder_setting.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import sys
22
from email.mime.multipart import MIMEMultipart
33

4-
from automation_editor.utils.exception.exception_tags import send_html_exception_tag
5-
from automation_editor.utils.exception.exceptions import ITESendHtmlReportException
4+
from automation_ide.utils.exception.exception_tags import send_html_exception_tag
5+
from automation_ide.utils.exception.exceptions import ITESendHtmlReportException
66

77

88
def send_after_test(html_report_path: str = None) -> None:
@@ -13,7 +13,7 @@ def send_after_test(html_report_path: str = None) -> None:
1313
user: str = mail_thunder_smtp.user
1414
with open("default_name.html", "r+") as file:
1515
html_string: str = file.read()
16-
message = mail_thunder_smtp.smtp_create_message_with_attach(
16+
message = mail_thunder_smtp.create_message_with_attach(
1717
html_string,
1818
{"Subject": "Test Report", "To": user, "From": user},
1919
"default_name.html", use_html=True)
@@ -23,7 +23,7 @@ def send_after_test(html_report_path: str = None) -> None:
2323
user: str = mail_thunder_smtp.user
2424
with open(html_report_path, "r+") as file:
2525
html_string: str = file.read()
26-
message: MIMEMultipart = mail_thunder_smtp.smtp_create_message_with_attach(
26+
message: MIMEMultipart = mail_thunder_smtp.create_message_with_attach(
2727
html_string,
2828
{"Subject": "Test Report", "To": user, "From": user},
2929
html_report_path, use_html=True)

automation_editor/extend/process_executor/api_testka/api_testka_process.py renamed to automation_ide/extend/process_executor/api_testka/api_testka_process.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
from typing import TYPE_CHECKING, Union
44

5-
from automation_editor.extend.process_executor.process_executor_utils import build_process
5+
from automation_ide.extend.process_executor.process_executor_utils import build_process
66

77
if TYPE_CHECKING:
8-
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
8+
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
99
import sys
1010

11-
from automation_editor.utils.file_process.get_dir_file_list import ask_and_get_dir_files_as_list
11+
from automation_ide.utils.file_process.get_dir_file_list import ask_and_get_dir_files_as_list
1212

1313

1414
def call_api_testka(

0 commit comments

Comments
 (0)