Skip to content

Commit

Permalink
Merge pull request #77 from Integration-Automation/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JE-Chen authored Oct 15, 2024
2 parents 72be40d + fcee98f commit 3298927
Show file tree
Hide file tree
Showing 78 changed files with 145 additions and 142 deletions.
7 changes: 0 additions & 7 deletions automation_editor/__init__.py

This file was deleted.

This file was deleted.

42 changes: 0 additions & 42 deletions automation_editor/automation_editor_ui/menu/build_menubar.py

This file was deleted.

7 changes: 7 additions & 0 deletions automation_ide/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import EDITOR_EXTEND_TAB
from automation_ide.automation_editor_ui.editor_main.main_ui import start_editor

__all__ = [
"start_editor", "AutomationEditor", "EDITOR_EXTEND_TAB"
]
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from je_editor import EditorMain, language_wrapper
from qt_material import apply_stylesheet

from automation_editor.automation_editor_ui.extend_multi_language.update_language_dict import update_language_dict
from automation_editor.automation_editor_ui.menu.build_menubar import add_menu_to_menubar
from automation_editor.automation_editor_ui.syntax.syntax_extend import \
from automation_ide.automation_editor_ui.extend_multi_language.update_language_dict import update_language_dict
from automation_ide.automation_editor_ui.menu.build_menubar import add_menu_to_menubar
from automation_ide.automation_editor_ui.syntax.syntax_extend import \
syntax_extend_package

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

def __init__(self, debug_mode: bool = False, show_system_tray_ray: bool = False):
super().__init__(show_system_tray_ray=show_system_tray_ray)
super().__init__(debug_mode, show_system_tray_ray)
self.current_run_code_window: List[QWidget] = list()
# Project compiler if user not choose this will use which to find
self.python_compiler = None
# Delete JEditor help
self.help_menu.deleteLater()
if self.help_menu:
self.help_menu.deleteLater()
# System tray change
if self.show_system_tray_ray:
self.system_tray.main_window = self
Expand Down Expand Up @@ -65,7 +66,7 @@ def start_editor(debug_mode: bool = False, **kwargs) -> None:
new_editor = QCoreApplication.instance()
if new_editor is None:
new_editor = QApplication(sys.argv)
window = AutomationEditor(debug_mode, **kwargs)
window = AutomationEditor(debug_mode=debug_mode, **kwargs)
apply_stylesheet(new_editor, theme="dark_amber.xml")
window.showMaximized()
try:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from automation_ide.automation_editor_ui.extend_multi_language.extend_english import update_english_word_dict
from automation_ide.automation_editor_ui.extend_multi_language.extend_traditional_chinese import \
update_traditional_chinese_word_dict


def update_language_dict():
update_traditional_chinese_word_dict()
update_english_word_dict()
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

from je_editor import language_wrapper

from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
import sys

from PySide6.QtGui import QAction

from automation_editor.extend.process_executor.api_testka.api_testka_process import call_api_testka, \
from automation_ide.extend.process_executor.api_testka.api_testka_process import call_api_testka, \
call_api_testka_with_send, call_api_testka_multi_file, call_api_testka_multi_file_and_send


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

from je_editor import EditorWidget, language_wrapper

from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
import sys

import je_auto_control
from PySide6.QtGui import QAction

from automation_editor.extend.process_executor.auto_control.auto_control_process import \
from automation_ide.extend.process_executor.auto_control.auto_control_process import \
call_auto_control, call_auto_control_with_send, call_auto_control_multi_file, \
call_auto_control_multi_file_and_send

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

from je_editor import language_wrapper

from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
import sys

from PySide6.QtGui import QAction

from automation_editor.extend.process_executor.file_automation.file_automation_process import call_file_automation_test, \
from automation_ide.extend.process_executor.file_automation.file_automation_process import call_file_automation_test, \
call_file_automation_test_with_send, call_file_automation_test_multi_file, \
call_file_automation_test_multi_file_and_send

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

from je_editor import language_wrapper

from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
import sys

from PySide6.QtGui import QAction

from automation_editor.extend.process_executor.load_density.load_density_process import \
from automation_ide.extend.process_executor.load_density.load_density_process import \
call_load_density, call_load_density_with_send, call_load_density_multi_file, \
call_load_density_multi_file_and_send

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

from je_editor import language_wrapper

from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
import sys

from PySide6.QtGui import QAction

from automation_editor.extend.process_executor.mail_thunder.mail_thunder_process import call_mail_thunder
from automation_ide.extend.process_executor.mail_thunder.mail_thunder_process import call_mail_thunder


def set_mail_thunder_menu(ui_we_want_to_set: AutomationEditor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

from je_editor import language_wrapper

from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
import sys

from PySide6.QtGui import QAction

from automation_editor.extend.process_executor.web_runner.web_runner_process import call_web_runner_test, \
from automation_ide.extend.process_executor.web_runner.web_runner_process import call_web_runner_test, \
call_web_runner_test_with_send, call_web_runner_test_multi_file, call_web_runner_test_multi_file_and_send


Expand Down
42 changes: 42 additions & 0 deletions automation_ide/automation_editor_ui/menu/build_menubar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from __future__ import annotations

from typing import TYPE_CHECKING

from automation_ide.automation_editor_ui.menu.automation_menu.api_testka_menu.build_api_testka_menu import \
set_apitestka_menu
from automation_ide.automation_editor_ui.menu.automation_menu.auto_control_menu.build_autocontrol_menu import \
set_autocontrol_menu
from automation_ide.automation_editor_ui.menu.automation_menu.automation_file_menu.build_automation_file_menu import \
set_automation_file_menu
from automation_ide.automation_editor_ui.menu.automation_menu.load_density_menu.build_load_density_menu import \
set_load_density_menu
from automation_ide.automation_editor_ui.menu.automation_menu.mail_thunder_menu.build_mail_thunder_menu import \
set_mail_thunder_menu
from automation_ide.automation_editor_ui.menu.automation_menu.web_runner_menu.build_webrunner_menu import \
set_web_runner_menu
from automation_ide.automation_editor_ui.menu.install_menu.automation_menu.build_automation_install_menu import \
build_automation_install_menu
from automation_ide.automation_editor_ui.menu.install_menu.tools_menu.build_tool_install_menu import \
build_tool_install_menu
from automation_ide.automation_editor_ui.menu.tools_menu.bing_gpt_menu.build_bing_gpt_menu import set_bing_gpt_menu

if TYPE_CHECKING:
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor

from je_editor import language_wrapper


def add_menu_to_menubar(ui_we_want_to_set: AutomationEditor):
ui_we_want_to_set.automation_menu = ui_we_want_to_set.menu.addMenu(
language_wrapper.language_word_dict.get("automation_menu_label"))
ui_we_want_to_set.install_menu = ui_we_want_to_set.menu.addMenu(
language_wrapper.language_word_dict.get("install_menu_label"))
set_apitestka_menu(ui_we_want_to_set)
set_autocontrol_menu(ui_we_want_to_set)
set_automation_file_menu(ui_we_want_to_set)
set_load_density_menu(ui_we_want_to_set)
set_mail_thunder_menu(ui_we_want_to_set)
set_web_runner_menu(ui_we_want_to_set)
build_automation_install_menu(ui_we_want_to_set)
build_tool_install_menu(ui_we_want_to_set)
set_bing_gpt_menu(ui_we_want_to_set)
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from PySide6.QtGui import QAction
from je_editor import language_wrapper

from automation_editor.automation_editor_ui.menu.install_menu.install_utils import install_package
from automation_ide.automation_editor_ui.menu.install_menu.install_utils import install_package

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor


def build_automation_install_menu(ui_we_want_to_set: AutomationEditor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from je_editor import EditorWidget, ShellManager

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor


def install_package(package_text: str, ui_we_want_to_set: AutomationEditor) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from PySide6.QtGui import QAction
from je_editor import language_wrapper

from automation_editor.automation_editor_ui.menu.install_menu.install_utils import install_package
from automation_ide.automation_editor_ui.menu.install_menu.install_utils import install_package

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor


def build_tool_install_menu(ui_we_want_to_set: AutomationEditor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from je_editor import JEBrowser

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor


def open_web_browser(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from PySide6.QtGui import QAction
from je_editor import language_wrapper

from automation_editor.automation_editor_ui.menu.menu_utils import open_web_browser
from automation_ide.automation_editor_ui.menu.menu_utils import open_web_browser

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor


def set_bing_gpt_menu(ui_we_want_to_set: AutomationEditor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from je_editor import EditorWidget

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
from PySide6.QtCore import QRegularExpression
from PySide6.QtGui import QTextCharFormat, QColor

from automation_editor.automation_editor_ui.syntax.syntax_keyword import \
from automation_ide.automation_editor_ui.syntax.syntax_keyword import \
package_keyword_list
from automation_editor.utils.manager.package_manager.package_manager_class import package_manager
from automation_ide.utils.manager.package_manager.package_manager_class import package_manager

from je_editor import syntax_word_setting_dict

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import sys
from email.mime.multipart import MIMEMultipart

from automation_editor.utils.exception.exception_tags import send_html_exception_tag
from automation_editor.utils.exception.exceptions import ITESendHtmlReportException
from automation_ide.utils.exception.exception_tags import send_html_exception_tag
from automation_ide.utils.exception.exceptions import ITESendHtmlReportException


def send_after_test(html_report_path: str = None) -> None:
Expand All @@ -13,7 +13,7 @@ def send_after_test(html_report_path: str = None) -> None:
user: str = mail_thunder_smtp.user
with open("default_name.html", "r+") as file:
html_string: str = file.read()
message = mail_thunder_smtp.smtp_create_message_with_attach(
message = mail_thunder_smtp.create_message_with_attach(
html_string,
{"Subject": "Test Report", "To": user, "From": user},
"default_name.html", use_html=True)
Expand All @@ -23,7 +23,7 @@ def send_after_test(html_report_path: str = None) -> None:
user: str = mail_thunder_smtp.user
with open(html_report_path, "r+") as file:
html_string: str = file.read()
message: MIMEMultipart = mail_thunder_smtp.smtp_create_message_with_attach(
message: MIMEMultipart = mail_thunder_smtp.create_message_with_attach(
html_string,
{"Subject": "Test Report", "To": user, "From": user},
html_report_path, use_html=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

from typing import TYPE_CHECKING, Union

from automation_editor.extend.process_executor.process_executor_utils import build_process
from automation_ide.extend.process_executor.process_executor_utils import build_process

if TYPE_CHECKING:
from automation_editor.automation_editor_ui.editor_main.main_ui import AutomationEditor
from automation_ide.automation_editor_ui.editor_main.main_ui import AutomationEditor
import sys

from automation_editor.utils.file_process.get_dir_file_list import ask_and_get_dir_files_as_list
from automation_ide.utils.file_process.get_dir_file_list import ask_and_get_dir_files_as_list


def call_api_testka(
Expand Down
Loading

0 comments on commit 3298927

Please sign in to comment.